Back to MCP directory
publicPublicdnsLocal runtime

mcp-semantic-scholar-server

一个基于Semantic Scholar API的MCP服务器插件,用于学术文献检索

article

README

🚀 语义学者API MCP服务器

语义学者API MCP服务器借助mcp-python-sdk构建,为相关应用提供支持。

🚀 快速开始

📦 安装指南

要求执行以下命令安装依赖:

pip install -r requirements.txt

💻 使用示例

基础用法

运行以下命令初始化服务器:

mcp dev path/to/semantic-scholar-plugin.py

运行以下命令将其安装到Claude,或在Claude/cline配置中添加相应内容:

"semantic-scholar": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp",
        "mcp",
        "run",
        "/path/to/semantic-scholar-plugin.py"
      ]
    }

⚠️ 重要提示

当前使用uvmcp可能会破坏某些Linux/macOS版本的Claude - desktop,您可能需要设置为:

"semantic-scholar": {
      "command": "/path/to/mcp",
      "args": [
        "run",
        "/path/to/semantic-scholar-plugin.py"
      ]
    }

其中,/path/to/mcp从运行which mcp命令获取。

API密钥设置

要使用Semantic Scholar API并提高速率限制,您可以将API密钥设置为环境变量:

export SEMANTIC_SCHOLAR_API_KEY="your_api_key"

或通过在MCP设置中添加env键来设置:

"semantic-scholar": {
      "command": ...,
      "args": ...,
      "env": {
        "SEMANTIC_SCHOLAR_API_KEY": "your_api_key"
      }
}

您可以在以下链接获取API密钥:https://www.semanticscholar.org/product/api

建议的提示词系统提示

参见:benhaotang/my_agent_system_prompt,可以充分利用此MCP服务器的研究前缀人工智能代理。

🔧 技术细节

已知问题

  • 如果您看到类似INFO Processing request of type __init__.py:431 ListToolsRequest的日志信息,您可以忽略它们,因为这不会影响其正常运行,这是cline解析工具列表与控制台调试信息一起显示的结果。当前python - sdk无法禁用控制台消息。除了可以看到此警告外,它不会影响任何功能调用部分。

⚠️ 重要提示

如果您仍在使用FastMCP版本的此MCP服务器,请考虑再次拉取此仓库并更新到新版本,因为FastMCP已经弃用。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client