语义学者MCP服务器
  ](https://pypi.org/project/s2-mcp-server/)  ](https://ghcr.io/smaniches/semantic-scholar-mcp) ](https://github.com/smaniches/semantic-scholar-mcp/releases)    
一个全面的14工具MCP服务器,用于语义学者学术研究工作流程。 直接访问来自的2亿多篇论文 语义学者 --论文搜索、引文图遍历、作者简介和推荐——来自任何 模型上下文协议 客户端(例如,Claude Desktop、Claude Code、Cursor、Cline、Continue等)。
______________________________________________________________________
安装
选项1:单线安装(推荐)
# No cloning needed — runs directly from PyPI
uvx s2-mcp-server选项2:克劳德代码
claude mcp add semantic-scholar -- uvx s2-mcp-server选项3:克劳德桌面(Windows)
添加 %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"semantic-scholar": {
"command": "uvx",
"args": ["s2-mcp-server"],
"env": {
"SEMANTIC_SCHOLAR_API_KEY": "your-key-here"
}
}
}
}选项4:克劳德桌面(macOS)
添加 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"semantic-scholar": {
"command": "uvx",
"args": ["s2-mcp-server"],
"env": {
"SEMANTIC_SCHOLAR_API_KEY": "your-key-here"
}
}
}
}选项5:pip/来源
pip install s2-mcp-server
# or
git clone https://github.com/smaniches/semantic-scholar-mcp.git
cd semantic-scholar-mcp && pip install -e .选项6:Docker
docker pull ghcr.io/smaniches/semantic-scholar-mcp:latest
docker run -e SEMANTIC_SCHOLAR_API_KEY=your-key ghcr.io/smaniches/semantic-scholar-mcp注: 在获取免费API密钥 语义学院.org/product/api。如果没有密钥,您将获得速率受限的公共访问(1请求/秒)。
______________________________________________________________________
配置
API密钥选项
您可以通过两种方式提供API密钥:
- 环境变量 (建议长期使用):
export SEMANTIC_SCHOLAR_API_KEY="your-api-key-here"- 按请求参数 (覆盖env变量):
{
"api_key": "your-api-key-here"
}> 注意: 根据请求 api_key 值是工具调用的一部分 > 参数,可能在MCP记录、客户端日志和 > LLM的工具调用历史取决于客户。对于生产用途, > 更喜欢 SEMANTIC_SCHOLAR_API_KEY 环境变量。移除 > 针对v1.3.0跟踪每请求参数。
获取免费API密钥,网址:https://www.semanticscholar.org/product/api
Claude桌面设置
添加到您的Claude Desktop配置文件中:
窗户: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"semantic-scholar": {
"command": "python",
"args": ["-m", "semantic_scholar_mcp"],
"env": {
"SEMANTIC_SCHOLAR_API_KEY": "your-api-key-here"
}
}
}
}然后 重新启动克劳德桌面.
______________________________________________________________________
支持的ID格式
服务器接受以下纸张标识符格式:
| 格式 | 图案 | 示例 |
|---|---|---|
| 语义学者ID | 40字符十六进制 | 649def34f8be52c8b66281af98ae884c09aef38b |
| DOI | DOI:xxx | DOI:10.1038/s41586-021-03819-2 |
| ArXiv | ARXIV:xxx | ARXIV:2106.15928 或 ARXIV:2106.15928v2 |
| PubMed | PMID:xxx | PMID:32908142 |
| 语料库ID | CorpusId:xxx | CorpusId:215416146 |
| ACL | ACL:xxx | ACL:P19-1285 |
| URL | URL:xxx | URL:https://arxiv.org/abs/2106.15928 |
______________________________________________________________________
工具参考
1. semantic_scholar_search_papers
使用高级过滤器搜索学术论文。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | Yes | 搜索查询(支持AND、OR、NOT运算符和“短语搜索”) |
year | string | 否 | 年份筛选器: "2024", "2020-2024",或 "2020-" |
fields_of_study | string\[\] | 否 | 按字段筛选: ["Computer Science", "Biology"] |
publication_types | string\[\] | 否 | 按类型筛选: ["Review", "JournalArticle"] |
open_access_only | boolean | 否 | 仅返回开放获取论文(默认值:false) |
min_citation_count | integer | 否 | 最小引用计数 |
limit | integer | 否 | 最大结果1-100(默认值:10) |
offset | integer | 否 | 分页偏移量(默认值:0) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
例子:
Search for "transformer attention mechanism" papers from 2023 with at least 100 citationsJSON示例:
{
"query": "transformer attention mechanism",
"year": "2023",
"min_citation_count": 100,
"fields_of_study": ["Computer Science"],
"limit": 20
}______________________________________________________________________
2. semantic_scholar_get_paper
获取特定论文的详细信息。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
paper_id | string | 是 | 任何支持格式的纸张ID |
include_citations | boolean | 否 | 包括引用论文(默认值:false) |
include_references | boolean | 否 | 包括引用的论文(默认值:false) |
citations_limit | integer | 否 | 返回1-100的最大引用次数(默认值:10) |
references_limit | integer | 否 | 返回1-100的最大引用数(默认值:10) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
例子:
Get details for DOI:10.1038/s41586-021-03819-2 including its top 20 citationsJSON示例:
{
"paper_id": "DOI:10.1038/s41586-021-03819-2",
"include_citations": true,
"citations_limit": 20
}______________________________________________________________________
3. semantic_scholar_search_authors
按姓名搜索学术作者。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | 要搜索的作者姓名 |
limit | integer | 否 | 最大结果1-100(默认值:10) |
offset | integer | 否 | 分页偏移量(默认值:0) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
例子:
Find author "Yoshua Bengio"JSON示例:
{
"query": "Yoshua Bengio",
"limit": 5
}______________________________________________________________________
4. semantic_scholar_get_author
通过出版物获取作者资料。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
author_id | string | 是 | 语义学者作者ID |
include_papers | boolean | 否 | 包括发布(默认值:true) |
papers_limit | integer | 否 | 返回的最大论文数1-100(默认值:20) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
例子:
Get author profile for author ID 1741101 with their top 50 publicationsJSON示例:
{
"author_id": "1741101",
"include_papers": true,
"papers_limit": 50
}______________________________________________________________________
5. semantic_scholar_recommendations
基于种子论文获取人工智能支持的论文推荐。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
paper_id | string | 是 | 任何支持格式的种子纸ID |
limit | integer | 否 | 最大建议值1-100(默认值:10) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
例子:
Get recommendations based on paper 649def34f8be52c8b66281af98ae884c09aef38bJSON示例:
{
"paper_id": "ARXIV:1706.03762",
"limit": 15
}______________________________________________________________________
6. semantic_scholar_bulk_papers
在一次请求中检索多篇论文(最多500篇)。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
paper_ids | string\[\] | 是 | 纸张ID列表(最多500个) |
response_format | string | 否 | "markdown" 或 "json" (默认值:json) |
api_key | string | No | 覆盖环境API键 |
例子:
Retrieve these papers: DOI:10.1038/nature12373, ARXIV:2106.15928, PMID:32908142JSON示例:
{
"paper_ids": [
"DOI:10.1038/nature12373",
"ARXIV:2106.15928",
"PMID:32908142"
]
}______________________________________________________________________
7. semantic_scholar_bulk_search
使用排序和基于光标的分页搜索大型结果集的论文。 不像 search_papers,支持a sort 订购并返回a token 为了 浏览所有结果。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | 搜索查询 |
sort | string | 否 | 排序顺序,例如。 "citationCount:desc", "publicationDate:asc" |
token | string | 否 | 来自先前bulk_search响应的继续标记 |
year | string | 否 | 年份筛选器: "2024", "2020-2024", "2020-" |
fields_of_study | string\[\] | 否 | 按字段筛选: ["Computer Science"] |
publication_types | string\[\] | 否 | 按类型筛选: ["Review", "JournalArticle"] |
min_citation_count | integer | 否 | 最小引用计数 |
limit | integer | 否 | 每页最大结果1-1000(默认值:100) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
JSON示例:
{
"query": "graph neural networks",
"sort": "citationCount:desc",
"year": "2020-2024",
"limit": 100
}退货: 总结果计数、论文页数和 token 为了 下一页(当有更多结果时)。
______________________________________________________________________
8. semantic_scholar_export_citation
以BibTeX格式导出论文的引用。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
paper_id | string | 是 | 任何支持格式的纸张ID |
format | string | 否 | 引文格式(目前仅 "bibtex") |
api_key | string | No | 覆盖环境API键 |
JSON示例:
{
"paper_id": "DOI:10.1038/s41586-021-03819-2",
"format": "bibtex"
}退货: 所请求论文的BibTeX字符串。
______________________________________________________________________
9. semantic_scholar_match_paper
查找与标题字符串匹配的最佳论文。返回一个数字 matchScore 在匹配的纸张旁边。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | 要匹配的论文标题(1-500个字符) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
JSON示例:
{
"query": "Attention Is All You Need"
}退货: 最佳匹配的纸张及其 matchScore,或“不匹配 纸找到了。“如果没有比赛。
______________________________________________________________________
10. semantic_scholar_paper_authors
获取论文作者的完整作者简介(比缩写更丰富 作者列表由返回 get_paper).
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
paper_id | string | 是 | 任何支持格式的纸张ID |
limit | integer | 否 | 返回的最大作者数1-1000(默认值:100) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
JSON示例:
{
"paper_id": "ARXIV:1706.03762",
"limit": 25
}退货: 这篇论文的完整作者记录列表。
______________________________________________________________________
11. semantic_scholar_author_batch
在单个请求中检索多个作者(最多1000个)。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
author_ids | string\[\] | 是 | 作者ID列表(1-1000) |
response_format | string | 否 | "markdown" 或 "json" (默认值:json) |
api_key | string | No | 覆盖环境API键 |
JSON示例:
{
"author_ids": ["1741101", "40348417", "144749327"]
}退货: 计数 requested / retrieved,检索到的作者 记录,以及a not_found API未返回的ID列表。
______________________________________________________________________
12. semantic_scholar_multi_recommend
使用多个正面(和可选的负面)示例获取建议 纸张。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
positive_paper_ids | string\[\] | 是 | 查找(1-100)类似结果的论文 |
negative_paper_ids | string\[\] | 否 | 要异化的论文(0-100) |
limit | integer | 否 | 最大建议值1-500(默认值:10) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
JSON示例:
{
"positive_paper_ids": ["ARXIV:1706.03762", "ARXIV:1810.04805"],
"negative_paper_ids": ["DOI:10.1038/nature14539"],
"limit": 20
}退货: 推荐的论文加上积极/消极的回应 使用种子。
______________________________________________________________________
13. semantic_scholar_snippet_search
在纸张中搜索全文,并返回带有周围文字的文本片段 背景。 在没有API密钥的情况下进行了严格的速率限制。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | 搜索纸质文本(1-500个字符) |
paper_ids | string\[\] | 否 | 限制搜索特定论文(最多100篇) |
year | string | 否 | 年份筛选器: "2024", "2020-2024", "2020-" |
fields_of_study | string\[\] | 否 | 按字段筛选: ["Computer Science"] |
min_citation_count | integer | 否 | 最小引用计数 |
limit | integer | 否 | 最大结果1-100(默认值:10) |
response_format | string | 否 | "markdown" 或 "json" (默认值:markdown) |
api_key | string | No | 覆盖环境API键 |
JSON示例:
{
"query": "scaling laws for language models",
"year": "2022-2024",
"limit": 20
}退货: 匹配片段,每个片段都有源论文标题、章节、, 以及一段简短的文本摘录。
______________________________________________________________________
14. semantic_scholar_status
检查服务器运行状况和API连接状态。
参数: 无
例子:
Check Semantic Scholar API status答复:
{
"server": "semantic-scholar-mcp",
"version": "1.2.2",
"api_key_configured": true,
"timestamp": "2026-04-06T12:00:00.000000+00:00",
"api_reachable": true
}______________________________________________________________________
速率限制
| Tier | 请求/秒 | 如何获取 |
|---|---|---|
| 无API密钥 | 1请求/秒 | 默认值 |
| 免费API密钥 | 1请求/秒 | 注册 |
| 学术伙伴 | 10-100次/秒 | 通过S2申请 |
服务器通过以下方式自动处理速率限制:
- 请求序列化以强制执行最小间隔
- 429(速率限制)和503(服务不可用)错误的指数回退重试
- 最多3次抖动重试
______________________________________________________________________
建筑
+-----------------+ +----------------------+ +-----------------+
| Claude Desktop |---->| semantic-scholar-mcp |---->| Semantic Scholar|
| (MCP Client) |Built by TOPOLOGICA LLC
Advancing computational research through topological intelligence