npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

article-mcp

v0.3.1

Published

Article MCP文献搜索服务器 - Node.js implementation

Readme

Article MCP

npm version License: MIT

基于 Model Context Protocol (MCP) 的学术文献检索服务器。帮助 LLM 搜索、获取和分析多数据源学术文献。

主要用途:面向学术文献与科研论文检索分析,尤其适合医学、生命科学和跨学科科研场景;同时支持 arXiv 等通用科研预印本来源。

适用范围

适用于需要 LLM 进行以下操作的场景:

  • 学术写作辅助 — 查找最新研究文献作为引用来源
  • 文献综述 — 跨多个学术数据库检索和分析文献
  • 期刊质量评估 — 评估目标期刊的学术影响力(影响因子、分区等)
  • 文献关系分析 — 构建引用网络、发现相似文献

支持 6 个学术数据源:Europe PMC、PubMed、arXiv、CrossRef、OpenAlex、Semantic Scholar。

注意: 本工具返回文献元数据(标题、作者、摘要、PMCID、DOI 等)。全文获取需通过 get_article_details 工具,且仅限 PMC 开放获取文章。

快速开始

系统要求: Node.js 18+

# 直接运行(推荐,自动获取最新版本)
npx article-mcp@latest

# 或全局安装
npm install -g article-mcp
article-mcp

Claude Desktop 配置

{
  "mcpServers": {
    "article-mcp": {
      "command": "npx",
      "args": ["article-mcp@latest"],
      "env": {
        "OPENALEX_API_KEY": "your_openalex_key_here",
        "EASYSCHOLAR_SECRET_KEY": "your_easyscholar_key_here"
      }
    }
  }
}

VS Code 配置

.vscode/mcp.json 中添加:

{
  "servers": {
    "article-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["article-mcp@latest"],
      "env": {
        "OPENALEX_API_KEY": "your_openalex_key_here",
        "EASYSCHOLAR_SECRET_KEY": "your_easyscholar_key_here"
      }
    }
  }
}

Windows 用户: 如果遇到 npx 无法识别的问题,将 "command" 改为 "cmd""args" 改为 ["/c", "npx", "article-mcp@latest"]

功能特性

| 功能 | 工具 | 说明 | | ------------------- | -------------------------- | ------------------------------------------------------------- | | 🔍 多源文献搜索 | search_literature | 跨 5 个数据源并行搜索,支持 4 种搜索策略,自动去重排序 | | 📄 文献全文获取 | get_article_details | 通过 PMCID 获取 PMC 全文(Markdown/XML/Text),支持批量 20 篇 | | 📚 参考文献获取 | get_references | 多源获取参考文献列表,智能 DOI/标题去重,源优先级排序 | | 🔗 文献关系分析 | get_literature_relations | 引用网络、施引文献、相似文献,支持多深度网络分析 | | 📊 期刊质量评估 | get_journal_quality | 影响因子、JCR 分区、JCI、中科院分区、h 指数等,双数据源互补 |

工具说明

search_literature — 文献搜索

查找文献并获取 PMCID(不含全文)。如需全文,用返回的 PMCID 调用 get_article_details

| 参数 | 类型 | 默认值 | 说明 | | ------------- | -------- | --------------- | ---------------------------------------------------------------------------------------------- | | keyword | string | 必填 | 搜索关键词 | | search_type | enum | comprehensive | 搜索策略:comprehensive(全面)、fast(快速)、precise(精确交集)、preprint(预印本) | | sources | string[] | 按策略选择 | 数据源:europe_pmcpubmedarxivcrossrefopenalex | | max_results | integer | 10 | 每个源的最大结果数,范围 1-100 | | use_cache | boolean | true | 是否使用 24 小时文件缓存 |

get_article_details — 文献全文

通过 PMCID 获取全文内容。仅支持 PMC 开放获取文章。

返回说明:fulltext.content 返回所选格式的完整正文;fulltext.preview 是用于快速浏览的 1200 字符预览;fulltext.content_length 标识完整正文长度。

| 参数 | 类型 | 默认值 | 说明 | | ---------- | -------------------------- | ---------- | ----------------------------------------------- | | pmcid | string | string[] | 必填 | PMCID 标识符,批量最多 20 个 | | format | enum | markdown | 全文格式:markdownxmltext | | sections | string | string[] | null | null | null 获取全部章节;传入章节名列表获取指定部分 |

get_references — 参考文献

获取某文献引用的参考文献列表。

| 参数 | 类型 | 默认值 | 说明 | | ------------------ | -------- | ------------------------------------ | ------------------------------------------ | | identifier | string | 必填 | DOI、PMID 或 PMCID | | id_type | enum | doi | 标识符类型:autodoipmidpmcid | | max_results | integer | 20 | 最大参考文献数量,范围 1-100 | | sources | string[] | ["europe_pmc","crossref","pubmed"] | 数据源 | | include_metadata | boolean | true | 是否包含详细元数据 |

get_literature_relations — 文献关系分析

分析文献间的引用关系、施引文献和相似文献。

施引说明:citing 默认同时尝试 OpenAlex 与 Europe PMC;如果显式传入 sources,则只使用其中支持施引的 openalex/europe_pmc。OpenAlex 路径需要 OPENALEX_API_KEY,Europe PMC 可作为备选来源。

| 参数 | 类型 | 默认值 | 说明 | | ---------------- | ------------------ | ----------------------------------- | --------------------------------------------------------------- | | identifiers | string | string[] | null | DOI、PMID 或 PMCID | | id_type | enum | auto | 标识符类型 | | relation_types | enum[] | ["references","similar","citing"] | 关系类型 | | max_results | integer | 20 | 每种关系最大结果数,范围 1-100 | | analysis_type | enum | basic | basic(基本)、comprehensive(综合)、network(网络分析) | | max_depth | integer | 1 | 网络分析展开深度 |

get_journal_quality — 期刊质量评估

集成 EasyScholar + OpenAlex 双数据源。

失败说明:当 EasyScholar 与 OpenAlex 都无法返回任何可用指标时,工具会返回 isError: true 和明确错误信息,而不是成功返回空指标。

| 参数 | 类型 | 默认值 | 说明 | | ----------------- | -------------------------- | ------ | ---------------------------------------------------------- | | journal_name | string | string[] | 必填 | 期刊名称 | | include_metrics | string | string[] | null | null | 返回指标:impact_factorquartilejcih_index 等 | | sort_by | enum | null | null | 排序字段(批量查询):impact_factorquartilejci | | sort_order | enum | desc | desc(降序)或 asc(升序) | | use_cache | boolean | true | 是否使用 24 小时文件缓存 |

环境变量

| 变量 | 必需 | 获取地址/配置作用 | 缺失后果 | | -------------------------- | --------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------- | | OPENALEX_API_KEY | OpenAlex 相关能力需要 | OpenAlex account,用于 OpenAlex 搜索、施引和期刊指标 | OpenAlex 源失败;citing 和 OpenAlex 期刊指标不可用 | | EASYSCHOLAR_SECRET_KEY | 期刊影响因子/分区需要 | EasyScholar 开放平台 | 期刊质量只尝试 OpenAlex 指标,影响因子/分区可能为空 | | NCBI_EMAIL | 推荐 | NCBI E-utilities 联系邮箱 | 仍可请求,但不利于 NCBI 联系和合规使用 | | NCBI_API_KEY | 可选 | NCBI API key | PubMed/PMC 速率按 3 req/s 保守限制 | | CROSSREF_MAILTO | 推荐 | Crossref Polite Pool 联系邮箱 | 仍可请求,但不会进入 Polite Pool | | SEMANTIC_SCHOLAR_API_KEY | 推荐 | Semantic Scholar API key | 施引上下文请求更容易受限 | | OPENALEX_RATE_LIMIT_MS | 可选 | OpenAlex 请求间隔覆盖值,默认 100ms | 使用默认限流 | | ARXIV_RATE_LIMIT_MS | 可选 | arXiv 请求间隔覆盖值,默认 3000ms | 使用默认限流 | | EUROPE_PMC_RATE_LIMIT_MS | 可选 | Europe PMC 请求间隔覆盖值,默认 1000ms | 使用默认限流 | | NCBI_RATE_LIMIT_MS | 可选 | NCBI 请求间隔覆盖值;未设置时有 key 默认 100ms,无 key 默认 333ms | 使用自动限流 | | ARTICLE_MCP_LANG | 可选 | 工具说明语言:zh-CN(默认)或 en | 使用中文工具说明 |

使用示例

基本搜索流程

用户: 搜索 CRISPR 基因编辑的最新文献
LLM: 调用 search_literature(keyword="CRISPR gene editing", search_type="fast")
     → 返回 10 条结果的元数据(标题、作者、PMCID、摘要等)

用户: 获取第一篇文献的全文
LLM: 调用 get_article_details(pmcid="PMC1234567")
     → 返回全文内容(Markdown 格式)

期刊评估

用户: 查看 Nature 的影响因子
LLM: 调用 get_journal_quality(journal_name="Nature")
     → 返回 impact_factor、quartile、jci 等指标

批量期刊比较

用户: 比较 Nature、Science、Cell 的质量指标
LLM: 调用 get_journal_quality(
        journal_name=["Nature", "Science", "Cell"],
        sort_by="impact_factor"
      )
     → 按影响因子降序返回三本期刊的指标

数据源说明

| 数据源 | 搜索 | 详情 | 全文 | 参考文献 | 施引文献 | 相似文献 | | ---------------- | :--: | :--: | :--: | :------: | :------: | :------: | | Europe PMC | ✅ | ✅ | — | ✅ | ✅ | — | | PubMed | ✅ | ✅ | ✅ | ✅ | — | ✅ | | arXiv | ✅ | — | — | — | — | — | | Crossref | ✅ | ✅ | — | ✅ | — | — | | OpenAlex | ✅ | ✅ | — | — | ✅ | — | | Semantic Scholar | — | — | — | — | ✅ | — |

输出说明

  • structuredContent 使用统一的 { success, data, meta, warnings, error } 结构
  • content 首段为可读摘要和关键摘录,次段为同一结构化结果的 JSON 备份 以兼容旧 MCP 客户端
  • 服务器只注册 Tools,不注册 Resources 或 Prompts,确保最大客户端兼容性

调试

使用 MCP Inspector 检查和调试工具调用:

# 启动 Inspector
npx @modelcontextprotocol/inspector node dist/index.js

日志输出到 stderr(不污染 stdout 协议通道)。在客户端日志中查看请求耗时和状态。

开发

npm install          # 安装依赖
npm run dev          # 开发模式(tsx 热重载)
npm run build        # 生产构建
npm test             # 运行 91 个 Vitest 测试
npm run test:mcp     # MCP 合规检查(目标: 100/100)
npm run test:all     # 完整门禁:version-check → typecheck → lint → build → test → test:mcp

许可证

MIT © fangfuzha