PubMed MCP Server
Search PubMed, Europe PMC, and PMC for biomedical articles. Fetch metadata and full text, generate citations, explore MeSH terms, and find related research.
The PubMed MCP Server is a community-maintained Model Context Protocol server (Apache 2.0) that wraps the NCBI E-utilities API along with Europe PMC and Unpaywall to give AI assistants programmatic access to biomedical literature. It exposes 10 tools spanning article search, full-text retrieval, citation formatting, MeSH vocabulary lookup, and ID conversion between DOI, PMID, and PMCID.
The server supports both STDIO and Streamable HTTP transports and can be run locally via Bun, npm/npx, or Docker. A public hosted instance is also available at https://pubmed.caseyjhand.com/mcp for users who want zero-install access. Authentication is optional: no credentials are required for basic PubMed queries, but supplying an NCBI API key raises the rate limit from 3 to 10 requests per second, and an Unpaywall email enables full-text access for articles outside PMC.
Note that this is not an official server from NCBI/NIH. Several other community PubMed MCP implementations exist (such as JackKuo666/PubMed-MCP-Server and andybrandt/mcp-simple-pubmed), but cyanheads/pubmed-mcp-server has the broadest tool coverage and most active packaging.
Tools
| Tool | Description |
|---|---|
pubmed_search_articles |
Query PubMed with boolean syntax, field filters, date ranges, and optional article summaries. |
pubmed_europepmc_search |
Search Europe PMC for preprints, patents, Agricola records, and other sources beyond standard PubMed. |
pubmed_fetch_articles |
Retrieve full metadata for up to 200 articles by PubMed ID. |
pubmed_fetch_fulltext |
Access article full text via PMC, Europe PMC, or Unpaywall. |
pubmed_format_citations |
Generate APA 7th, MLA 9th, BibTeX, or RIS formatted citations. |
pubmed_find_related |
Locate similar articles, citing articles, or references for a given paper. |
pubmed_spell_check |
Correct biomedical query terms using NCBI's spell checker. |
pubmed_lookup_mesh |
Explore the Medical Subject Headings (MeSH) controlled vocabulary. |
pubmed_lookup_citation |
Resolve a partial citation (author, journal, year, etc.) to a PubMed ID. |
pubmed_convert_ids |
Convert between DOI, PMID, and PMCID identifier formats. |
Prerequisites
- Bun v1.3.2+, or Node.js with npx
- Optional: an NCBI API key to raise rate limits from 3 to 10 requests/second
- Optional: an email for Unpaywall to access full text outside PMC
Option 1: Public hosted instance (no install)
Point your MCP client at:
https://pubmed.caseyjhand.com/mcp
Option 2: Local install via npx
{
"mcpServers": {
"pubmed": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/pubmed-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"NCBI_API_KEY": "your-key-here"
}
}
}
}
Option 3: Bun
{
"mcpServers": {
"pubmed": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/pubmed-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"NCBI_API_KEY": "your-key-here"
}
}
}
}
Option 4: Docker
{
"mcpServers": {
"pubmed": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/pubmed-mcp-server:latest"]
}
}
}
Key environment variables
MCP_TRANSPORT_TYPE:stdio(default) orhttpMCP_HTTP_PORT: HTTP server port, default 3010NCBI_API_KEY: increases rate limit from 3 to 10 req/secUNPAYWALL_EMAIL: enables full-text retrieval for non-PMC articlesEUROPEPMC_ENABLED: toggle Europe PMC features (default true)MCP_LOG_LEVEL: logging verbosity
- Run literature reviews: search PubMed with boolean queries, then have the agent summarize the top results.
- Build a citation list in APA, MLA, BibTeX, or RIS from a set of PMIDs for inclusion in a paper or grant.
- Pull full text of a specific article via PMC or Unpaywall and extract methods, sample size, or key findings.
- Resolve a partial reference ("Smith et al. NEJM 2019 on GLP-1") to a verified PMID, then fetch related and citing papers.
- Explore MeSH vocabulary to refine search strategies, then convert PMIDs to DOIs/PMCIDs for downstream reference managers.
- "Search PubMed for randomized trials of GLP-1 agonists in heart failure published since 2023 and summarize the top 5."
- "Fetch the full text of PMID 36988593 and extract the primary endpoint and effect size."
- "Generate BibTeX citations for these PMIDs: 12345678, 23456789, 34567890."
- "Find articles related to PMID 32511692 that have been cited the most."
- "Convert these DOIs to PMIDs and PMCIDs and tell me which ones have open-access full text."
- Broad tool coverage: search, fetch, full text, citations, MeSH, related articles, and ID conversion in one server.
- Multiple transports and install paths (npx, Bun, Docker, hosted public instance).
- Works without an API key for casual use; supports NCBI API key for higher rate limits.
- Integrates Europe PMC and Unpaywall in addition to PubMed and PMC.
- Community-maintained, not an official NCBI/NIH project.
- Full-text retrieval depends on PMC/Europe PMC/Unpaywall coverage; many paywalled articles remain inaccessible.
- Default rate limit (3 req/sec without an NCBI key) can throttle large batch operations.
- JackKuo666/PubMed-MCP-Server: Python FastMCP server with keyword/advanced search, metadata, PDF download, and deep paper analysis.
- andybrandt/mcp-simple-pubmed: minimal PubMed MCP server using the Entrez API.
- Augmented-Nature/PubMed-MCP-Server: 16-tool implementation covering NCBI E-utilities and PubMed Central APIs.