io.github.nickjlamb/pubcrawl

编码与调试

by nickjlamb

為 AI assistants 提供 PubMed 文獻檢索,以及美國與英國藥品標示資訊查詢。

什么是 io.github.nickjlamb/pubcrawl

為 AI assistants 提供 PubMed 文獻檢索,以及美國與英國藥品標示資訊查詢。

README

<div align="center"> <img src="./assets/banner.svg" alt="PubCrawl — PubMed, drug labels, and clinical trials for AI assistants" width="100%" /> <h1></h1>

An MCP server that gives AI assistants access to PubMed, Europe PMC, FDA & UK drug labelling, and ClinicalTrials.gov.

A peer-reviewed pub crawl through the literature — the label — and the trial.

ci npm downloads node MCP Registry License: MIT PRs welcome

Quick start · Tools · Examples · Architecture · Roadmap · Contributing

</div>

✨ What is PubCrawl?

PubCrawl connects your AI assistant (Claude Desktop, Cursor, or any MCP-compatible client) directly to the primary sources clinicians and researchers actually use — so you can ask a question in plain English and get an answer grounded in PubMed, Europe PMC, FDA/UK drug labelling, and ClinicalTrials.gov, with real PMIDs, NCT IDs, and DOIs you can verify.

Every tool is a thin, deterministic wrapper over an official API. Nothing is invented; every result cites its source.

  • 🔬 14 tools across literature, drug labelling, and clinical trials
  • 🧾 Verifiable by design — results link back to DailyMed, the eMC, PubMed, and ClinicalTrials.gov
  • 🌍 US and UK labelling — a side-by-side compare_labels no other MCP server offers
  • 📰 Preprints via Europe PMC — surface work ahead of formal publication
  • 🆓 No API keys required (an optional free NCBI key raises PubMed rate limits)
  • 🧪 Fully typed, tested, and CI-checked

Built by PharmaTools.AI.


🚀 Quick start (60 seconds)

1. Add PubCrawl to your client config — no install step needed, npx fetches it on first run.

For Claude Desktop, edit claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "pubcrawl": {
      "command": "npx",
      "args": ["-y", "@pharmatools/pubcrawl"]
    }
  }
}

2. Restart your client. PubCrawl appears under + → Connectors.

3. Ask away:

"Compare the US and UK labelling for atorvastatin, and find recent Phase 3 trials for it."

That's it. → More examples · API key & other options


🧰 Tools

📚 Literature

ToolWhat it does
search_pubmedSearch PubMed with filters for date range, article type, and sort order. Returns PMIDs, titles, authors, journals, and DOIs.
search_europepmcSearch Europe PMC — a broader corpus than PubMed that also indexes preprints (bioRxiv, medRxiv) and patents. Each result includes an abstract snippet, citation count, open-access status, and a preprint flag. Filter to preprints or open-access only.
get_abstractGet the full structured abstract for an article — broken into labeled sections (background, methods, results, conclusions) with keywords and MeSH terms.
get_full_textRetrieve the full text of open-access articles from PubMed Central, with parsed sections, figure/table captions, and reference counts.
find_relatedFind similar articles using PubMed's neighbor algorithm, ranked by relevance score.
format_citationGenerate a formatted citation in APA, Vancouver, Harvard, or BibTeX style.
trending_papersFind recent papers on a topic, with optional filtering to high-impact journals (Nature, Science, Cell, NEJM, Lancet, JAMA, etc.).

💊 Drug labelling

ToolWhat it does
resolve_drug_nameConvert a brand drug name to its generic (or a generic to its US brand names), with drug class and common indications. Deterministic, via RxNorm/openFDA — no AI.
get_uspiPull US Prescribing Information sections via openFDA (cited to DailyMed) — indications, dosing, warnings, contraindications, and more.
get_smpcRetrieve UK Summary of Product Characteristics from the eMC — the UK equivalent of US prescribing information, with numbered SmPC sections.
compare_labelsSide-by-side comparison of US (USPI) and UK (SmPC) labelling for the same drug. Spot regulatory differences in indications, warnings, and dosing.
search_by_indicationFind drugs approved for a medical condition. Searches FDA labelling via openFDA, then cross-references UK availability on the eMC.

🧫 Clinical trials

ToolWhat it does
search_trialsSearch ClinicalTrials.gov for clinical trials. Filter by condition, intervention, recruitment status, and phase. Returns NCT IDs, sponsors, enrollment, and links.
get_trialGet full details for a clinical trial by NCT ID — eligibility criteria, study design, arms, primary/secondary outcomes, locations, and associated PubMed IDs.

💬 Examples

Once connected, just ask naturally:

Literature

  • "Search PubMed for recent clinical trials on semaglutide."
  • "Search Europe PMC for preprints on GLP-1 receptor agonists, most cited first."
  • "Get the abstract for PMID 38127654, then find related papers and cite them all in Vancouver style."
  • "What are the trending papers on CRISPR gene therapy this month, high-impact journals only?"
  • "Pull the full text of that PMC article and summarise the methods section."

Drug labelling

  • "Get the FDA prescribing information for metformin — just the indications and warnings."
  • "Pull the UK SmPC for atorvastatin."
  • "Compare US and UK labelling for lisinopril and highlight the differences."
  • "What's the generic name and drug class for Ozempic?"
  • "What drugs are approved for type 2 diabetes in both the US and UK?"

Clinical trials

  • "Find recruiting Phase 3 trials for pembrolizumab in breast cancer."
  • "Get the eligibility criteria and primary outcomes for NCT03086486."

Cross-source (where PubCrawl shines)

  • "For semaglutide: summarise the US label's cardiovascular indication, then find the pivotal trial and its NEJM publication."

🏗 Architecture

Three layers — tools register the MCP interface, lib clients talk to each external API, and shared cache + parsers keep it fast and consistent.

mermaid
flowchart LR
    Client["🖥  MCP client<br/>Claude Desktop · Cursor · …"]

    subgraph Server["PubCrawl MCP server"]
        direction TB
        Transport["stdio · Streamable HTTP"]
        Tools["14 tools — src/tools/*"]
        Shared["LRU cache · XML/JATS/SPL parser"]
        Transport --> Tools --> Shared
    end

    Client -->|MCP| Transport

    Tools --> NCBI["NCBI E-utilities"]
    Tools --> EPMC["Europe PMC REST"]
    Tools --> FDA["openFDA + DailyMed"]
    Tools --> EMC["UK eMC"]
    Tools --> CT["ClinicalTrials.gov v2"]

    NCBI --> S1[("PubMed / PMC")]
    EPMC --> S2[("Preprints · patents")]
    FDA --> S3[("US labels")]
    EMC --> S4[("UK labels")]
    CT --> S5[("Trials")]

Each tool file exports a register*Tool(server) function with a zod schema and an async handler. All network calls are rate-limited, cached, and time-bounded. See CLAUDE.md for a full architecture walkthrough and CONTRIBUTING.md to add a tool.


🔧 Configuration

Install options

bash
# Zero-install (recommended): npx fetches it on demand — see Quick start above.

# Or install globally:
npm install -g @pharmatools/pubcrawl

# Config for a global install:
#   { "mcpServers": { "pubcrawl": { "command": "pubcrawl" } } }

NCBI API key (optional)

Without a key, PubMed requests are limited to 3/second. A free key raises this to 10/second.

  1. Create a free NCBI account at https://www.ncbi.nlm.nih.gov/account/
  2. Account Settings → API Key Management → create a key
  3. Add it to your config:
json
{
  "mcpServers": {
    "pubcrawl": {
      "command": "npx",
      "args": ["-y", "@pharmatools/pubcrawl"],
      "env": { "NCBI_API_KEY": "your_key_here" }
    }
  }
}

HTTP transport

PubCrawl also ships a stateless Streamable HTTP transport for browser-based and hosted clients:

bash
npm run start:http   # serves POST /mcp and GET /health on PORT (default 3000)

🗺 Roadmap

Highlights of what's planned — see ROADMAP.md for the full list.

  • get_europepmc_fulltext — read preprints & OA articles surfaced by search_europepmc
  • get_adverse_events — openFDA FAERS adverse-event lookups
  • EMA / EPAR labelling to complement the US + UK compare_labels
  • MeSH query helper for sharper PubMed searches
  • MCP resources & prompts for common review workflows

Ideas welcome — open an issue.


🛠 Development

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

npm run dev      # TypeScript watch mode
npm run build    # compile to dist/
npm start        # run the stdio server
npm test         # Vitest unit suite
npm run lint     # ESLint

Unit tests live in tests/ and cover the parsing, caching, citation, and formatting logic with fixture payloads (no network calls). CI runs lint → test → build on every push and pull request. New to the codebase? Start with CONTRIBUTING.md.


📦 Releases & changelog

Versions follow Semantic Versioning. See the CHANGELOG for a full history and Releases for notes and assets.

🤝 Contributing

Contributions are welcome and appreciated — bug reports, new data sources, new tools. Read the contributing guide to get started, then open an issue or a pull request.

📄 License

MIT © PharmaTools.AI

<div align="center"> <sub>Data from NCBI E-utilities, Europe PMC, openFDA, DailyMed, the UK eMC, and ClinicalTrials.gov. PubCrawl is not affiliated with these providers.</sub> </div>

常见问题

io.github.nickjlamb/pubcrawl 是什么?

為 AI assistants 提供 PubMed 文獻檢索,以及美國與英國藥品標示資訊查詢。

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描165.3k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描165.3k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描165.3k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
89.1k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
60.0k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
49.5k

评论