Google-Scholar-MCP-Server

by JackKuo666
Verified

Integrations

  • Enables searching for academic papers using keywords or advanced search parameters, retrieving paper metadata, accessing author information, and supporting academic research and analysis through Google Scholar.

Google 学术 MCP 服务器

🔍 让 AI 助手能够通过简单的 MCP 界面搜索和访问 Google Scholar 论文。

Google Scholar MCP 服务器通过模型上下文协议 (MCP) 在 AI 助手和 Google Scholar 之间架起了一座桥梁。它允许 AI 模型以编程方式搜索学术论文并访问其内容。

✨ 核心功能

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

🚀 快速入门

手动安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 google-scholar 服务器:

克劳德

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

光标

将以下内容粘贴到设置 → 光标设置 → MCP → 添加新服务器:

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

风帆冲浪

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

克莱恩

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

对于开发:

# Clone and set up development environment git clone https://github.com/JackKuo666/Google-Scholar-MCP-Server.git cd Google-Scholar-MCP-Server # Create and activate virtual environment python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` # Install dependencies 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": "artificial intelligence ethics", "num_results": 5 }) print(result)

示例 2:执行高级搜索

result = await mcp.use_tool("search_google_scholar_advanced", { "query": "machine learning", "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 服务器提供的三个主要工具。请根据您的具体用例调整参数。

与 Claude Desktop 一起使用

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

(Mac 操作系统)

{ "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 服务器提供以下工具:

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 (元组,可选):包含(start_year,end_year)的元组
  • num_results (int,可选):返回的结果数(默认值:5)

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

获取作者信息

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

参数:

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

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

📁 项目结构

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

🔧 依赖项

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

您可以使用以下方式安装所需的依赖项:

pip install -r requirements.txt

🤝 贡献

欢迎贡献代码!欢迎提交 Pull 请求。

📄 许可证

该项目已获得 MIT 许可。

⚠️ 免责声明

此工具仅供研究之用。请遵守 Google 学术搜索的服务条款并负责任地使用此工具。

ID: i7tmfu11dl