pubmed-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NCBI_TOOL | No | Optional tool name to identify requests to NCBI. | |
| NCBI_EMAIL | No | Email address for NCBI. Also can be used instead of UNPAYWALL_EMAIL for open-access features. Optional, but NCBI usage policy asks for one. | |
| NCBI_API_KEY | No | Optional API key for higher NCBI rate limits (10 req/s instead of 3 req/s). | |
| PUBMED_PDF_DIR | No | Directory where downloaded open-access PDFs are saved. | ~/pubmed_pdfs |
| UNPAYWALL_EMAIL | No | Email address for the Unpaywall API. Set either UNPAYWALL_EMAIL or NCBI_EMAIL for open-access features. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_pubmedB | Search PubMed (NCBI esearch) and return PMIDs exactly as NCBI returns them. Args:
query: PubMed query; supports field tags, MeSH and Boolean, e.g.
'"hypertrophic cardiomyopathy"[MeSH] AND mavacamten[tiab] AND randomized controlled trial[pt]'.
max_results: 1-200 (default 20). |
| fetch_abstractsA | Fetch exact PubMed records (NCBI efetch) for up to 200 PMIDs. Per record: pmid, title, authors, journal, pub_date, doi, publication_types, has_retraction_notice,
abstract (structured abstracts keep their section labels), url.
Any field PubMed does not provide is the literal string 'Data not provided in PubMed abstract'.
PMIDs NCBI did not return are listed in |
| check_accessA | Classify each PMID as open-access PDF, open-access landing page only, no open access found (likely paywalled), or unchecked. Uses DOI -> Unpaywall and PMCID -> PubMed Central. 'no_open_access_found' means no legal free copy is indexed; it does not prove the paper cannot be reached through an institution. Max 100 PMIDs per call. Needs UNPAYWALL_EMAIL (or NCBI_EMAIL) for the Unpaywall lookup; without it only PubMed Central links are found. |
| search_with_accessB | Run a PubMed search, then report for every hit whether a legal open-access PDF exists or the paper looks paywalled. max_results is capped at 100 here. Returns query_translation and total_matches (as search_pubmed) plus counts and four lists: open_access_pdf, open_access_landing_page_only, no_open_access_found, unchecked. |
| download_pdfsA | Download open-access PDFs for the given PMIDs (max 50) as PMID.pdf. Paywalled papers are skipped, never bypassed. folder: absolute path, or a sub-folder name under PUBMED_PDF_DIR (default ~/pubmed_pdfs). Every file is verified to be a real PDF (starts with %PDF); HTML login/bot-check pages are rejected and reported as failed. |
| pubmed_database_infoA | Get metadata, last update date, record count, and search field tags for an NCBI database (default: 'pubmed'). Provides audit-grade database metadata and field definitions directly from NCBI EInfo. |
| pubmed_searchB | Search PubMed (NCBI esearch) with reproducibility object, query translation, and audit provenance. Args: query: PubMed query; supports field tags, MeSH, and Boolean logic. max_results: 1-200 (default 20). start: Result offset / retstart for pagination (default 0). sort: 'relevance' or 'pub_date' (newest first). date_from / date_to: Optional publication-year bounds. use_history: If True, stores search on NCBI Entrez History server (returns webenv & query_key). |
| pubmed_fetchA | Fetch exact PubMed records (NCBI efetch) with per-record status and provenance. Every field comes strictly from the NCBI response; missing fields are flagged and never inferred. Returns records with 'status': 'success' and unretrieved items with 'status': 'not_found'. |
| pubmed_getA | Retrieve a single PubMed record by PMID in normalized mode or raw verbatim XML. Args: pmid: PubMed identifier (1-9 digits). mode: 'normalized' (default) returns deterministic schema with structured missingness indicators; 'raw' returns verbatim XML with SHA-256 integrity hash for auditing. |
| pubmed_batch_fetchA | Batch fetch PubMed records in chunks supporting long PMID lists (>200) or NCBI Entrez History. Supports two retrieval modes:
Args: pmids: Optional list of PMIDs (arbitrary length; chunked into batch_size). webenv: Optional NCBI WebEnv token from a prior pubmed_search(..., use_history=True). query_key: Optional NCBI QueryKey token from a prior pubmed_search. retstart: Starting offset for pagination (default 0). total_records: Total records to retrieve in Entrez History mode (if omitted, queries history count). batch_size: Number of records per chunk (1-200, default 200). Returns: Comprehensive batch execution report, per-batch results, per-record statuses ('status': 'success'), not_found PMIDs, and audit provenance. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
pubmed_search and search_pubmed are functionally near-identical (both run NCBI esearch and return PMIDs/query translation), and pubmed_fetch, fetch_abstracts, and pubmed_batch_fetch all wrap efetch with only minor output differences. check_access vs search_with_access also overlap, leaving several boundaries unclear despite good descriptions.
Names mix a pubmed_ prefix (pubmed_search, pubmed_fetch, pubmed_get, pubmed_batch_fetch, pubmed_database_info) with bare verb_noun forms (fetch_abstracts, check_access, download_pdfs) and an unconventional reversed form (search_pubmed). The search pair differing only by word order is especially confusing.
Ten tools is a reasonable scope for a PubMed retrieval server, but several tools are redundant variants of the same underlying operation rather than distinct capabilities. The count itself is fine; the duplication is the issue.
The surface covers the core retrieval lifecycle well: search, single/multi/batch fetch, normalized or raw output, access classification, and PDF download. Minor gaps exist (no citation/related-article or export formats like RIS/BibTeX), which agents can work around.