基于Go语言的学术论文检索聚合MCP服务通过统一接口同时调用多个学术数据库,提供智能去重、合并和排序搜索结果的功能。
从多个数据源同时搜索学术论文,自动合并、去重和排序结果。
参数:
query (string):搜索关键词(必需)author (string):作者过滤(可选)title (string):标题过滤(可选)journal (string):期刊筛选(可选)year (string):年份过滤(可选,例如“2200-2023”)categories ([] string):类别过滤(可选)min_citations (int):最小引用数(可选)open_access_only (boolean):仅开放获取(可选)offset (int):偏移量,默认0limit (int):限制数量,默认10,最大100sort_by (string):排序方式(相关性、引用次数、发表日期)sort_order (string):排序顺序(升序、降序)enabled_sources ([] string):指定数据源(可选)基本搜索示例:
{
"query": "机器学习"
}
高级搜索示例:
{
"query": "深度学习",
"author": "Hinton",
"year": "2020-2023",
"min_citations": 100,
"open_access_only": true,
"limit": 20,
"sort_by": "citation_count",
"sort_order": "desc"
}
指定数据源示例:
{
"query": "量子计算",
"enabled_sources": ["arxiv", "semantic_scholar", "crossref"]
}
根据任何标识符获取特定论文的完整信息,并自动选择最佳数据源。
参数:
identifier (string):论文标识符(必需)DOI查询示例:
{
"identifier": "10.1038/nature12373"
}
arXiv ID查询示例:
{
"identifier": "2301.07041"
}
git clone https://github.com/Seelly/scholar_mcp_server.git
cd scholar_mcp_server
go mod tidy
go run main.go logging.go
配置API密钥以启用所有功能:
# 设置API密钥
export SCOPUS_API_KEY="your_scopus_api_key"
export ADSABS_API_KEY="your_adsabs_api_key"
# 运行服务器
go run main.go logging.go
# 编译二进制文件
go build -o scholar-server main.go logging.go
# 后台运行
nohup ./scholar-server > server.log 2>&1 &
服务器将在 http://127.0.0.1:8080/ 启动。
在 ~/.cursor/mcp.json 或添加到Claude桌面配置文件中:
{
"mcpServers": {
"arXiv论文检索服务": {
"url": "http://127.0.0.1:8080/mcp"
}
}
}
# 使用 curl 测试搜索功能
curl -X POST http://127.0.0.1:8080/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "searchArxivPapers",
"arguments": {
"query": "深度学习",
"max_results": 5
}
}
}'
curl -X POST http://127.0.0.1:8080/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "getArxivPaper",
"arguments": {
"id": "2301.07041"
}
}
}'