MCP.so
Sign In

PubMed MCP Server

@cyanheads

About PubMed MCP Server

Search PubMed/Europe PMC, fetch articles and full text (PMC/EPMC/Unpaywall), citations, MeSH terms via MCP. STDIO or Streamable HTTP.

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "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"
      }
    }
  }
}

Tools

11

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.

Fetch full article metadata by PubMed IDs. Returns detailed article information including abstract, authors, journal, MeSH terms.

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).

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.

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.

Spell-check a query and get NCBI's suggested correction. Useful for refining search queries.

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.

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.

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.

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.

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.

Overview

What is PubMed MCP Server?

A biomedical literature retrieval server that integrates PubMed, Europe PMC, and Unpaywall into MCP. It offers 10 tools for searching articles, fetching metadata and full text, formatting citations, exploring MeSH terms, and converting identifiers. Designed for researchers, clinicians, and AI agents needing structured access to life‑science publications.

How to use PubMed MCP Server?

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.

Key features of PubMed MCP Server

  • 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

Use cases of PubMed MCP Server

  • Rapid literature search with field‑specific filters and date ranges
  • Batch retrieval of article metadata and full text for systematic reviews
  • Citation formatting and bibliography generation in multiple styles
  • AI‑assisted research planning with the research_plan prompt
  • Building biomedical search tools with provenance‑aware output

FAQ from PubMed MCP Server

What’s the difference between pubmed_search_articles and pubmed_europepmc_search?

pubmed_search_articles uses NCBI E‑utilities and returns only PubMed‑indexed articles. pubmed_europepmc_search queries Europe PMC and also covers preprints, patents, and Agricola records not found in PubMed.

How does full‑text retrieval work?

pubmed_fetch_fulltext tries NCBI PMC EFetch first, falls back to Europe PMC fullTextXML, then to Unpaywall for legal OA copies. The source of each result is marked (pmc, europepmc, or unpaywall). Unpaywall requires setting UNPAYWALL_EMAIL.

What citation styles are available?

APA 7th, MLA 9th, BibTeX, RIS, and Vancouver (ICMJE/NLM). All formatters are hand‑rolled with zero external dependencies.

How do I run the server locally?

Add it to your MCP client config with "command": "bunx", "args": ["@cyanheads/pubmed-mcp-server@latest"] and set "MCP_TRANSPORT_TYPE": "stdio". Alternatively, use the public HTTP endpoint.

What are the batch size limits?

Fetch articles: up to 200. Full text: up to 10. Citations: up to 50. ID conversion: up to 50. Citation lookup: up to 25. Larger requests return per‑item results with structured errors, not batch failures.

Frequently asked questions

What’s the difference between `pubmed_search_articles` and `pubmed_europepmc_search`?

`pubmed_search_articles` uses NCBI E‑utilities and returns only PubMed‑indexed articles. `pubmed_europepmc_search` queries Europe PMC and also covers preprints, patents, and Agricola records not found in PubMed.

How does full‑text retrieval work?

`pubmed_fetch_fulltext` tries NCBI PMC EFetch first, falls back to Europe PMC `fullTextXML`, then to Unpaywall for legal OA copies. The source of each result is marked (`pmc`, `europepmc`, or `unpaywall`). Unpaywall requires setting `UNPAYWALL_EMAIL`.

What citation styles are available?

APA 7th, MLA 9th, BibTeX, RIS, and Vancouver (ICMJE/NLM). All formatters are hand‑rolled with zero external dependencies.

How do I run the server locally?

Add it to your MCP client config with `"command": "bunx", "args": ["@cyanheads/pubmed-mcp-server@latest"]` and set `"MCP_TRANSPORT_TYPE": "stdio"`. Alternatively, use the public HTTP endpoint.

What are the batch size limits?

Fetch articles: up to 200. Full text: up to 10. Citations: up to 50. ID conversion: up to 50. Citation lookup: up to 25. Larger requests return per‑item results with structured errors, not batch failures.

Comments

More Data & Analytics MCP servers