ryogena-pubmed-mcp
Provides tools to search PubMed, fetch abstracts, find related articles, and search by author, enabling literature retrieval and citation graph walking.
Click on "Install 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., "@ryogena-pubmed-mcpFind recent papers on CRISPR gene editing"
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.
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 |
| Free-text or full-syntax PubMed query. Returns title, authors, journal, pubdate, DOI, PubMed URL. |
| Full abstract for one PMID, with section labels preserved (Background / Methods / Results / Conclusions). |
| NCBI's "related articles" neighbors — walk the citation graph from any paper. |
| Author publication list using the |
All tools are read-only; PubMed itself is read-only.
Related MCP server: PubMed MCP Server
Install
pip install ryogena-pubmed-mcpOr 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_mcpTry 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_mcpRun 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 -vWhy 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.
Available Tools
4 toolsfetch_articleA
Fetch one article with full abstract text.
Returns title, abstract (with section labels preserved if structured),
authors, journal, pubdate, DOI, and a clickable PubMed URL. Returns
{"error": "NOT_FOUND"} if the PMID is invalid.
| Name | Required | Description | Default |
|---|---|---|---|
| pmid | Yes | PubMed ID. Example: '38123456'. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the return values (title, abstract with section labels, authors, journal, etc.) and the error case (NOT_FOUND for invalid PMID). Missing any mention of side effects or limitations, but for a read-only fetch, this is sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences. The first sentence states the core purpose, and the second enumerates output and error handling. No extraneous words, optimally front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity (1 required parameter, output schema exists), the description covers the essential aspects: what it does, what it returns, and error handling. It could mention input format expectations more explicitly, but the example in schema suffices.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% with a clear description and example for the 'pmid' parameter. The main description adds no further semantics beyond stating the tool's purpose. Baseline score is appropriate as the schema already documents the parameter well.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Fetch one article with full abstract text', specifying the verb 'fetch' and the resource 'one article'. It lists the output fields, distinguishing it from sibling tools that search or find related articles. This is specific and actionable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when a PMID is available through the required parameter, but does not explicitly state when to use this tool versus alternatives like search_pubmed or find_related. No guidance on when not to use or for broader queries.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_by_authorA
Find an author's PubMed-indexed publications.
Wraps search_pubmed with the [au] field qualifier so partial-name
matches don't pollute the result. Newest-first by default — flip sort
to 'relevance' to surface most-cited / highest-impact first.
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | 'pub_date' (default, newest first) or 'relevance'. | pub_date |
| author | Yes | Author name in 'LastName Initials' form. Examples: 'Vick K', 'Doudna JA', 'Jumper J'. | |
| max_results | No | Max papers to return. Default 20, hard cap 100. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully covers behavioral traits: it wraps the underlying search with a field qualifier, sorts by newest-first by default, and allows sorting by relevance. No contradictions are present.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero wasted text. Each part serves a purpose: stating the core function, explaining the wrapping mechanism, stating default behavior, and offering an actionable alternative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, an output schema exists, and the description covers all essential aspects: purpose, behavior, sorting options, and differentiation from siblings. No gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining the default sort ('Newest-first') and the effect of the 'relevance' option ('surface most-cited / highest-impact first'), enhancing understanding beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Find') and a clear resource ('author's PubMed-indexed publications'). It distinguishes from the sibling 'search_pubmed' by explaining it wraps with the '[au]' qualifier, making the tool's unique purpose explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance: use this tool for author-specific searches to avoid partial-name matches, and mentions the default sort order and the option to switch to 'relevance'. It implies 'search_pubmed' is for broader queries, giving clear when-to-use and when-not-to-use information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pubmedA
Search PubMed and return slim metadata for each hit.
Two-step under the hood: esearch gets PMIDs, esummary gets
title/authors/journal/pubdate/DOI for each. Use fetch_article next
when you need the full abstract for a specific result.
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort order: 'relevance' (default), 'pub_date' (newest first), or 'most_cited' (proxy via NCBI ranking). | relevance |
| query | Yes | PubMed query — free text or full PubMed query syntax. Examples: 'JAK2 inhibitor selectivity', 'CRISPR base editing[TI] AND 2024[DP]'. | |
| max_results | No | Max PMIDs to return. Default 20, hard cap 100. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries full burden. It reveals the two-step process (esearch + esummary) and the specific metadata fields returned (title, authors, journal, pubdate, DOI). It does not disclose rate limits, authentication needs, or whether the tool is read-only, but for a public database search, the implied read-only nature is acceptable. The description adds value beyond annotations (which are absent) by explaining internal behavior and output scope.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, each with a distinct purpose: purpose, internal process, next-step advice. No wasted words, front-loaded with the core action. Every sentence is informative and earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (not shown here but flagged as present), the description does not need to detail return structure. It already lists the key fields. The tool has three parameters, all documented in schema, and the description covers the overall behavior, internal steps, and follow-up tool. This is complete for a search tool with clear sibling relationships.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%: all three parameters have clear descriptions in the input schema. The tool description does not add further detail about parameter meaning (e.g., accepted query syntax is mentioned only in schema, not in description). Baseline is 3 because the schema already documents parameters well; the description provides no additional semantic value for parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Search PubMed and return slim metadata for each hit', which is a specific verb-resource combination. It distinguishes from the sibling 'fetch_article' by explicitly noting that tool is for full abstracts. The two-step internal process (esearch + esummary) is also mentioned, providing clarity on what 'slim metadata' means.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit guidance on when to use the sibling 'fetch_article' ('Use fetch_article next when you need the full abstract'). This helps the agent choose the correct tool. However, it does not address other siblings like 'find_related' or 'search_by_author', leaving some gaps in when-not-to-use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: fetch_article gets full text for a PMID, find_related walks citation neighbors, search_by_author targets author queries, and search_pubmed does general search. No overlap in functionality.
All tool names follow a consistent verb_noun pattern with underscores: fetch_article, find_related, search_by_author, search_pubmed. Verbs are descriptive and nouns are specific.
Four tools cover the core PubMed operations (search, fetch, related articles) without unnecessary duplication. The number is within the recommended 3-15 range and well-scoped for the purpose.
The tool set covers the main workflows: searching (general and by author), fetching full articles, and exploring related papers. Minor gaps exist, such as search by topic/MeSH or filtering by date, but agents can accomplish common tasks without dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
PubMed MCP — wraps the NCBI E-utilities API (biomedical literature, free, no auth)
Search biomedical literature, get article details, find related articles, and explore MeSH terms
Search biomedical papers, inspect publication records, and traverse citation or semantic graphs.
Search PubMed/Europe PMC, fetch articles and full text (PMC/EPMC/Unpaywall), citations, MeSH terms.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables searching PubMed's biomedical literature database and retrieving article metadata, abstracts, and full content through the E-utilities API. Supports advanced queries, batch operations, and multiple output formats with automatic rate limiting.1
- FlicenseBqualityFmaintenanceProvides comprehensive access to NCBI's PubMed database of over 36 million biomedical citations, allowing users to search, retrieve, and analyze literature directly through MCP tools. It supports advanced queries, citation management, full-text retrieval from PubMed Central, and precise discovery using MeSH terms.1615
- AlicenseNot gradedqualityCmaintenanceEnables searching and retrieving biomedical literature from PubMed via the NCBI E-utilities API.131MIT
- AlicenseAqualityDmaintenanceEnables searching and fetching articles from PubMed, a database of biomedical literature.21MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KyleVick4/pubmed-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server