返回市场
语义学者-MCP-服务器

语义学者-MCP-服务器

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

项目介绍

🎓 Semantic Scholar MCP Server

smithery badge

本项目实现了一个用于与Semantic Scholar API交互的模型上下文协议(MCP)服务器。它提供了搜索论文、获取论文和作者详细信息以及抓取引用和参考文献的工具。

✨ 特性

  • 🔍 在Semantic Scholar上搜索论文
  • 📄 获取特定论文的详细信息
  • 👤 获取作者详细信息
  • 🔗 获取论文的引用和参考文献

📋 先决条件

  • 🐍 Python 3.10+
  • 📚 semanticscholar Python 包
  • 🔧 mcp Python 包(模型上下文协议)

🚀 安装

通过Smithery安装

要通过Smithery自动安装Claude Desktop的semanticscholar服务器:

claude

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

Cursor

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

  • Mac/Linux
npx -y @smithery/cli@latest run @JackKuo666/semanticscholar-m

Windsurf

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

CLine

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

    git clone https://github.com/JackKuo666/semanticscholar-MCP-Server.git
    cd semanticscholar-mcp-server
    
  2. 安装所需的包:

    pip install semanticscholar mcp
    

🖥️ 使用方法

  1. 启动Semantic Scholar MCP服务器:

    python semantic_scholar_server.py
    
  2. 服务器启动并监听MCP请求。

  3. 使用MCP客户端与服务器交互,并访问以下工具:

    • 🔍 search_semantic_scholar: 使用查询字符串搜索论文
    • 📄 get_semantic_scholar_paper_details: 获取特定论文的详细信息
    • 👤 get_semantic_scholar_author_details: 获取特定作者的详细信息
    • 🔗 get_semantic_scholar_citations_and_references: 获取论文的引用和参考文献

在Claude Desktop中的使用

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

(Mac OS)

{
  "mcpServers": {
    "semanticscholar": {
      "command": "python",
      "args": ["-m", "semanticscholar_mcp_server"]
      }
  }
}

(Windows版本):

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

使用Cline

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

📁 文件结构

  • 📜 semantic_scholar_search.py: 包含与Semantic Scholar API交互的函数
  • 🖥️ semantic_scholar_server.py: 实现MCP服务器并定义可用工具

🤝 贡献

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

📄 许可证

本项目采用MIT许可证 - 详情见LICENSE文件。