pubmed-mcp
Enables retrieval of full text of PMC Open Access articles using the BioC API.
Integrates with NCBI PubMed and PMC APIs to search, fetch summaries, full records, related links, spelling suggestions, citation matching, and more.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pubmed-mcp search for articles on CRISPR gene therapy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pubmed-mcp
MCP server exposing NCBI PubMed/PMC APIs: E-utilities (search, summaries, full records, links, database info, spelling, citation matching), BioC full text, the Literature Citation Exporter, and the PMC ID Converter.
Table of contents
Related MCP server: mcp-pubmed
Tools
Tool | Parameters | Description |
|
| ESearch — matching UIDs and total count |
|
| ESummary — document metadata for a list of UIDs |
|
| EFetch — full records (abstracts, FASTA, GenBank, etc.) |
|
| ELink — related/cross-referenced records |
|
| EInfo — list of Entrez databases, or fields/links for one database |
|
| EGQuery — result counts across all Entrez databases |
|
| ESpell — spelling-corrected search term |
|
| ECitMatch — batch citation-to-PMID matching |
|
| BioC — full text of a PMC Open Access article |
|
| Literature Citation Exporter — formatted citation |
|
| PMC ID Converter — convert between PMID/PMCID/MID/DOI |
|
| Raw GET request to any of the four underlying APIs |
Environment variables
Variable | Required | Description |
| no | Email reported to NCBI (recommended by their usage policy) |
| no | NCBI E-utilities API key — raises the rate limit from 3 to 10 requests/second |
Wiring it up
Only requirement: uv (https://docs.astral.sh/uv/). Nothing else to install.
Claude Code
claude mcp add pubmed-mcp -- uvx --from git+https://github.com/dam2452/pubmed-mcp.git pubmed-mcpWith optional email/API key:
claude mcp add pubmed-mcp -e PUBMED_MCP_EMAIL=<value> -e PUBMED_MCP_API_KEY=<value> -- uvx --from git+https://github.com/dam2452/pubmed-mcp.git pubmed-mcpClaude Desktop / other MCP client
{
"mcpServers": {
"pubmed-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/dam2452/pubmed-mcp.git", "pubmed-mcp"],
"env": { "PUBMED_MCP_EMAIL": "<value>", "PUBMED_MCP_API_KEY": "<value>" }
}
}
}After pushing a new version: uv cache clean and restart the client.
Local run
uv run --directory . pubmed-mcpTests (manual):
uv run --directory . --with pytest pytest test/Available Tools
12 toolsconvert_idsA
Convert between PubMed IDs, PMCIDs, Author Manuscript IDs, and DOIs via the PMC ID Converter API.
ids accepts up to 200 comma-separated IDs, all of the same type. Type is auto-detected
from format unless idtype is set explicitly. Only returns results for articles present in PMC.
Set versions=True to include manuscript/version history in the response.
Examples: convert_ids(ids="23193287") convert_ids(ids="3531190", idtype="pmcid") convert_ids(ids="10.1093/nar/gks1195", idtype="doi")
Inputs: ids (required), idtype, versions. Returns: object
export_citationA
Export formatted citation(s) for one or more articles via the Literature Citation Exporter.
ids is a comma-separated list of PMIDs (db="pubmed") or PMCIDs (db="pmc").
format: "citation" (formatted human-readable citation), "csl" (Citation Style Language JSON),
"ris" (Research Info Systems), "nbib" (PubMed/MEDLINE tag format). ris/nbib are plain text.
Examples: export_citation(ids="28012456") export_citation(ids="28012456,29886577", format="ris")
Inputs: ids (required), db, format. Returns: object
fetch_recordsA
Fetch full records (EFetch) for a list of UIDs. USE SPARINGLY: records can be large.
rettype/retmode combinations are database-specific, e.g.:
pubmed: rettype="abstract"|"medline", retmode="text"|"xml"
pmc: rettype="full" (retmode="xml")
protein/nuccore: rettype="fasta"|"gb"|"gp", retmode="text"
Response is truncated to max_chars characters; check the "truncated" flag.
Examples: fetch_records(db="pubmed", ids="34523456", rettype="abstract") fetch_records(db="protein", ids="NP_000509.1", rettype="fasta")
Inputs: db (required), ids (required), rettype (required), retmode, +1 more. Returns: object
get_database_infoA
List available Entrez databases (EInfo), or describe searchable fields and link names for one database.
Call without db to list all Entrez database names.
Call with db set to get its indexed fields and available link names.
Examples: get_database_info() get_database_info(db="pubmed")
Inputs: db. Returns: object
get_full_textA
Fetch the full text of a PMC Open Access article in BioC JSON format. USE SPARINGLY: full articles can be large.
Only articles in the PMC Open Access Subset or Author Manuscript Collection are available.
id is a single PubMed ID (e.g. "17299597") or PMC ID (e.g. "PMC1790863") matching id_type.
Response is truncated to max_chars characters; check the "truncated" flag.
Examples: get_full_text(id="17299597") get_full_text(id="PMC1790863", id_type="pmcid")
Inputs: id (required), id_type, encoding, max_chars. Returns: object
get_summariesA
Fetch document summaries (ESummary) for a list of UIDs from an Entrez database.
ids is a comma-separated list of UIDs (e.g. from search_pubmed).
select limits returned fields by name (comma-separated); "*" (default) returns all fields.
Examples: get_summaries(db="pubmed", ids="34523456,34523457") get_summaries(db="pubmed", ids="34523456", select="title,pubdate,authors")
Inputs: db (required), ids (required), select. Returns: object
global_query_countsA
Get the number of results a query would return in every Entrez database at once (EGQuery).
Useful for scoping a search before committing to a specific database with search_pubmed.
Examples: global_query_counts(term="alzheimer's disease")
Inputs: term (required). Returns: object
match_citationsA
Batch match free-text citations against PubMed to retrieve their PMIDs (ECitMatch).
citations holds one or more citation strings in the pipe-delimited ECitMatch format:
"journal_title|year|volume|first_page|author_name|your_key|", one per line, e.g.
"proc natl acad sci u s a|1991|88|3248|mann bj|key1|".
ECitMatch only supports plain-text output; the raw response is returned under "raw_text".
Examples: match_citations(citations="proc natl acad sci u s a|1991|88|3248|mann bj|key1|")
Inputs: citations (required). Returns: object
raw_requestA
Make a raw GET request to one of the four supported NCBI PubMed/PMC APIs. Safety valve for endpoints not covered by other tools.
service selects the base URL: "eutils" (E-utilities), "bioc" (BioC full text),
"citexport" (Literature Citation Exporter), "idconv" (PMC ID Converter).
path is appended to the service base URL (e.g. "esearch.fcgi" for eutils,
"BioC_json/17299597/unicode" for bioc, "pubmed/" for citexport, "" for idconv).
params is a dict of query-string parameters specific to that endpoint.
Examples: raw_request(service="eutils", path="einfo.fcgi", params={"retmode": "json"}) raw_request(service="bioc", path="BioC_xml/PMC1790863/unicode", params={})
Inputs: path (required), params (required), service (required). Returns: object
search_pubmedA
Search an NCBI Entrez database (ESearch) and return matching UIDs plus the total result count.
db defaults to "pubmed" but accepts any Entrez database name (e.g. "pmc", "gene", "protein").
sort accepts database-specific values such as "relevance" or "pub_date" (pubmed).
mindate/maxdate use YYYY/MM/DD, YYYY/MM, or YYYY and require datetype ("pdat" or "edat").
Result is capped at 10000 UIDs per NCBI policy; use retstart to page through more.
Examples: search_pubmed(term="CRISPR AND cancer", retmax=50) search_pubmed(term="covid-19", db="pmc", sort="pub_date", mindate="2024/01/01", maxdate="2024/12/31", datetype="pdat")
Inputs: term (required), db, sort, retmax, +4 more. Returns: object
spelling_suggestionsA
Get a spelling-corrected version of a search term for a given Entrez database (ESpell).
ESpell only supports XML output; the raw XML is returned under "raw_text".
Examples: spelling_suggestions(db="pubmed", term="asthmaa treatment")
Inputs: db (required), term (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Every tool has a clearly distinct purpose: searching, retrieving summaries/full records/full text, converting IDs, exporting citations, finding related links, spelling suggestions, global query counts, database info, and raw requests. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., search_pubmed, get_summaries, convert_ids). The naming is predictable and clearly conveys the action and resource.
12 tools is well-scoped for a PubMed/MEDLINE API wrapper. Each tool serves a specific need in the retrieval workflow, and the count is neither overly large nor too small for the domain.
The tool set covers the entire search and retrieval lifecycle: searching, spelling correction, global counts, database info, summaries, full records, full text, citation export, ID conversion, batch citation matching, and related links. A raw_request tool handles edge cases. No obvious gaps for a read-only PubMed client.
Maintenance
Related MCP Connectors
Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries
PubMed MCP — wraps the NCBI E-utilities API (biomedical literature, free, no auth)
NCBI E-utilities MCP — federated Entrez search/fetch.
Europe PMC MCP — biomedical literature.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that provides access to PubMed articles through the Entrez API.291 PyPI171MIT
- AlicenseAqualityCmaintenanceAn MCP server that provides access to PubMed and NCBI's biomedical literature database for searching articles, retrieving metadata, and tracking citations. It enables users to explore related research, browse MeSH vocabulary, and find free full-text links.6MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides direct access to PubMed and PubMed Central via the NCBI E-utilities API. It enables AI models to search biomedical literature, retrieve detailed article metadata, and download open-access full texts.5MIT
- AlicenseAqualityDmaintenanceA local MCP server enabling PubMed, PMC, and iCite API access via stdio for tools like search, fetch, full text, and citation counts.10207 npm2MIT