PubMed Search — Claude Code MCP server for biomedical literature
An MCP server that connects your agent to PubMed, Europe PMC, OpenAlex and CORE: article search, citations, full texts and figure captions.
claude mcp add --env NCBI_EMAIL=<NCBI_EMAIL> --env NCBI_API_KEY=<NCBI_API_KEY> --transport stdio pubmed-search -- uvx pubmed-search-mcpWhat PubMed Search does
You run it from PyPI with uvx over stdio. The package exposes 41 tools: plain search, pipeline mode, citation snowballing and a research chronicle whose rebuilds get compared between revisions. Open-access PMC articles also yield figure captions, image links and PDFs.
NCBI calls are keyed, so NCBI_API_KEY and NCBI_EMAIL go into the environment at install time. There is a multi-tenant mode with per-tenant sessions, caches and bearer-token auth, meant for serving several agents from one deployment.
Bundled extras include 26 workflow skills aimed at Claude and a Copilot setup guide for VS Code. If the same article keeps coming back in a session, options="exclude_seen" drops PMID and DOI identities already returned — outside pipeline mode, which rejects the flag with pipeline=.
What it helps with
- search PubMed and Europe PMC for a topic in one call
- follow which papers cite a key study
- pull figure captions and PDF links from open-access PMC articles
- diff two runs of a search pipeline
- serve several agents from one server with separate sessions
Example prompts for the agent
- Search PubMed for CRISPR reviews from the last two years, most cited first
- Snowball the citations of the paper with PMID 31234567 across PubMed and Europe PMC
- Run an OpenAlex search and skip anything already returned in this session
How to install PubMed Search
Platform CLI
claude mcp add --env NCBI_EMAIL=<NCBI_EMAIL> --env NCBI_API_KEY=<NCBI_API_KEY> --transport stdio pubmed-search -- uvx pubmed-search-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubmed-search-mcp <command>
Platform CLI
codex mcp add pubmed-search --env NCBI_EMAIL=<NCBI_EMAIL> --env NCBI_API_KEY=<NCBI_API_KEY> -- uvx pubmed-search-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubmed-search-mcp <command>
Config file
{
"mcpServers": {
"pubmed-search": {
"command": "uvx",
"args": [
"pubmed-search-mcp"
],
"env": {
"NCBI_EMAIL": "<NCBI_EMAIL>",
"NCBI_API_KEY": "<NCBI_API_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubmed-search-mcp <command>
Config file
{
"servers": {
"pubmed-search": {
"type": "stdio",
"command": "uvx",
"args": [
"pubmed-search-mcp"
],
"env": {
"NCBI_EMAIL": "<NCBI_EMAIL>",
"NCBI_API_KEY": "<NCBI_API_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubmed-search-mcp <command>
Platform CLI
gemini mcp add -e NCBI_EMAIL=<NCBI_EMAIL> -e NCBI_API_KEY=<NCBI_API_KEY> pubmed-search uvx pubmed-search-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubmed-search-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about PubMed Search
How do I install PubMed Search in Claude Code?
Run claude mcp add pubmed-search-mcp -e NCBI_API_KEY=<NCBI_API_KEY> -- uvx pubmed-search-mcp. Or add it with claude mcp add --env NCBI_EMAIL=<NCBI_EMAIL> --env NCBI_API_KEY=<NCBI_API_KEY> --transport stdio pubmed-search -- uvx pubmed-search-mcp.
What does PubMed Search do?
It gives an agent literature search and analysis over several biomedical sources at once: papers, citations, full texts and publication records. The server ships 41 tools plus pipeline mode.
What does the server need to run?
NCBI_API_KEY and NCBI_EMAIL are passed as environment variables when you register it. The server itself launches from PyPI via uvx and needs Python 3.10 or newer.