MCP Local RAG
Local semantic and keyword search over your own PDF, DOCX, Markdown and text files
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
Opens the app, which asks before it adds the server.
claude mcp add --transport http pubmed-mcp-server https://pubmed.caseyjhand.com/mcpOpens the app, which asks before it adds the server.
claude mcp add pubmed -- npx -y @cyanheads/pubmed-mcp-server{
"mcpServers": {
"pubmed": {
"command": "npx",
"args": [
"-y",
"@cyanheads/pubmed-mcp-server"
]
}
}
}{
"mcpServers": {
"pubmed": {
"command": "npx",
"args": [
"-y",
"@cyanheads/pubmed-mcp-server"
]
}
}
}{
"servers": {
"pubmed": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/pubmed-mcp-server"
]
}
}
}[mcp_servers.pubmed]
command = "npx"
args = ["-y", "@cyanheads/pubmed-mcp-server"]gemini mcp add --scope user pubmed npx -- -y @cyanheads/pubmed-mcp-serverOpens the app, which asks before it adds the server.
claude mcp add pubmed -- docker run -i --rm -e MCP_TRANSPORT_TYPE=stdio ghcr.io/cyanheads/pubmed-mcp-server:latest{
"mcpServers": {
"pubmed": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/pubmed-mcp-server:latest"
]
}
}
}{
"mcpServers": {
"pubmed": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/pubmed-mcp-server:latest"
]
}
}
}{
"servers": {
"pubmed": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/pubmed-mcp-server:latest"
]
}
}
}[mcp_servers.pubmed]
command = "docker"
args = ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/pubmed-mcp-server:latest"]gemini mcp add --scope user pubmed docker -- run -i --rm -e MCP_TRANSPORT_TYPE=stdio ghcr.io/cyanheads/pubmed-mcp-server:latestNCBI_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. |
EUROPEPMC_ENABLED |
Optional: Set false to drop both Europe PMC tools and every Europe PMC fallback. |
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). |
NCBI_MAX_CONCURRENT |
Optional: Most NCBI requests in flight at once, 1-16. |
NCBI_TOOL_IDENTIFIER |
Optional: Tool name sent to NCBI. |
In a container, a setting goes in with -e NAME=value after docker run.
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.
| To run it yourself | Node.js 24+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| NCBI | FreeOptional 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.
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.
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.
12 only read. A ? marks an optional parameter.
pubmed_search_articlesquery?: stringmaxResults?: integeroffset?: integersort?: enumdateRange?: objectpublicationTypes?: arrayauthor?: stringjournal?: stringmeshTerms?: arraylanguage?: stringhasAbstract?: booleanfreeFullText?: booleanspecies?: enumsummaryCount?: integerpubmed_fetch_articlespmids: arrayincludeMesh?: booleanincludeGrants?: booleanincludeInvestigators?: booleanmaxResponseCharacters?: integerpubmed_fetch_fulltextpmcids?: arraypmids?: arraydois?: arrayincludeReferences?: booleanincludeTables?: booleanincludeAssets?: booleanmaxSections?: integersections?: arraymaxCharacters?: integermaxCharactersPerSection?: integermaxResponseCharacters?: integeroverflowMode?: enumpubmed_europepmc_searchquery: stringpageSize?: integercursorMark?: stringsources?: arrayresultType?: enumsort?: stringpubmed_europepmc_fetchrecords: arraymaxResponseCharacters?: integerpubmed_fetch_citation_metricspmids: arraypubmed_format_citationspmids: arrayformat?: anypubmed_find_relatedpmid: stringrelationship?: enummaxResults?: integeroffset?: integerpubmed_spell_checkquery: stringpubmed_lookup_meshquery: stringmaxResults?: integeroffset?: integerincludeDetails?: booleanpubmed_lookup_citationcitations: arraypubmed_convert_idsids: arrayidType: enumpubmed://database/infoskill://pubmed-guide/SKILL.mdresearch_plan