PubMed MCP Server
About
Search PubMed/Europe PMC, fetch articles and full text (PMC/EPMC/Unpaywall), citations, MeSH terms via MCP. STDIO or Streamable HTTP.
Details
- Author
- cyanheads
- GitHub stars
- 121
- Downloads
- 1,279
- Categories
- Productivity, Other, Knowledge Base, Database, Search, AI
Jump to
- Search PubMed with full boolean and field‑tag syntax
- Search Europe PMC for preprints, patents, and Agricola
- Fetch full‑text articles via a three‑stage retrieval chain
- Generate citations in APA, MLA, BibTeX, RIS, and Vancouver
- Resolve partial citations and convert between DOI, PMID, PMCID
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PubMed MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Use the public hosted instance at https://pubmed.caseyjhand.com/mcp via Streamable HTTP with any MCP client, or self‑host locally using bunx @cyanheads/pubmed-mcp-server@latest in stdio mode. One‑click install buttons are available for Claude Desktop, Cursor, and VS Code.
pubmed_search_articles
Search PubMed with full query syntax, filters, and date ranges. Returns PMIDs and optional brief summaries. Supports field-specific filters (author, journal, MeSH terms), common filters (language, species, free full text), and pagination via offset for paging through large result sets.
pubmed_fetch_articles
Fetch full article metadata by PubMed IDs. Returns detailed article information including abstract, authors, journal, MeSH terms.
pubmed_fetch_fulltext
Fetch full-text articles from PubMed Central with structured sections and references. When PMC misses, transparently falls back to Europe PMC `fullTextXML` (structured JATS for records with a PMC counterpart). Provide exactly one of `pmcids` (PMC IDs directly), `pmids` (PubMed IDs, auto-resolved), or `dois` (DOIs, auto-resolved to PMC via the ID Converter; preprints with a PMC counterpart recover via Europe PMC).
pubmed_format_citations
Get formatted citations for PubMed articles in one or more formats (apa, mla, bibtex, ris, vancouver). Pass a single format as a string or multiple as an array.
pubmed_find_related
Find articles related to a source article — similar content (similar), articles citing this one (cited_by), or articles this one cites (references). Uses NCBI ELink as the primary source; falls back to Europe PMC then OpenAlex when NCBI is unavailable.
pubmed_spell_check
Spell-check a query and get NCBI's suggested correction. Useful for refining search queries.
pubmed_lookup_mesh
Search and explore the MeSH (Medical Subject Headings) controlled vocabulary. Returns descriptor records with tree numbers, scope notes, and entry terms, plus pagination via offset for paging past the maxResults cap.
pubmed_lookup_citation
Look up PubMed IDs from partial bibliographic citations. Useful when you have a reference (journal, year, volume, page, author) and need the PMID — deterministic citation matching, more reliable than free-text search for structured references. Each citation must include at least journal or year (ECitMatch primary-keys on journal+volume+page; author-only or volume-only inputs guarantee no match); more fields = better match accuracy.
pubmed_convert_ids
Convert between article identifiers (DOI, PMID, PMCID). Accepts up to 50 IDs of a single type per request. Only resolves articles indexed in PubMed Central — for articles not in PMC, use pubmed_search_articles instead.
pubmed_europepmc_search
Search Europe PMC, a broad open-access biomedical corpus. Surfaces preprints (`source: PPR`), patents (`source: PAT`), Agricola (`source: AGR`), plus everything in PubMed (`MED`) and PMC. Use when additional coverage is needed — preprints and EPMC-only OA records are the typical recovery. Paginate via `cursorMark`. Defaults to `MED`, `PMC`, and `PPR`; pass `sources` to include `PAT` / `AGR`. Abstracts arrive as a bounded `abstractSnippet` with `abstractTruncated` marking the cut ones — pass a hit’s `source` and `epmcId` to `pubmed_europepmc_fetch` for the complete abstract.
pubmed_europepmc_fetch
Fetch complete Europe PMC records — including the full, untruncated abstract — for records addressed by `source` plus `epmcId`. Pairs with `pubmed_europepmc_search`, which returns bounded `abstractSnippet` values and flags cut ones with `abstractTruncated: true`; pass those hits' `source` and `epmcId` here to read the whole abstract. This is the retrieval path for preprint (`PPR`), patent (`PAT`), and Agricola (`AGR`) records, which frequently carry no PMID and no DOI, so `pubmed_fetch_articles` and `pubmed_fetch_fulltext` cannot address them. Up to 25 records per call.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"pubmed mcp server": {
"pubmed-mcp-server": {
"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"
}
}
}
}
}
McpServers
{
"pubmed-mcp-server": {
"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"
}
}
}
<div align="center">
<h1>@cyanheads/pubmed-mcp-server</h1>
<p><b>Search PubMed/Europe PMC, fetch articles and full text (PMC/EPMC/Unpaywall), citations, MeSH terms via MCP. STDIO or Streamable HTTP.</b>
<div>10 Tools • 1 Resource • 1 Prompt</div>
</p>
</div>
<div align="center">
</div>
<div align="center">
</div>
<div align="center">
Public Hosted Server: https://pubmed.caseyjhand.com/mcp
</div>
---
Tools
10 tools for working with PubMed, PubMed Central, and Europe PMC data:
| Tool | Description |
|:---|:---|
| pubmed_search_articles | Search PubMed with full query syntax, field-specific filters, date ranges, pagination, and optional brief summaries |
| pubmed_europepmc_search | Search Europe PMC for preprints, patents, Agricola, and EPMC-only OA records that don't surface in PubMed. Cursor-based pagination. |
| pubmed_fetch_articles | Fetch full article metadata by PMIDs — abstract, authors, journal, MeSH terms, grants |
| pubmed_fetch_fulltext | Fetch full-text articles via a chain: NCBI PMC EFetch → Europe PMC fullTextXML → Unpaywall. Accepts PMIDs, PMCIDs, or DOIs. |
| pubmed_format_citations | Generate formatted citations in APA 7th, MLA 9th, BibTeX, RIS, or Vancouver (ICMJE/NLM) |
| pubmed_find_related | Find similar articles, citing articles, or references for a given PMID |
| pubmed_spell_check | Spell-check biomedical queries using NCBI's ESpell service |
| pubmed_lookup_mesh | Search and explore MeSH vocabulary — tree numbers, scope notes, entry terms |
| pubmed_lookup_citation | Resolve partial bibliographic references to PubMed IDs via ECitMatch |
| pubmed_convert_ids | Convert between DOI, PMID, and PMCID using the PMC ID Converter API |
pubmed_search_articles
Search PubMed with full NCBI query syntax and filters.
- Free-text queries with PubMed's full boolean and field-tag syntax
- Field-specific filters: author, journal, MeSH terms, language, species
- Common filters: has abstract, free full text
- Date range filtering by publication, modification, or Entrez date
- Publication type filtering (Review, Clinical Trial, Meta-Analysis, etc.)
- Sort by relevance, publication date, author, or journal
- Pagination via offset for paging through large result sets
- Optional brief summaries for top N results via ESummary
- Returns the original query plus the fully applied PubMed query and normalized filter metadata
---
pubmed_fetch_articles
Fetch full article metadata by PubMed IDs.
- Batch fetch up to 200 articles at once (auto-switches to POST for batches >= 100)
- Returns structured data: title, abstract, authors with deduplicated affiliations, journal info, DOI
- Direct links to PubMed and PubMed Central (when available)
- Optional MeSH terms, grant information, and publication types
- Handles PubMed's inconsistent XML (structured abstracts, missing fields, varying date formats)
---
pubmed_fetch_fulltext
Fetch full-text articles via a three-stage chain: NCBI PMC EFetch → Europe PMC fullTextXML → Unpaywall.
- Accepts exactly one of pmcids (direct PMC IDs), pmids (PubMed IDs, auto-resolved), or dois (auto-resolved to PMC via the ID Converter; preprints and EPMC-only OA fall through to Europe PMC / Unpaywall)
- NCBI PMC and Europe PMC both return structured JATS; output records origin via viaSource: "pmc" | "europepmc" | "unpaywall"
- Europe PMC layer (enabled by default; disable with EUROPEPMC_ENABLED=false) recovers PMC-counterpart records that NCBI PMC EFetch missed, and resolves DOI input to PMC counterparts when one exists. EPMC's fullTextXML is PMC-keyed, so preprints (PPR), patents (PAT), and Agricola (AGR) are reachable via pubmed_europepmc_search for metadata but have no full text via this chain.
- Unpaywall layer (enabled by setting UNPAYWALL_EMAIL) resolves DOIs to legal OA copies; extracts HTML landing pages to Markdown via Defuddle or PDFs to text via unpdf
- Discriminated output contract — source: "pmc" (structured sections, regardless of whether it came from PMC or EPMC) or source: "unpaywall" (best-effort body + contentFormat: html-markdown or pdf-text)
- Structured unavailable reasons (not-found, no-pmc-fallback-disabled, no-epmc-fulltext, no-doi, no-oa, fetch-failed, parse-failed, service-error) so callers can retry or explain to users without parsing text
- Each unavailable entry carries idType (pmid / pmcid / doi) and triedTiers — per-tier outcomes (not-attempted, miss, no-fulltext, service-error, …) in execution order, so callers can see which stage failed and why
- Section filtering by title (case-insensitive match, e.g. ["methods", "results"]) and configurable max sections apply to PMC output
- Up to 10 articles per request
---
pubmed_europepmc_search
Search Europe PMC (EBI/EMBL-EBI), a broader open-access biomedical corpus than PubMed alone.
- Surfaces records PubMed search can't reach — preprints (source: PPR), patents (source: PAT), Agricola (source: AGR), plus everything in PubMed (MED) and PMC (PMC). On recent queries this can mean dozens of relevant hits with zero PubMed overlap.
- Default sources ["MED", "PMC", "PPR"]; pass sources to include PAT / AGR
- Cursor-based pagination via cursorMark (unlike pubmed_search_articles, which uses offset) — * for the first page, return nextCursorMark for the next
- Output discriminator on source plus optional pmid / pmcId / doi cross-walking
- Disabled when EUROPEPMC_ENABLED=false; tool is not registered in that case
---
pubmed_format_citations
Generate formatted citations for articles.
- Five citation styles: APA 7th, MLA 9th, BibTeX, RIS, Vancouver (ICMJE/NLM)
- Request multiple styles per article in a single call
- Hand-rolled formatters — zero external dependencies, fully Workers-compatible
- Up to 50 articles per request
- Reports formatted counts and unavailable PMIDs for partial-result handling
---
pubmed_find_related
Find articles related to a source article via ELink.
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





