返回市场
论文搜索-Node.js

论文搜索-Node.js

作者:Dianel55529 星标更新:2025-09-17

项目介绍

Paper Search MCP (Node.js)

英文|中文

一个用于从多个来源(包括 arXiv、Web of Science、PubMed、Google Scholar、Sci-Hub、ScienceDirect、Springer、Wiley、Scopus 和 13 个学术平台)搜索和下载学术论文的 Node.js Model Context Protocol (MCP) 服务器。

Node.js TypeScript License Platforms

✨ 主要特性

  • 🌍 13 个学术平台: arXiv, Web of Science, PubMed, Google Scholar, bioRxiv, medRxiv, Semantic Scholar, IACR ePrint, Sci-Hub, ScienceDirect, Springer Nature, Wiley, Scopus
  • 🔗 MCP 协议集成: 与 Claude Desktop 和其他 AI 助手无缝集成
  • 📊 统一数据模型: 所有平台的标准论文格式
  • ⚡ 高性能搜索: 并发搜索和智能限速
  • 🛡️ 类型安全: 完整的 TypeScript 支持
  • 🎯 学术论文优先: 智能过滤,优先考虑学术论文而非书籍
  • 🔄 智能错误处理: 平台回退和自动重试机制

📚 支持的平台

平台搜索下载全文引用API 密钥特殊功能
arXiv物理/计算机科学预印本
Web of Science✅ 必需高质量期刊索引
PubMed🟡 可选生物医学文献
Google Scholar综合学术搜索
bioRxiv生物学预印本
medRxiv医学预印本
Semantic Scholar🟡 可选AI 语义搜索
IACR ePrint密码学论文
Sci-Hub通过 DOI 访问所有论文
ScienceDirect✅ 必需Elsevier 的全文数据库
Springer Nature✅*✅ 必需双 API: Meta v2 & OpenAccess
Wiley✅ 必需文本和数据挖掘 API
Scopus✅ 必需最大的引文数据库

✅ 支持 | ❌ 不支持 | 🟡 可选 | ✅* 仅开放访问

🚀 快速开始

系统要求

  • Node.js >= 18.0.0
  • npm 或 yarn

安装

# 克隆仓库
git clone https://github.com/your-username/paper-search-mcp-nodejs.git
cd paper-search-mcp-nodejs

# 安装依赖
npm install

# 复制环境模板
cp .env.example .env

配置

  1. 获取 Web of Science API 密钥

  2. 获取 PubMed API 密钥(可选)

    • 无 API 密钥:免费使用,每秒 3 次请求限制
    • 有 API 密钥:每秒 10 次请求,更稳定的服务
    • 获取密钥:参见 NCBI API 密钥
  3. 配置环境变量

    # 编辑 .env 文件
    WOS_API_KEY=your_actual_api_key_here
    WOS_API_VERSION=v1
    
    # PubMed API 密钥(可选,推荐以获得更好的性能)
    PUBMED_API_KEY=your_ncbi_api_key_here
    
    # Semantic Scholar API 密钥(可选,增加速率限制)
    SEMANTIC_SCHOLAR_API_KEY=your_semantic_scholar_api_key
    
    # Elsevier API 密钥(ScienceDirect 和 Scopus 必需)
    ELSEVIER_API_KEY=your_elsevier_api_key
    
    # Springer Nature API 密钥(Springer 必需)
    SPRINGER_API_KEY=your_springer_api_key  # 用于 Metadata API v2
    # 可选:OpenAccess API 的单独密钥(如果与主密钥不同)
    SPRINGER_OPENACCESS_API_KEY=your_openaccess_api_key
    
    # Wiley TDM 令牌(Wiley 必需)
    WILEY_TDM_TOKEN=your_wiley_tdm_token
    

构建和运行

方法 1: NPX(推荐用于 MCP)

# 使用 npx 直接运行(最常见的 MCP 部署方式)
npx -y paper-search-mcp-nodejs

# 或者全局安装
npm install -g paper-search-mcp-nodejs
paper-search-mcp

方法 2: 本地开发

# 构建 TypeScript 代码
npm run build

# 启动服务器
npm start

# 或者在开发模式下运行
npm run dev

MCP 服务器配置

将以下配置添加到您的 Claude Desktop 配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

NPX 配置(推荐)

{
  "mcpServers": {
    "paper-search-nodejs": {
      "command": "npx",
      "args": ["-y", "paper-search-mcp-nodejs"],
      "env": {
        "WOS_API_KEY": "your_web_of_science_api_key"
      }
    }
  }
}

本地安装配置

{
  "mcpServers": {
    "paper_search_nodejs": {
      "command": "node",
      "args": ["/path/to/paper-search-mcp-nodejs/dist/server.js"],
      "env": {
        "WOS_API_KEY": "your_web_of_science_api_key"
      }
    }
  }
}

🛠️ MCP 工具

search_papers

跨多个平台搜索学术论文

// 随机选择平台(默认行为)
search_papers({
  query: "机器学习",
  platform: "all",      // 随机选择一个平台以提高效率
  maxResults: 10,
  year: "2023",
  sortBy: "date"
})

// 搜索特定平台
search_papers({
  query: "量子计算",
  platform: "webofscience",  // 针对特定平台
  maxResults: 5
})

平台选择行为:

  • platform: "all" - 随机选择一个平台以高效、聚焦的结果
  • 特定平台 - 仅搜索该平台
  • 可用平台: arxiv, webofscience/wos, pubmed, biorxiv, medrxiv, semantic, iacr, googlescholar/scholar, scihub, sciencedirect, springer, wiley, scopus

search_arxiv

专门搜索 arXiv 预印本

search_arxiv({
  query: "变压器神经网络",
  maxResults: 10,
  category: "cs.AI",
  author: "注意力"
})

search_webofscience

专门搜索 Web of Science 数据库

search_webofscience({
  query: "CRISPR 基因编辑",
  maxResults: 15,
  year: "2022",
  journal: "Nature"
})

search_pubmed

搜索 PubMed/MEDLINE 生物医学文献数据库

search_pubmed({
  query: "COVID-19 疫苗效力",
  maxResults: 20,
  year: "2023",
  author: "Smith",
  journal: "New England Journal of Medicine",
  publicationType: ["Journal Article", "Clinical Trial"]
})

search_google_scholar

搜索 Google Scholar 学术数据库

search_google_scholar({
  query: "机器学习",
  maxResults: 10,
  yearLow: 2020,
  yearHigh: 2023,
  author: "Bengio"
})

search_biorxiv / search_medrxiv

搜索生物学和医学预印本

search_biorxiv({
  query: "CRISPR",
  maxResults: 15,
  days: 30
})

search_semantic_scholar

搜索 Semantic Scholar AI 语义数据库

search_semantic_scholar({
  query: "深度学习",
  maxResults: 10,
  fieldsOfStudy: ["Computer Science"],
  year: "2023"
})

search_iacr

搜索 IACR ePrint 密码学档案

search_iacr({
  query: "零知识证明",
  maxResults: 5,
  fetchDetails: true
})

search_scihub

使用 DOI 或论文 URL 从 Sci-Hub 搜索和下载论文

search_scihub({
  doiOrUrl: "10.1038/nature12373",
  downloadPdf: true,
  savePath: "./downloads"
})

check_scihub_mirrors

检查 Sci-Hub 镜像站点的健康状态

check_scihub_mirrors({
  forceCheck: true  // 强制进行新的健康检查
})

download_paper

下载论文 PDF 文件

download_paper({
  paperId: "2106.12345",  // 或 Sci-Hub 的 DOI
  platform: "arxiv",      // 或 "scihub" 用于 Sci-Hub 下载
  savePath: "./downloads"
})

get_paper_by_doi

通过 DOI 获取论文信息

get_paper_by_doi({
  doi: "10.1038/s41586-023-12345-6",
  platform: "all"
})

get_platform_status

检查平台状态和 API 密钥

get_platform_status({})

📊 数据模型

所有平台的论文数据都转换为统一格式:

interface Paper {
  paperId: string;           // 唯一标识符
  title: string;            // 论文标题
  authors: string[];        // 作者列表
  abstract: string;         // 摘要
  doi: string;             // DOI
  publishedDate: Date;     // 发表日期
  pdfUrl: string;          // PDF 链接
  url: string;             // 论文页面 URL
  source: string;          // 来源平台
  citationCount?: number;   // 引用次数
  journal?: string;         // 期刊名称
  year?: number;           // 发表年份
  categories?: string[];    // 主题类别
  keywords?: string[];      // 关键词
  // ... 更多字段
}

🔧 开发

项目结构

src/
├── models/
│   └── Paper.ts              # 论文数据模型
├── platforms/
│   ├── PaperSource.ts        # 抽象基类
│   ├── ArxivSearcher.ts      # arXiv 搜索器
│   ├── WebOfScienceSearcher.ts # Web of Science 搜索器
│   ├── PubMedSearcher.ts     # PubMed 搜索器
│   ├── GoogleScholarSearcher.ts # Google Scholar 搜索器
│   ├── BioRxivSearcher.ts    # bioRxiv/medRxiv 搜索器
|   ├── SemanticScholarSearcher.ts # Semantic Scholar 搜索器
|   ├── IACRSearcher.ts       # IACR ePrint 搜索器
|   ├── SciHubSearcher.ts     # Sci-Hub 搜索器,带有镜像管理
|   ├── ScienceDirectSearcher.ts # ScienceDirect (Elsevier) 搜索器
│   ├── SpringerSearcher.ts   # Springer Nature 搜索器(Meta v2 & OpenAccess APIs)
|   ├── WileySearcher.ts      # Wiley TDM API 搜索器
|   └── ScopusSearcher.ts     # Scopus 引文数据库搜索器
├── utils/
│   └── RateLimiter.ts        # 令牌桶限速器
└── server.ts                 # MCP 服务器主文件

添加新平台

  1. 创建新的搜索器类,继承自 PaperSource
  2. 实现所需的抽象方法
  3. server.ts 中注册新的搜索器
  4. 添加相应的 MCP 工具

测试

# 运行测试
npm test

# 运行代码检查
npm run lint

# 代码格式化
npm run format

🌟 平台特定功能

Springer Nature 双 API 系统

Springer Nature 提供两个 API:

  1. Metadata API v2(主 API)

    • 终端: https://api.springernature.com/meta/v2/json
    • 搜索所有 Springer 内容(订阅 + 开放访问)
    • 需要 API 密钥,从 https://dev.springernature.com/ 获取
  2. OpenAccess API(可选)

    • 终端: https://api.springernature.com/openaccess/json
    • 仅搜索开放访问内容
    • 可能需要单独的 API 密钥或特殊权限
    • 更适合查找可下载的 PDF
// 搜索所有 Springer 内容
search_springer({
  query: "机器学习",
  maxResults: 10
})

// 搜索仅开放访问的论文
search_springer({
  query: "COVID-19",
  openAccess: true,  // 如果可用则使用 OpenAccess API
  maxResults: 5
})

Web of Science 高级搜索

// 使用 Web of Science 查询语法
search_webofscience({
  query: 'TS="机器学习" AND PY=2023',
  maxResults: 20
})

// 作者搜索
search_webofscience({
  query: 'AU="Smith, J*"',
  maxResults: 10
})

// 期刊搜索
search_webofscience({
  query: 'SO="Nature" AND PY=2022-2023',
  maxResults: 15
})

支持的字段:

  • TS: 主题搜索
  • AU: 作者
  • SO: 来源期刊
  • PY: 发表年份
  • DO: DOI
  • TI: 标题

Google Scholar 功能

  • 学术论文优先: 自动过滤掉书籍,优先考虑同行评审的论文
  • 引用数据: 提供引用次数和学术指标
  • 反检测: 智能请求模式以避免被封禁
  • 全面覆盖: 搜索所有学术出版商

Semantic Scholar 功能

  • AI 驱动搜索: 语义理解查询
  • 引用网络: 论文关系和影响力指标
  • 开放访问 PDF: 直接链接到免费可用的论文
  • 研究领域: 按特定学术学科筛选

Sci-Hub 功能

  • 通用访问: 使用 DOI 或直接 URL 访问论文
  • 镜像网络: 自动检测并使用最快的可用镜像(11+ 镜像)
  • 健康监控: 持续监控镜像站点的可用性
  • 自动故障转移: 当一个镜像失败时无缝切换到其他镜像
  • 智能重试: 失败时自动使用不同的镜像重试
  • 响应时间优化: 按响应时间排序镜像以获得最佳性能

📝 许可证

MIT 许可证 - 详情请参阅 LICENSE 文件。

🤝 贡献

欢迎贡献!详见 CONTRIBUTING.md 文件中的指南。

  1. 叉取项目
  2. 创建功能分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m '添加了神奇的功能')
  4. 推送到分支 (git push origin feature/amazing-feature)
  5. 打开 Pull Request

🐛 问题报告

如果您遇到问题,请在 GitHub Issues 中报告。

🙏 致