Back to MCP directory
publicPublicdnsLocal runtime

pubcrawl

PubCrawl是一个MCP服务器,为LLM客户端提供PubMed文献检索、FDA药物标签、英国药品数据和ClinicalTrials.gov临床试验的访问功能,实现从文献到标签再到试验的全面医药信息查询。

article

README

🚀 PubCrawl

PubCrawl是一个 MCP服务器,它使大语言模型(LLM)客户端能够访问PubMed、FDA药品标签、英国药品数据以及ClinicalTrials.gov的数据。这就像是一场经过同行评审的文献、标签和试验的探索之旅。

本项目由 PharmaTools.AI 开发。

✨ 主要特性

文献相关工具

| 工具 | 功能 | |------|-------------| | search_pubmed | 可使用日期范围、文章类型和排序顺序等过滤器搜索PubMed。返回 PMID、标题、作者、期刊和 DOI。 | | get_abstract | 获取文章的完整结构化摘要,该摘要会被拆分为有标签的部分(背景、方法、结果、结论),并包含关键词和医学主题词(MeSH)。 | | get_full_text | 从 PubMed Central 检索开放获取文章的全文,包含解析后的章节、图表标题和参考文献数量。 | | find_related | 使用 PubMed 的邻居算法查找相似文章,并按相关性得分排序。 | | format_citation | 生成 APA、温哥华、哈佛或 BibTeX 风格的格式化引用。 | | trending_papers | 查找某一主题的近期论文,还可选择过滤出高影响力期刊(如《自然》《科学》《细胞》《新英格兰医学杂志》《柳叶刀》《美国医学会杂志》等)上的文章。 |

药品标签相关工具

| 工具 | 功能 | |------|-------------| | get_uspi | 从 DailyMed 获取美国药品处方信息部分,包括适应症、剂量、警告、禁忌症等。这些信息是从 FDA 结构化产品标签中解析出来的。 | | get_smpc | 从英国电子药品目录(eMC)检索英国药品特性摘要,这相当于美国的药品处方信息,且有编号的 SmPC 章节。 | | compare_labels | 对同一种药物的美国(USPI)和英国(SmPC)标签进行并排比较,找出适应症、警告和剂量方面的监管差异。 | | search_by_indication | 查找针对某种医疗状况获批的药物。通过 OpenFDA 搜索 FDA 标签,然后在 eMC 上交叉引用该药物在英国的可用性。 |

临床试验相关工具

| 工具 | 功能 | |------|-------------| | search_trials | 在 ClinicalTrials.gov 上搜索临床试验。可按病症、干预措施、招募状态和阶段进行过滤。返回 NCT ID、赞助商、招募人数和链接。 | | get_trial | 通过 NCT ID 获取临床试验的完整详细信息,包括资格标准、研究设计、分组、主要/次要结果、地点和相关的 PubMed ID。 |

📦 安装指南

前提条件

  • Node.js 20 及以上版本
  • 兼容 MCP 的客户端(如 Claude Desktop、Cursor 等)

通过 npm 安装

npm install -g @pharmatools/pubcrawl

配置 Claude Desktop

将以下内容添加到 claude_desktop_config.json 文件中:

  • macOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows%APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "pubcrawl": {
      "command": "pubcrawl"
    }
  }
}

重启 Claude Desktop。PubCrawl 将出现在 + → 连接器 下。

从源代码安装

git clone https://github.com/nickjlamb/pubcrawl.git
cd pubcrawl
npm install
npm run build

然后在配置文件中指向构建后的文件:

{
  "mcpServers": {
    "pubcrawl": {
      "command": "node",
      "args": ["/path/to/pubcrawl/dist/index.js"]
    }
  }
}

NCBI API 密钥(可选)

如果没有 API 密钥,请求速率将限制为每秒 3 次;有了 API 密钥,请求速率可达到每秒 10 次。

  1. 在 https://www.ncbi.nlm.nih.gov/account/ 创建一个免费的 NCBI 账户。
  2. 转到账户设置 → API 密钥管理。
  3. 将密钥添加到配置文件中:
{
  "mcpServers": {
    "pubcrawl": {
      "command": "pubcrawl",
      "env": {
        "NCBI_API_KEY": "your_key_here"
      }
    }
  }
}

💻 使用示例

基础用法

连接成功后,只需自然地提问即可,例如:

  • "Search PubMed for recent clinical trials on semaglutide"(在 PubMed 上搜索关于司美格鲁肽的近期临床试验)
  • "Get the abstract for PMID 38127654"(获取 PMID 为 38127654 的文章摘要)
  • "Find papers related to this one and format citations in APA"(查找与这篇文章相关的论文,并以 APA 格式生成引用)
  • "What are the trending papers on CRISPR gene therapy this month?"(本月关于 CRISPR 基因疗法的热门论文有哪些?)
  • "Get the full text of that paper from PMC"(从 PubMed Central 获取那篇论文的全文)
  • "Get the FDA prescribing information for metformin — just the indications and warnings"(获取二甲双胍的 FDA 处方信息,仅需适应症和警告部分)
  • "Pull the UK SmPC for atorvastatin"(获取阿托伐他汀的英国药品特性摘要)
  • "Compare US and UK labelling for lisinopril"(比较赖诺普利的美国和英国标签)
  • "What drugs are approved for type 2 diabetes?"(哪些药物被批准用于治疗 2 型糖尿病?)
  • "Find recruiting Phase 3 trials for pembrolizumab in breast cancer"(查找正在招募的帕博利珠单抗治疗乳腺癌的 3 期临床试验)
  • "Get details on clinical trial NCT03086486"(获取临床试验 NCT03086486 的详细信息)

开发相关

npm run dev    # TypeScript 监听模式
npm run build  # 编译到 dist/ 目录
npm start      # 运行服务器

📄 许可证

本项目采用 MIT 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client