PubMed MCP Server
Lets your AI agent search PubMed and Europe PMC, fetch articles and full text, format citations and look up MeSH terms.
167 stars on GitHubby cyanheadsLicense Apache-2.0Updated 20 days ago
How to install
This MCP has two ways to run: local or remote.
Pick one below. Local runs on your computer; remote runs in the cloud and needs nothing installed.
Paste in the terminal:
claude mcp add pubmed -- npx -y @cyanheads/pubmed-mcp-server
What to fill in
| Name | What it is | Required |
|---|---|---|
MCP_LOG_LEVEL | Sets the minimum log level for output (e.g., 'debug', 'info', 'warn'). | No |
NCBI_API_KEY | NCBI API key for higher rate limits (10 req/s vs 3 req/s). | No |
NCBI_ADMIN_EMAIL | Contact email sent with NCBI requests (recommended by NCBI). | No |
UNPAYWALL_EMAIL | Contact email for Unpaywall. When set, pubmed_fetch_fulltext falls back to Unpaywall open-access copies for DOIs not in PMC. | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Search PubMed for recent randomized trials on semaglutide and summarize the top five.
Get the full text of PMID 12345678 and list its main findings.
What it is
This server connects your AI agent to biomedical literature from PubMed, PubMed Central and Europe PMC. The agent can search papers, read abstracts and full text, find related and citing articles, check citation metrics and format references. A public hosted version is available, or you can run it yourself.
What it can do
pubmed_search_articles: search PubMed with filters and date rangespubmed_fetch_articles: abstracts, authors, journal and MeSH terms by PMIDpubmed_fetch_fulltext: full text by PMID, PMCID or DOIpubmed_europepmc_search: search preprints, patents and open-access recordspubmed_fetch_citation_metrics: NIH iCite citation metricspubmed_format_citations: APA, MLA, BibTeX, RIS or Vancouverpubmed_find_related: similar, citing or referenced articlespubmed_lookup_mesh: MeSH headings and entry terms
When to use
- βΊWhen you do a literature review and want your agent to search PubMed and read the papers
- βΊWhen you need references formatted in APA, BibTeX or another style from PMIDs
- βΊWhen you want to turn a DOI into a PMID or check whether an article was retracted
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
mining-pubmed-literatureHelps your agent search PubMed and PMC for research papers and abstracts about a condition or drug, and build a corpus of articles for analysis.litreviewHelps your agent start a literature review by planning the search, finding papers in PubMed and OpenAlex, and writing a Word orientation guide.literature-reviewHelps your agent run systematic literature reviews across databases like PubMed and arXiv, then write a themed synthesis with checked citations.Frequently asked questions
Is it free and open source?
Yes. The readme shows an open license, and a public hosted server is offered at https://pubmed.caseyjhand.com/mcp.
Do I need an API key?
No key is mentioned for the hosted server. Unpaywall full-text lookups need an email set in UNPAYWALL_EMAIL.
Where does the data come from?
NCBI E-utilities for PubMed, with Europe PMC, OpenAlex, Unpaywall and NIH iCite filling gaps.
How many tools does it have?
The readme lists 12 tools, 1 resource and 1 prompt.
How are retractions handled?
Fetching an article shows linked retraction and correction notices at the top, and citation formatting includes them.
Can I run it locally?
Yes, over stdio or local Streamable HTTP, for example with npx -y @cyanheads/pubmed-mcp-server.
If it does not work
- βΊIf a full-text request returns nothing, the article may not be open access. The result lists the reason and the sources tried.
- βΊIf searches slow down or fail with a rate-limit message, wait a moment, because NCBI requests are paced.
- βΊFor local use, check that Node.js is installed and restart your AI app after adding the config.
5 new skills a week. 1 minute to read.