返回市场
谷歌学者MCP服务器

谷歌学者MCP服务器

作者:JackKuo666170 星标更新:2025-03-25

项目介绍

Google Scholar MCP Server

smithery 徽章

🔍 通过简单的MCP接口,使AI助手能够搜索并访问Google Scholar论文。

Google Scholar MCP Server通过模型上下文协议(MCP)在AI助手与Google Scholar之间提供了一个桥梁。它允许AI模型以编程方式搜索学术论文并访问其内容。

✨ 核心功能

  • 🔎 论文搜索:使用自定义搜索字符串或高级搜索参数查询Google Scholar论文 ✅
  • 🚀 高效检索:快速访问论文元数据 ✅
  • 👤 作者信息:获取关于作者的详细信息 ✅
  • 📊 研究支持:促进学术研究和分析 ✅

🚀 快速开始

手动安装

通过Smithery安装

要通过Smithery自动安装Google Scholar Server for Claude Desktop:

claude

npx -y @smithery/cli@latest install @JackKuo666/google-scholar-mcp-server --client claude --config "{}"

Cursor

在设置 → Cursor 设置 → MCP → 添加新服务器中粘贴以下内容:

  • Mac/Linux
npx -y @smithery/cli@latest run @JackKuo666/google-scholar-mcp-server --client cursor --config "{}" 

Windsurf

npx -y @smithery/cli@latest install @JackKuo666/google-scholar-mcp-server --client windsurf --config "{}"

CLine

npx -y @smithery/cli@latest install @JackKuo666/google-scholar-mcp-server --client cline --config "{}"
  1. 克隆仓库:

    git clone https://github.com/JackKuo666/google-scholar-MCP-Server.git
    cd google-scholar-MCP-Server
    
  2. 安装所需依赖项:

    pip install -r requirements.txt
    

对于开发:

# 克隆并设置开发环境
git clone https://github.com/JackKuo666/Google-Scholar-MCP-Server.git
cd Google-Scholar-MCP-Server

# 创建并激活虚拟环境
python -m venv venv
source venv/bin/activate  # 在Windows上使用 `venv\Scripts\activate`

# 安装依赖项
pip install -r requirements.txt

📊 使用方法

启动MCP服务器:

python google_scholar_server.py

一旦服务器运行,您可以在您的AI助手或应用程序中使用提供的MCP工具。这里有一些如何使用这些工具的例子:

示例1:使用关键词搜索论文

result = await mcp.use_tool("search_google_scholar_key_words", {
    "query": "人工智能伦理",
    "num_results": 5
})
print(result)

示例2:执行高级搜索

result = await mcp.use_tool("search_google_scholar_advanced", {
    "query": "机器学习",
    "author": "Hinton",
    "year_range": [2020, 2023],
    "num_results": 3
})
print(result)

示例3:获取作者信息

result = await mcp.use_tool("get_author_info", {
    "author_name": "Geoffrey Hinton"
})
print(result)

这些示例展示了如何使用Google Scholar MCP Server提供的三个主要工具。根据您的具体需求调整参数。

与Claude Desktop一起使用

将此配置添加到您的claude_desktop_config.json中:

(Mac OS)

{
  "mcpServers": {
    "google-scholar": {
      "command": "python",
      "args": ["-m", "google_scholar_mcp_server"]
      }
  }
}

(Windows版本):

{
  "mcpServers": {
    "google-scholar": {
      "command": "C:\\Users\\YOUR\\PATH\\miniconda3\\envs\\mcp_server\\python.exe",
      "args": [
        "D:\\code\\YOUR\\PATH\\Google-Scholar-MCP-Server\\google_scholar_server.py"
      ],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

与Cline一起使用

{
  "mcpServers": {
    "google-scholar": {
      "command": "bash",
      "args": [
        "-c",
        "source /home/YOUR/PATH/.venv/bin/activate && python /home/YOUR/PATH/google_scholar_mcp_server.py"
      ],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

🛠 MCP工具

Google Scholar MCP Server提供了以下工具:

search_google_scholar_key_words

使用关键词在Google Scholar上搜索文章。

参数:

  • query (str): 搜索查询字符串
  • num_results (int, 可选): 返回的结果数量(默认值:5)

返回值: 包含文章信息的字典列表

search_google_scholar_advanced

在Google Scholar上执行高级搜索。

参数:

  • query (str): 通用搜索查询
  • author (str, 可选): 作者姓名
  • year_range (tuple, 可选): 包含(start_year, end_year)的元组
  • num_results (int, 可选): 返回的结果数量(默认值:5)

返回值: 包含文章信息的字典列表

get_author_info

从Google Scholar获取作者的详细信息。

参数:

  • author_name (str): 要搜索的作者姓名

返回值: 包含作者信息的字典

📁 项目结构

  • google_scholar_server.py: 主要的MCP服务器实现,使用FastMCP
  • google_scholar_web_search.py: 包含用于搜索Google Scholar的网络抓取逻辑

🔧 依赖项

  • Python 3.10+
  • mcp[cli]>=1.4.1
  • scholarly>=1.7.0
  • asyncio>=3.4.3

您可以使用以下命令安装所需的依赖项:

pip install -r requirements.txt

🤝 贡献

欢迎贡献!请随时提交Pull Request。

📄 许可证

本项目采用MIT许可证。

⚠️ 免责声明

此工具仅用于研究目的。请遵守Google Scholar的服务条款,并负责任地使用此工具。