使用说明
API研究助理
人工智能驱动的研究助理,在arXiv、PubMed和Semantic Scholar上搜索学术论文。通过为Claude Desktop集成HTTP API和MCP,提供摘要、综合和问答功能。
特性
- 跨多个学术数据库搜索
- 基于人工智能的文本摘要
- 多纸张合成
- 研究论文问答
- 引文生成
- Redis缓存
- 双模式:Claude Desktop的HTTP API+MCP服务器
快速开始
本地设置
git clone <your-repo-url>
cd research-mcp-server
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
环境变量
SEMANTIC_SCHOLAR_API_KEY=your_key_here # Optional
REDIS_URL=redis://localhost:6379 # Optional
PORT=8080 # For HTTP mode only
用法
作为MCP服务器(克劳德桌面集成)
- 更新Claude桌面配置 (
~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"research-assistant": {
"command": "/Users/home/Desktop/research-mcp-server/.venv/bin/python3",
"args": ["/Users/home/Desktop/research-mcp-server/mcp_server.py"]
}
}
}
- 启动MCP服务器:
source .venv/bin/activate
python mcp_server.py
- 重新启动克劳德桌面 在聊天中寻找研究工具!
作为HTTP API服务器
source .venv/bin/activate
PORT=8080 python mcp_server.py
# OR
uvicorn mcp_server:app --host 0.0.0.0 --port 8080
API终点
GET /-服务信息和可用端点GET /health-健康检查POST /api/search-搜索学术论文POST /api/summarize-总结文本POST /api/search_and_summarize-搜索和总结论文POST /api/synthesize-合并多篇论文POST /api/cite-生成引用POST /api/qa-根据论文回答问题
MCP工具(克劳德提供)
search-搜索学术论文summarize-总结文本search_and_summarize-搜索和总结论文synthesize-合并多篇论文cite-生成引用qa-根据论文回答问题
使用示例
HTTP API
curl -X POST http://localhost:8080/api/search \
-H "Content-Type: application/json" \
-d '{"query": "machine learning", "max_results": 5}'
克劳德桌面
问问克劳德: “搜索最近关于机器学习的论文并对其进行总结”
需求
- Python 3.11+ (MCP功能所需)
- 虚拟环境(推荐)
- Redis(可选,用于缓存)
Docker部署
docker build -t research-assistant .
docker run -p 8080:8080 -e PORT=8080 research-assistant
许可证
MIT许可证
