科学取纸器 MCP 服务器
一个全面的模型背景协议(MCP)服务器,它为LLMS提供实时访问来自 6个主要学术来源:arXiv,OpenAlex,PMC(PubMed Central),欧洲PMC,BioRxiv/medRxiv,和CORE.
* 特性
综合来源覆盖率
- 阿尔谢夫:计算机科学,物理,数学预印和论文
- 打开亚历山大: 有引用数据的学术论文开放目录
- PMC 移动: PubMed 中央生物医学和生命科学文献
- 欧洲PMC: 欧洲生命科学文献数据库
- bioRxiv/medRxiv: 生物学和医学预印服务器
- 核心:世界最大的公开查阅研究论文集
高级能力
- 纸张获取: 按类别/概念从任何来源获得最新论文
- 纸张搜索:按标题、摘要、作者或全文搜索文件,涉及4个主要来源
- 全文提取: 提取带有智能倒置策略的完整文本内容
- 引用分析: 从 OpenAlex 中查找自特定日期起引用的顶端文件
- 查找纸张:用ID检索特定文件的完整元数据
- 类别 发现: 从所有来源浏览可用的类别
- 智能利率限制: 尊重 API 使用,限制每源费率
- DOI 分辨率: 高级 DOI 解析器与 Unpaywall → Crossref → 语义学者倒置
- 双界面: MCP 协议和 CLI 访问
- 类型脚本:带有无害环境管理模块的完整类型安全
* 覆盖面统计
- 来源共计:6个学术数据库
- 类别: 所有学科100个以上类别
- 纸张访问: 200M+ 具有智能文本提取功能的纸张
- 文本提取成功: >90%用于支持的纸张类型
- 反应时间: < 15 秒平均取纸
* 安装
npm install
npm run build
QQ MCP 客户端配置
要使用这个带有 MCP 客户端的服务器( 如 Claude Desktop), 请在您的 MCP 客户端配置中添加以下内容 :
对于已出版的软件包( npm 有):
备选案文1:使用npx(推荐给克劳德等AI工具)
{
"mcpServers": {
"scientific-papers": {
"command": "npx",
"args": [
"-y",
"@futurelab-studio/latest-science-mcp@latest"
]
}
}
}
备选方案2:全球安装
npm install -g @futurelab-studio/latest-science-mcp
然后配置 :
{
"mcpServers": {
"scientific-papers": {
"command": "latest-science-mcp"
}
}
}
使用量
CLI 接口
列表类别
# List arXiv categories
node dist/cli.js list-categories --source=arxiv
# List OpenAlex concepts
node dist/cli.js list-categories --source=openalex
# List PMC biomedical categories
node dist/cli.js list-categories --source=pmc
# List Europe PMC life science categories
node dist/cli.js list-categories --source=europepmc
# List bioRxiv/medRxiv categories (includes both servers)
node dist/cli.js list-categories --source=biorxiv
# List CORE academic categories
node dist/cli.js list-categories --source=core
获取最新文档
# Get latest AI papers from arXiv
node dist/cli.js fetch-latest --source=arxiv --category=cs.AI --count=10
# Get latest biology papers from bioRxiv
node dist/cli.js fetch-latest --source=biorxiv --category="biorxiv:biology" --count=5
# Get latest immunology papers from PMC
node dist/cli.js fetch-latest --source=pmc --category=immunology --count=3
# Get latest papers from CORE by subject
node dist/cli.js fetch-latest --source=core --category=computer_science --count=5
# Search by concept name (OpenAlex)
node dist/cli.js fetch-latest --source=openalex --category="machine learning" --count=3
获取引用最多的文档
# Get top 20 cited papers in machine learning since 2024
node dist/cli.js fetch-top-cited --concept="machine learning" --since=2024-01-01 --count=20
# Get top cited papers by concept ID
node dist/cli.js fetch-top-cited --concept=C41008148 --since=2023-06-01 --count=10
搜索文档
# Search by keywords across all fields
node dist/cli.js search-papers --source=arxiv --query="machine learning" --count=10
# Search by paper title
node dist/cli.js search-papers --source=openalex --query="neural networks" --field=title --count=5
# Search by author name
node dist/cli.js search-papers --source=europepmc --query="John Smith" --field=author --count=10
# Search full-text content sorted by citations
node dist/cli.js search-papers --source=core --query="climate change" --field=fulltext --sortBy=citations --count=20
获取特定的纸张内容
# Get arXiv paper by ID
node dist/cli.js fetch-content --source=arxiv --id=2401.12345
# Get bioRxiv paper by DOI
node dist/cli.js fetch-content --source=biorxiv --id="10.1101/2021.01.01.425001"
# Get PMC paper by ID
node dist/cli.js fetch-content --source=pmc --id=PMC8245678
# Get CORE paper by ID
node dist/cli.js fetch-content --source=core --id=12345678
# Show text content with preview
node dist/cli.js fetch-content --source=arxiv --id=2401.12345 --show-text --text-preview=500
可用的工具
list_categories
列出来自任何数据来源的现有类别/概念.
参数:
source数字 :"arxiv"|"openalex"|"pmc"|"europepmc"|"biorxiv"|"core"
回返情况:
- 类别对象矩阵
id, (中文(简体) ),name选择description
实例:
{
"name": "list_categories",
"arguments": {
"source": "biorxiv"
}
}
fetch_latest
以 只有元数据 (不取出文本).
参数:
source数字 :"arxiv"|"openalex"|"pmc"|"europepmc"|"biorxiv"|"core"category: 类别ID或概念名称(按来源分列)count: 要获取的纸张数量( 默认: 50, 最大: 200)
按来源分列的实例:
- 阿尔谢夫数字 :
"cs.AI", (中文(简体) ),"physics.gen-ph", (中文(简体) ),"math.CO" - 打开亚历山大数字 :
"artificial intelligence", (中文(简体) ),"machine learning", (中文(简体) ),"C41008148" - PMC 移动数字 :
"immunology", (中文(简体) ),"genetics", (中文(简体) ),"neuroscience" - 欧洲PMC数字 :
"biology", (中文(简体) ),"medicine", (中文(简体) ),"cancer" - bioRxiv/medRxiv数字 :
"biorxiv:neuroscience", (中文(简体) ),"medrxiv:psychiatry" - 核心数字 :
"computer_science", (中文(简体) ),"mathematics", (中文(简体) ),"physics"
回返情况:
- 带有元数据( id、 标题、 作者、 日期、 pdf url) 的纸张对象阵列
- 文本字段: 空字符串 (
text: "") - 使用fetch_content全文
fetch_top_cited
从 OpenAlex 为特定的概念获取引用的顶端文件.
参数:
concept: 概念名称或 OpenAlex 概念 IDsince: YYY- MM- DD 格式的起始日期count: 要获取的纸张数量( 默认: 50, 最大: 200)
search_papers
搜索多个学术来源的论文,并有针对特定领域的搜索和排序选项.
参数:
source数字 :"arxiv"|"openalex"|"europepmc"|"core"query: 搜索查询字符串(最大 1500 个字符)field数字 :"all"|"title"|"abstract"|"author"|"fulltext"(默认:"全部")count: 返回的结果数量( 默认: 50, 最大: 200)sortBy数字 :"relevance"|"date"|"citations"(默认:"相关")
按来源分列的搜索能力 :
- 阿尔谢夫: 标题、 抽象、 作者、 和布尔运算符的一般搜索
- 打开亚历山大: 有相关评分和引用排序的高级搜索
- 欧洲PMC:有MESH术语和全文搜索的生物医学文献
- 核心:具有高级查询语言的全球学术论文
示例查询:
- 关键词 :
"machine learning", (中文(简体) ),"climate change" - 措辞 :
"artificial intelligence"(确切短语使用引文) - 布尔 :
"deep learning AND neural networks"(arXiv支持这一点) - 作者数 :
"John Smith", (中文(简体) ),"Smith J"
回返情况:
- 带有元数据( id、 标题、 作者、 日期、 pdf url) 的纸张对象阵列
- 文本字段: 空字符串 (
text: "") - 使用fetch_content全文
fetch_content
用 ID 获取特定纸张的完整元数据和文本内容 完整文本提取。 。 。 .
参数:
source: 6个支助来源中的任何一个id: 纸张标识(格式因来源而异)
按来源分列的ID格式 :
- 阿尔谢夫数字 :
"2401.12345", (中文(简体) ),"cs/0601001", (中文(简体) ),"1234.5678v2" - 打开亚历山大数字 :
"W2741809807"数字2741809807 - PMC 移动数字 :
"PMC8245678"或者说"12345678" - 欧洲PMC数字 :
"PMC8245678", (中文(简体) ),"12345678",或者道尔 - bioRxiv/medRxiv数字 :
"10.1101/2021.01.01.425001"或者说"2021.01.01.425001" - 核心: 数字标识像
"12345678"
QQ 纸张元数据格式
所有工具返回具有下列结构的纸张对象:
{
id: string; // Paper ID
title: string; // Paper title
authors: string[]; // List of author names
date: string; // Publication date (ISO format)
pdf_url?: string; // PDF URL (if available)
text: string; // Extracted full text content
textTruncated?: boolean; // Warning: text was truncated due to size limits
textExtractionFailed?: boolean; // Warning: text extraction failed
}
高级文本提取
多来源战略
每个来源都有专门的文本提取方法:
- 阿尔谢夫: HTML 从
arxiv.org/html与ar5iv.labs.arxiv.org倒计时 - 打开亚历山大: HTML 来源,带有 DOI 解析器倒置链
- PMC 移动: 带有 XML/HTML 提取的电子用途 API
- 欧洲PMC: REST API 有多个 URL 策略
- bioRxiv/medRxiv: 有抽象倒置的直接 HTML 提取
- 核心: PDF/HTML 有源 URL回落
DOI 解析链
具有多个倒置策略的高级 DOI 解析器 :
- 无薪墙 • 自由全文来源
- 交叉 • 出版商元数据和链接
- 语义学者学术图 ■ 替代性准入
性能可靠性( R)
- 文本提取成功: > HTML 可用纸张的90%
- 重大退化: 即使文本提取失败, 总是返回元数据
- 大小管理: 6MB 文本限制并带有智能切换功能
- 缓存: 用于 DOI 分辨率的24小时 LRU 缓存
* 限制费率
尊重 API 的使用, 限制每个源率 :
- 阿尔谢夫: 每分钟5个请求
- 打开亚历山大:每分钟10个请求
- PMC 移动: 每秒3个请求
- 欧洲PMC:每分钟10个请求
- bioRxiv/medRxiv: 每分钟5个请求
- 核心: 每分钟10个请求(公开),高于API密钥
CORE API 配置
为增强CORE访问,设置环境变量:
export CORE_API_KEY="your-api-key"
测试
运行测试套件
# Run all tests
npm test
# Run integration tests
npm run test -- tests/integration
# Run end-to-end workflow tests
npm run test -- tests/e2e
# Run performance benchmarks
npm run test -- tests/integration/performance.test.ts
测试范围
- 整合测试: 所有6个经测试的源端对端
- 性能测试答复时间和吞吐量基准
- 工作流程测试: 跨多个来源的真正研究设想
- 单位测试页:1
建筑
模块驱动系统
- 来源之间的清洁分离
- 在所有驱动器之间一致的接口
- 每个来源的专门文本提取
高级特性
- DOI 分辨率: 多供应商倒置链
- 限制费率: 每个源的托肯桶算法
- 文本处理: HTML 清洗和正常化
- 处理错误: 附有可采取行动的建议的结构化答复
- 缓存: 为 DOI 解析而设置智能缓存
技术堆栈
- 类型脚本+无害环境管理: 具有完整类型安全的现代 JavaScript
- 模块设计: 各项关切的清理分离
- 重大退化: 即使部分失败, 也总是起作用
- 响应大小管理: 自动截取和警告
QQ 源比较
| 来源 | 论文 | 纪律 | 全文 | 引用数据 | 预印 | 搜索 |
|---|---|---|---|---|---|---|
| 阿尔谢夫 | 2.3M+ 维基月球 | 钢铁 | HTML 语句 | 有限 | ✓ | ✓✓✓ |
| 打开亚历山大 | 200海里+ | 全体 | 变量 | ✓✓✓ | ✓ | ✓✓✓ |
| PMC 移动 | 7M+ 调用 | 生物医学 | XML/HTML 数据 | 有限 | ✗ | 有限 |
| 欧洲PMC | 40海里+ | 生命科学 | HTML 语句 | 有限 | ✓ | ✓✓✓ |
| bioRxiv/medRxiv | 500K+ 时速 | 生物/医疗 | HTML 语句 | 有限 | ✓✓✓ | 有限 |
| 核心 | 200海里+ | 全体 | PDF/HTML ∗ | 有限 | ✓ | ✓✓✓ |
发展
构建
npm run build
测试单个源
# Test specific sources
node dist/cli.js list-categories --source=arxiv
node dist/cli.js fetch-latest --source=biorxiv --category="biorxiv:biology" --count=3
node dist/cli.js fetch-content --source=core --id=12345678
# Test search functionality
node dist/cli.js search-papers --source=arxiv --query="artificial intelligence" --count=5
node dist/cli.js search-papers --source=openalex --query="quantum computing" --field=title --count=3
性能测试
# Run performance benchmarks
npm run test -- tests/integration/performance.test.ts
# Test memory usage
npm run test -- --reporter=verbose
QQ 错误处理
所有来源的全面错误处理 :
- 带有格式建议无效的纸张标识符
- 使用重试后的信息限制费率
- API 超时和服务器出错
- 缺少认证( CORE API 密钥)
- 网络连接问题
- 带有倒置策略的文本提取失败
* 解决问题
共同问题
- 限制费率: 自动重试, 以指数回放
- 遗失证件: 尝试相同内容的替代来源
- 文本提取失败: 回落到抽象或元数据
- CORE API 限制设置
CORE_API_KEY环境变量
性能优化
- 适当使用
count参数(用于更快反应的较小) - 可能时缓存结果
- 使用
fetch_latest用于发现,fetch_content详细阅读
许可证
麻省理工学院
准备好探索世界科学知识了吗? 从6个来源中的任何一个开始,发现所有学术学科的论文! 🔬📚