ryogena-pubmed-mcp
A small, focused Model Context Protocol server that exposes NCBI PubMed as MCP tools, so any MCP-compatible client (Claude Desktop, Claude Code, custom agents) can search the literature, fetch abstracts, walk the citation graph, and look up an author's publications without leaving the chat.
No API key required. An optional NCBI_API_KEY raises the rate limit
from 3 → 10 requests/sec.
Tools
| Tool | What it does |
|---|---|
search_pubmed(query, max_results, sort) |
Free-text or full-syntax PubMed query. Returns title, authors, journal, pubdate, DOI, PubMed URL. |
fetch_article(pmid) |
Full abstract for one PMID, with section labels preserved (Background / Methods / Results / Conclusions). |
find_related(pmid, max_results) |
NCBI's "related articles" neighbors — walk the citation graph from any paper. |
search_by_author(author, max_results, sort) |
Author publication list using the [au] field qualifier. |
All tools are read-only; PubMed itself is read-only.
Install
pip install ryogena-pubmed-mcp
Or from source:
git clone https://github.com/KyleVick4/pubmed-mcp
cd pubmed-mcp
pip install -e .
Configure in Claude Desktop
Edit your claude_desktop_config.json:
{
"mcpServers": {
"pubmed": {
"command": "python",
"args": ["-m", "pubmed_mcp"],
"env": {
"NCBI_API_KEY": "<optional>",
"NCBI_EMAIL": "<optional, recommended by NCBI>"
}
}
}
}
Restart Claude Desktop. The pubmed server should show up in the MCP
panel with four tools.
Configure in Claude Code
claude mcp add pubmed -- python -m pubmed_mcp
Try it
Once wired up:
Find me the three most-cited papers on JAK2 V617F selectivity from 2023, then pull the abstract of the top hit.
Claude will plan a search_pubmed → fetch_article chain and cite each
paper with its DOI and PubMed URL.
Verify the server before debugging your client
Use the MCP Inspector — it's the fastest way to see if the server starts cleanly and the tools register:
npx @modelcontextprotocol/inspector python -m pubmed_mcp
Run the tests
The test suite is hermetic — no NCBI requests, no network. Every HTTP
call is intercepted by httpx.MockTransport.
pip install -e ".[dev]"
pytest -v
Why this exists
I built Pico, a closed-source AI-native drug discovery platform, with its own MCP server that exposes molecule and assay tools to Claude Desktop. Building ryogena-pubmed-mcp in the open lets me share the integration patterns I use — slim LLM-friendly projections, hermetic test design, error-envelope contracts — without exposing the domain code.
If you're building an MCP server and want a tiny reference, the
server.py and
tests/test_tools.py files together are about
500 lines and demonstrate the full pattern.
License
MIT — see LICENSE.
Metadata
Release files for ryogena-pubmed-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ryogena_pubmed_mcp-0.1.1.tar.gz | 10.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ryogena_pubmed_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.9 kB
Release files / ryogena_pubmed_mcp-0.1.1.tar.gz
| Download URL | ryogena_pubmed_mcp-0.1.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26ebf63e02344708e851378b6787a9f17d9e2ddf9d16d576246c9c6bb1aee783
|
|
BLAKE2b-256 checksum How to use checksums |
a0b8fd6f52242577b27ccbf42dcdb372c07701940060b89b35784c8c98cad084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / ryogena_pubmed_mcp-0.1.1-py3-none-any.whl
| Download URL | ryogena_pubmed_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c329f864503fd7e63fbf23dc0bdd13463e9f6a9b5e158789962d777fb18ca95
|
|
BLAKE2b-256 checksum How to use checksums |
a661b1aca48211c6da846f98423893047c559cd26b08523976da80c87e88466c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for ryogena-pubmed-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.