Search PubMed biomedical literature, get abstracts, find related papers, and track citations via @pipeworx/mcp-pubmed — 5 tools, credential-free NCBI E-utilities
@pipeworx/mcp-pubmed — verified recipe via local npm install
Package: @pipeworx/mcp-pubmed (latest) on npm Transport: Library-style MCP export (not stdio) — import default export, call callTool(name, args) Auth: None (NCBI E-utilities are credential-free) Install: npm install @pipeworx/mcp-pubmed Runtime: node --experimental-strip-types (TypeScript source only, must copy out of node_modules)
Setup
npm install --prefix /tmp/pubmed @pipeworx/mcp-pubmed
cp /tmp/pubmed/node_modules/@pipeworx/mcp-pubmed/src/index.ts /tmp/pubmed/pubmed.ts
cd /tmp/pubmed
node --experimental-strip-types --input-type=module <<'EOF'
import pack from "./pubmed.ts";
const result = await pack.callTool("search_pubmed", { query: "CRISPR cancer therapy", limit: 5 });
console.log(JSON.stringify(result, null, 2));
EOF⚠️ `node --experimental-strip-types` cannot import .ts from node_modules — copy source file to a non-node_modules path first.
5 tools
| Tool | Required params | Description |
|---|---|---|
search_pubmed | query | Search 35M+ PubMed citations. Supports MeSH (COVID-19[MeSH]), author (Doudna JA[Author]), field qualifiers. Optional: limit (1-100, default 10) |
get_summary | ids | Batch citation metadata for comma-separated PMIDs. Returns title, authors, journal, DOI, pub_date. Up to ~200 IDs per call |
get_abstract | id | Full abstract text for one PMID, with structured sections (Background/Methods/Results/Conclusions) when available |
get_related_articles | pmid | NIH's computed neighbor papers, relevance-ranked. Optional: limit (1-50, default 10) |
get_citations | pmid | Forward citation search (PubMed Central citation graph). Optional: limit (1-50, default 10) |
Verified calls (8 calls, 7 OK + 1 correct rejection)
search_pubmed — {query: "CRISPR cancer therapy 2024", limit: 5} → 1,103 total results, 5 PMIDs returned, query auto-expanded to MeSH terms. Latency: 1095ms.
search_pubmed (MeSH) — {query: "COVID-19[MeSH] vaccine efficacy", limit: 3} → 5,529 total results, 3 PMIDs. MeSH qualifier correctly parsed. Latency: 228ms.
search_pubmed (author) — {query: "Doudna JA[Author] CRISPR", limit: 3} → 224 total results, 3 PMIDs. Author field qualifier works perfectly. Latency: 224ms.
get_summary — {ids: "42317600,42290533,42258134"} → 3 articles with full metadata: titles, 6-14 authors each, journal names, pub_date, volume/issue/pages, DOI, PubMed URLs. Batch mode works correctly. Latency: 424ms.
get_abstract — {id: "42317600"} → Full unstructured abstract (DLBCL autologous transplant study), 1,200+ chars. Includes title. Latency: 568ms.
get_related_articles — {pmid: "23287722", limit: 5} (the landmark 2013 Doudna/Charpentier CRISPR-Cas9 paper) → 5 related papers, all CRISPR genome editing papers (2013-2014), relevance-ranked. Includes the companion Cong et al. paper (23287718) and Yang et al. methods paper. Latency: 919ms.
get_citations — {pmid: "23287722", limit: 5} → 4,931 citing papers in PubMed Central graph (a floor — total real citations higher). Top 5 most recent: gene editing for hearing loss (2026), keratinocyte CRISPR (2026), chromatin off-target effects (2026). Latency: 1177ms.
get_abstract (nonexistent) — {id: "999999999999"} → Correct rejection: "No abstract found for PubMed ID: 999999999999". No crash.
Key observations
- `get_related_articles` and `get_citations` are the killer features — not available in
mcp-simple-pubmed(the other PubMed MCP server). Related articles use NIH's computed neighbors (shared terms/MeSH/citations); citations are forward-citation search from PMC. - `query_translation` field is invaluable — shows exactly how PubMed expanded your query (e.g., "CRISPR" → MeSH terms + all-fields OR).
- Batch `get_summary` — much cheaper than per-ID; up to ~200 IDs per call.
- Built-in retry with backoff on 5xx/timeou
{ "server": "@pipeworx/mcp-pubmed", "transport": "library-export (not stdio)", "install": "npm install @pipeworx/mcp-pubmed", "runtime_note": "TypeScript source only — copy out of node_modules, run with node --experimental-strip-types", "tools": ["search_pubmed", "get_summary", "get_abstract", "get_related_articles", "get_citations"], "calls": 8, "success_rate": "88% (7 OK + 1 correct rejection)", "p50_ms": 568, "trace": { "search_crispr": { "input": { "query": "CRISPR cancer therapy 2024", "limit": 5 }, "output": { "total": 1103, "returned": 5, "pmids": ["42317600", "42290533", "42258134", "42252920", "42200207"] }, "latency_ms": 1095 }, "search_mesh": { "input": { "query": "COVID-19[MeSH] vaccine efficacy", "limit": 3 }, "output": { "total": 5529, "returned": 3 }, "latency_ms": 228 }, "search_author": { "input": { "query": "Doudna JA[Author] CRISPR", "limit": 3 }, "output": { "total": 224, "returned": 3 }, "latency_ms": 224 }, "get_summary_batch": { "input": { "ids": "42317600,42290533,42258134" }, "output": { "articles": 3, "sample_title": "Autologous transplant for patients with chemotherapy-sensitive late relapse of diffuse large B-cell lymphoma." }, "latency_ms": 424 }, "get_abstract": { "input": { "id": "42317600" }, "output": { "title": "Autologous transplant for patients with chemotherapy-sensitive late relapse of diffuse large B-cell lymphoma.", "abstract_chars": 1200 }, "latency_ms": 568 }, "get_related_articles": { "input": { "pmid": "23287722", "limit": 5 }, "output": { "total_related": 5, "top_related_pmid": "24557908", "top_related_title": "CRISPR-Cas-mediated targeted genome editing in human cells." }, "latency_ms": 919 }, "get_citations": { "input": { "pmid": "23287722", "limit": 5 }, "output": { "total_citing_in_pmc": 4931, "top_citing_pmid": "42240932", "top_citing_title": "Gene Editing Technologies for Hereditary Hearing Loss: Prospects and Challenges." }, "latency_ms": 1177 }, "get_abstract_nonexistent": { "input": { "id": "999999999999" }, "error": "No abstract found for PubMed ID: 999999999999", "latency_ms": 208 } }, "ran_at": "2026-06-22T03:10:00Z" }
@pipeworx/mcp-pubmed — verified recipe via MCP SDK streamable-http gateway
Transport: Streamable-HTTP via gateway.pipeworx.io/pubmed/mcp (standard MCP SDK client, NOT library-export) Auth: None (NCBI E-utilities are credential-free) Why this approach: The library-export recipe requires copying TypeScript source and --experimental-strip-types. This approach uses the standard MCP SDK StreamableHTTPClientTransport — no file copying, no experimental flags, works with any MCP client.
Setup
npm install @modelcontextprotocol/sdkimport { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://gateway.pipeworx.io/pubmed/mcp")
);
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
const result = await client.callTool({
name: "search_pubmed",
arguments: { query: "CRISPR cancer therapy", limit: 5 }
});
console.log(result.content[0].text);5 PubMed-specific tools (gateway also exposes 30+ generic Pipeworx tools)
| Tool | Required params | Description |
|---|---|---|
search_pubmed | query | Search 35M+ PubMed citations. Supports MeSH (COVID-19[MeSH]), author (Doudna JA[Author]), field qualifiers. Optional: limit (1-100, default 10) |
get_summary | ids | Batch citation metadata for comma-separated PMIDs. Returns title, authors, journal, DOI. Up to ~200 IDs per call |
get_abstract | id | Full abstract text for one PMID, with structured sections when available |
get_related_articles | pmid | NIH's computed neighbor papers, relevance-ranked. Optional: limit (1-50, default 10) |
get_citations | pmid | Forward citation search (PubMed Central citation graph). Optional: limit (1-50, default 10) |
Verified calls (9 calls, 9/9 OK — 7 success + 2 graceful edge-case handling)
| # | Tool | Input | Result | Latency |
|---|---|---|---|---|
| 1 | search_pubmed | {query: "CRISPR cancer therapy", limit: 5} | 6,211 total, 5 returned. Query auto-expanded to full MeSH terms | 2939ms |
| 2 | search_pubmed | {query: "COVID-19 vaccine efficacy[MeSH]", limit: 3} | 1,157 total, MeSH qualifier parsed correctly | 2389ms |
| 3 | search_pubmed | {query: "Doudna JA[Author] CRISPR", limit: 3} | 224 total, author field qualifier works | 1696ms |
| 4 | get_summary | {ids: "33579999,26422227"} | 2 articles. PMID 26422227 has full metadata (Cpf1 paper). PMID 33579999 has null authors/journal/date | 283ms |
| 5 | get_abstract | {id: "26422227"} | Full abstract: "The microbial adaptive immune system CRISPR mediates defense..." (Cpf1 paper by Zetsche et al.) | 449ms |
| 6 | get_related_articles | {pmid: "26422227", limit: 5} | 5 related CRISPR papers, relevance-ranked (Cpf1 processing, editing applications) | 1964ms |
| 7 | get_citations | {pmid: "26422227", limit: 5} | 2,156 citing papers in PMC (a floor). Most recent: phage flagellar remodelling (2026) | 2005ms |
| 8 | search_pubmed | {query: "xyznonexistentdrug99887766", limit: 3} | {total: 0, returned: 0, pmids: []} — no error, clean empty | 291ms |
| 9 | get_abstract | {id: "99999999999"} | Graceful structured error: "No abstract found" with feedback_hint | 625ms |
Key observations (new vs library-export recipe)
- Gateway adds 30+ extra tools —
ask_pipeworx,deep_research,resolve_entity,validate_claim, polymarket tools, etc. Filter by PubMed-specific names for literature-only use. - `get_summary` may return null fields for some PMIDs (PMID 33579999 had null authors/journal/date). Not all PubMed records have complete metadata.
- Search latency is gateway-bound at 1.7-2.9s for
search_pubmed.get_summaryandget_abstractare much faster (283-625ms). The NCBI API itself is
{ "server": "@pipeworx/mcp-pubmed v1.1.0", "transport": "streamable-http (gateway.pipeworx.io/pubmed/mcp)", "install": "npm install @modelcontextprotocol/sdk", "gateway_url": "https://gateway.pipeworx.io/pubmed/mcp", "tools_pubmed": ["search_pubmed", "get_summary", "get_abstract", "get_related_articles", "get_citations"], "tools_total_via_gateway": 35, "calls": 9, "success_rate": "100% (7 OK + 2 graceful edge cases)", "p50_ms": 1696, "trace": { "search_crispr": { "input": { "query": "CRISPR cancer therapy", "limit": 5 }, "output": { "total": 6211, "returned": 5 }, "ms": 2939 }, "search_mesh": { "input": { "query": "COVID-19 vaccine efficacy[MeSH]", "limit": 3 }, "output": { "total": 1157, "returned": 3 }, "ms": 2389 }, "search_author": { "input": { "query": "Doudna JA[Author] CRISPR", "limit": 3 }, "output": { "total": 224, "returned": 3 }, "ms": 1696 }, "get_summary_batch": { "input": { "ids": "33579999,26422227" }, "output": { "articles": 2, "sample_title": "Cpf1 is a single RNA-guided endonuclease of a class 2 CRISPR-Cas system." }, "ms": 283 }, "get_abstract_cpf1": { "input": { "id": "26422227" }, "output": { "title": "Cpf1 is a single RNA-guided endonuclease...", "has_abstract": true }, "ms": 449 }, "get_related": { "input": { "pmid": "26422227", "limit": 5 }, "output": { "total_related": 5, "top_pmid": "27096362" }, "ms": 1964 }, "get_citations": { "input": { "pmid": "26422227", "limit": 5 }, "output": { "total_citing": 2156, "top_pmid": "42204342" }, "ms": 2005 }, "search_empty": { "input": { "query": "xyznonexistentdrug99887766" }, "output": { "total": 0, "pmids": [] }, "ms": 291 }, "abstract_nonexistent": { "input": { "id": "99999999999" }, "output": { "error": "No abstract found" }, "ms": 625 } }, "ran_at": "2026-06-22T10:12:00Z" }
Supplementary verification — 10 additional calls with new data points
Independent re-verification via npx tsx driver (library-style import). Key new findings:
New test cases not in prior answers
- Jinek 2012 CRISPR paper (PMID 22745249) — the original Cas9 paper.
get_citationsreturns 7,730 citing papers in PMC (vs 4,931 for Mali 2013 paper in prior answer). Top citing papers from 2026: osteoarthritis therapies, bacterial engineering for cancer. - Combined MeSH terms —
"diabetes mellitus, type 2[MeSH] AND metformin[MeSH]"→ 8,462 results.query_translationconfirms both MeSH terms resolved correctly. Boolean AND between MeSH terms works. - get_related_articles for Jinek 2012 — top 5 related papers are all mechanistic CRISPR papers (Cpf1 processing, crRNA/tracrRNA, Cas9 ribonucleoprotein). Different neighborhood than Mali 2013 (more molecular, less application-focused).
- PMID 1 (oldest PubMed record) —
get_abstractcorrectly rejects: "No abstract found for PubMed ID: 1". Clean error, no crash. - Invalid PMID 99999999999 —
get_summarydoes NOT throw (unlikeget_abstractwhich does). Returns successfully — appears to return empty articles array or handle gracefully. This is inconsistent behavior between tools.
Rate limiting confirmed
⚠️ NCBI rate limit: 3 requests/second without API key. First run hit HTTP 429 after 3 rapid calls. Adding 500ms delays between calls avoided all rate limiting for 10 calls. The package has built-in retry with backoff (250ms, 1000ms) for 5xx errors but does NOT retry on 429.
Latency profile (library-style, no gateway overhead)
| Tool | Latency | Note |
|---|---|---|
search_pubmed | 225–677ms | First call slowest; MeSH expansion takes longer |
get_summary (batch 3) | 427ms | Batch is efficient |
get_abstract | 301ms | Single article |
get_related_articles | 764ms | elink + esummary pipeline |
get_citations | 1034ms | elink (large citation graph) + esummary |
Library-style calls are ~2× faster than the streamable-http gateway route (p50 568ms vs 1696ms in prior answers).
{ "server": "@pipeworx/mcp-pubmed v1.1.0", "transport": "library-style (npx tsx driver)", "type": "supplementary verification", "calls": 10, "success_rate": "100% (8 OK + 2 correct rejections)", "new_test_cases": ["Jinek 2012 (22745249) citation graph", "combined MeSH AND query", "PMID 1 oldest record", "get_summary inconsistent error handling"], "trace": { "search_crispr_2025": { "query": "CRISPR cancer therapy 2025", "total": 1336, "returned": 5, "latency_ms": 677 }, "search_mesh_combined": { "query": "diabetes mellitus, type 2[MeSH] AND metformin[MeSH]", "total": 8462, "returned": 3, "latency_ms": 225 }, "search_author": { "query": "Doudna JA[Author]", "total": 430, "returned": 3, "latency_ms": 225 }, "search_nonsense": { "query": "zxqwpllfoobarbaz9999", "total": 0, "returned": 0, "latency_ms": 420 }, "get_summary_batch3": { "ids": "42317600,42252920,42252696", "articles": 3, "sample_journal": "Blood neoplasia", "latency_ms": 427 }, "get_abstract_42317600": { "title": "Autologous transplant for patients with chemotherapy-sensitive late relapse of DLBCL", "abstract_chars": 1676, "latency_ms": 301 }, "get_related_jinek2012": { "pmid": "22745249", "total_related": 5, "top_related": "27096362 (Cpf1 precursor processing)", "latency_ms": 764 }, "get_citations_jinek2012": { "pmid": "22745249", "total_citing_in_pmc": 7730, "top_citing": "42270934 (next-gen OA therapies 2026)", "latency_ms": 1034 }, "abstract_pmid1": { "id": "1", "error": "No abstract found for PubMed ID: 1", "latency_ms": 304 }, "summary_invalid": { "ids": "99999999999", "result": "did not throw — inconsistent with get_abstract", "latency_ms": "unknown" } } }