这是一个用于Semantic Scholar API的FastMCP服务器实现,提供全面访问学术论文数据、作者信息和引用网络的功能。
该项目已被重构为模块化结构以提高可维护性:
semantic-scholar-server/
├── semantic_scholar/ # 主要包
│ ├── __init__.py # 包初始化
│ ├── server.py # 服务器设置和主要功能
│ ├── mcp.py # 集中式FastMCP实例定义
│ ├── config.py # 配置类
│ ├── utils/ # 工具模块
│ │ ├── __init__.py
│ │ ├── errors.py # 错误处理
│ │ └── http.py # HTTP客户端和速率限制
│ ├── api/ # API端点
│ ├── __init__.py
│ ├── papers.py # 与论文相关的端点
│ ├── authors.py # 与作者相关的端点
│ └── recommendations.py # 推荐端点
├── run.py # 入口脚本
这种结构:
论文搜索与发现
引用分析
作者信息
高级功能
要通过Smithery自动安装Semantic Scholar MCP Server for Claude Desktop:
npx -y @smithery/cli install semantic-scholar-fastmcp-mcp-server --client claude
git clone https://github.com/YUZongmin/semantic-scholar-fastmcp-mcp-server.git
cd semantic-scholar-server
安装FastMCP和其他依赖项,请参阅:https://github.com/jlowin/fastmcp
配置FastMCP:
对于Claude Desktop用户,您需要在您的FastMCP配置文件中配置服务器。在配置中添加以下内容(通常位于~/.config/claude-desktop/config.json):
{
"mcps": {
"Semantic Scholar Server": {
"command": "/path/to/your/venv/bin/fastmcp",
"args": [
"run",
"/path/to/your/semantic-scholar-server/run.py"
],
"env": {
"SEMANTIC_SCHOLAR_API_KEY": "your-api-key-here" # 可选
}
}
}
}
确保: