pubmed-mcp-server

Search and read biomedical literature from PubMed, PubMed Central and Europe PMC

By Casey Hand (individual) TypeScript Remote (hosted) · Streamable HTTPLocal · stdio Web search

60 popularity score ★ 167 ↓ 3.0k/wk

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude Codeterminal
claude mcp add --transport http pubmed-mcp-server https://pubmed.caseyjhand.com/mcp
Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add pubmed -- npx -y @cyanheads/pubmed-mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "pubmed": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/pubmed-mcp-server"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "pubmed": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/pubmed-mcp-server"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "pubmed": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/pubmed-mcp-server"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.pubmed]
command = "npx"
args = ["-y", "@cyanheads/pubmed-mcp-server"]
Gemini CLITerminal
gemini mcp add --scope user pubmed npx -- -y @cyanheads/pubmed-mcp-server
Local (container)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add pubmed -- docker run -i --rm -e MCP_TRANSPORT_TYPE=stdio ghcr.io/cyanheads/pubmed-mcp-server:latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "pubmed": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_TRANSPORT_TYPE=stdio",
        "ghcr.io/cyanheads/pubmed-mcp-server:latest"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "pubmed": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_TRANSPORT_TYPE=stdio",
        "ghcr.io/cyanheads/pubmed-mcp-server:latest"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "pubmed": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_TRANSPORT_TYPE=stdio",
        "ghcr.io/cyanheads/pubmed-mcp-server:latest"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.pubmed]
command = "docker"
args = ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/pubmed-mcp-server:latest"]
Gemini CLITerminal
gemini mcp add --scope user pubmed docker -- run -i --rm -e MCP_TRANSPORT_TYPE=stdio ghcr.io/cyanheads/pubmed-mcp-server:latest

Settings 8

NCBI_API_KEY secret Optional: NCBI API key, raises the rate limit from 3 to 10 requests per second.
NCBI_ADMIN_EMAIL Optional: Contact email sent with NCBI requests.
UNPAYWALL_EMAIL Optional: Contact email for Unpaywall, turns on the Unpaywall full-text fallback. For pubmed_fetch_fulltext.
EUROPEPMC_ENABLED Optional: Set false to drop both Europe PMC tools and every Europe PMC fallback. Default true.
EUROPEPMC_EMAIL Optional: Contact email sent with Europe PMC requests.
NCBI_REQUEST_DELAY_MS Optional: Minimum gap between NCBI request starts in ms, 50-5000 (120 by default with a key). Default 400.
NCBI_MAX_CONCURRENT Optional: Most NCBI requests in flight at once, 1-16. Default 8.
NCBI_TOOL_IDENTIFIER Optional: Tool name sent to NCBI. Default pubmed-mcp-server.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

pubmed-mcp-server gives an assistant read-only access to the biomedical literature indexed by the US National Library of Medicine and Europe PMC. Most calls go to NCBI's E-utilities and the PMC ID Converter. Where NCBI has nothing it falls back to Europe PMC, OpenAlex or Unpaywall, and since 2.11 it also asks NIH iCite for citation metrics.

There are 12 tools. The core pair runs a PubMed query with filters and date ranges, then pulls abstracts, MeSH terms and any retraction or correction notices for up to 200 PMIDs at a time. Full text can be fetched by PMID, PMCID or DOI. Other tools find similar or citing articles, match partial references to PMIDs, convert between identifier types, look up MeSH headings and format references in five citation styles. The newest one returns the Relative Citation Ratio and NIH percentile for a batch of PMIDs. Two more search and fetch Europe PMC records,, where preprints and patents show up. A resource exposes PubMed database metadata, and a prompt outlines a research plan.

You can run it locally over stdio with npx, bunx or Docker, start it as a local Streamable HTTP server, or point a client at the author's public endpoint at pubmed.caseyjhand.com. It is a third-party project by cyanheads, not from NCBI or the NLM.

Since 2.12 the server also hands clients a `pubmed-guide` skill, listed among its resources as skill://pubmed-guide/SKILL.md. It walks the assistant through PubMed query syntax, how to get from a DOI to a PMID when the paper isn't in PMC, resolving a reference list, citation counts, and what to try when full text is missing.

The README's settings table leaves some things out. The config also reads NCBI_TOOL_IDENTIFIER (the tool name sent to NCBI, pubmed-mcp-server by default) and keeps NCBI_REQUEST_DELAY_MS between 50 and 5000 ms. And the 120 ms default gap with an API key is a guess: a comment in the config file says it was worked out from keyless tests, where 400 ms drew no 429s, and was never measured with a key.

What it needs

To run it yourselfNode.js 24+
Runs onmacOS, Windows, Linux
NCBIFreeOptional API key raises the NCBI rate limit from 3 to 10 requests per second

Node.js 24 or later for the npx command, or Bun 1.4.0 or later for bunx, or Docker for the container image. No account is needed. An NCBI API key from your NCBI account settings is optional. The Unpaywall full-text tier works only once UNPAYWALL_EMAIL is set. The hosted endpoint needs nothing installed.

Limits

  • Rate limit Without an NCBI API key the server spaces NCBI calls 400 ms apart by default, 120 ms with a key
  • Size cap pubmed_fetch_fulltext takes up to 50 identifiers per call but fetches only the first 10 and returns the rest in overLimit
  • Not covered Full text comes only from open-access copies in PMC or Europe PMC, or through Unpaywall when UNPAYWALL_EMAIL is set
  • Size cap pubmed_fetch_citation_metrics takes up to 1,000 PMIDs but fetches the first 200 distinct ones per call
  • Not covered iCite metrics carry no retraction flags; pubmed_fetch_articles reports retraction notices
  • Not covered pubmed_convert_ids resolves only articles indexed in PMC
  • Size cap pubmed_search_articles pages no further than offset 9998, the first 9,999 records PubMed serves
  • Limit pubmed_search_articles with no query needs author, journal, meshTerms or publicationTypes, and date or language filters alone are refused
  • Limit Setting EUROPEPMC_ENABLED=false removes both Europe PMC tools, leaving 10

Without an NCBI API key NCBI allows about 3 requests a second, so the server spaces NCBI calls 400 ms apart by default (120 ms with a key). pubmed_fetch_fulltext accepts up to 50 identifiers per call but fetches only the first 10, returning the rest for a follow-up call; it finds full text only for open-access articles in PMC or Europe PMC, or through Unpaywall when UNPAYWALL_EMAIL is set, and Unpaywall text is best-effort. pubmed_convert_ids resolves only PMC-indexed articles. Europe PMC abstracts arrive as 400-character snippets in search results. Setting EUROPEPMC_ENABLED=false removes both Europe PMC tools, so the tool count drops to 10.

Who it suits

Suits researchers, clinicians, students and developers who want an assistant to find, read and cite biomedical papers, check retractions, gauge citation influence or ground queries in MeSH terms. It only reads public literature databases and needs no account, so the hosted endpoint is the quickest way to try it. Run it locally with your own NCBI API key for heavier use or to keep queries off a third-party host. It does not cover paywalled full text, general web search or non-biomedical literature, so pick a general academic or web search server for those.

Tools 12

12 only read. A ? marks an optional parameter.

pubmed_search_articles
Runs a PubMed query or a filter-only search, with date ranges and optional summariesquery?: stringmaxResults?: integeroffset?: integersort?: enumdateRange?: objectpublicationTypes?: arrayauthor?: stringjournal?: stringmeshTerms?: arraylanguage?: stringhasAbstract?: booleanfreeFullText?: booleanspecies?: enumsummaryCount?: integer
pubmed_fetch_articles
Gets metadata, abstracts, MeSH terms and notices for up to 200 PMIDspmids: arrayincludeMesh?: booleanincludeGrants?: booleanincludeInvestigators?: booleanmaxResponseCharacters?: integer
pubmed_fetch_fulltext
Gets full text by PMID, PMCID or DOI from PMC, Europe PMC or Unpaywallpmcids?: arraypmids?: arraydois?: arrayincludeReferences?: booleanincludeTables?: booleanincludeAssets?: booleanmaxSections?: integersections?: arraymaxCharacters?: integermaxCharactersPerSection?: integermaxResponseCharacters?: integeroverflowMode?: enum
pubmed_europepmc_search
Searches Europe PMC, including preprints, patents and Agricola recordsquery: stringpageSize?: integercursorMark?: stringsources?: arrayresultType?: enumsort?: string
pubmed_europepmc_fetch
Gets up to 25 complete Europe PMC records with untruncated abstractsrecords: arraymaxResponseCharacters?: integer
pubmed_fetch_citation_metrics
Gets NIH iCite citation ratio, percentile and counts for PMIDspmids: array
pubmed_format_citations
Formats references as APA, MLA, BibTeX, RIS or Vancouverpmids: arrayformat?: any
pubmed_find_related
Lists similar articles, citing articles or references for a PMIDpmid: stringrelationship?: enummaxResults?: integeroffset?: integer
pubmed_spell_check
Suggests a corrected spelling for a PubMed queryquery: string
pubmed_lookup_mesh
Looks up MeSH headings with tree numbers, scope notes and entry termsquery: stringmaxResults?: integeroffset?: integerincludeDetails?: boolean
pubmed_lookup_citation
Matches up to 25 partial references to PMIDscitations: array
pubmed_convert_ids
Converts between DOI, PMID and PMCIDids: arrayidType: enum

Resources 2

pubmed://database/info
PubMed database metadata from a live EInfo call: record count, last update and search fields
skill://pubmed-guide/SKILL.md
The pubmed-guide skill: query syntax, DOI-to-PMID routes, reference lists, citation counts, full-text misses

Prompts 1

research_plan
Builds a four-phase research plan from a title, goal and keywords

Similar servers