P
Pubmed MCP
by @Simon37645
A lightweight stdio MCP server for PubMed search via the NCBI E-utilities API.
Created 4/2/2026
Updated about 7 hours ago
README
Repository documentation and setup instructions
PubMed MCP
A lightweight stdio MCP server for PubMed search via the NCBI E-utilities API.
This open-source copy removes machine-specific paths and does not include any credentials.
Features
search_pubmed- Returns up to 50 records per request
- Output includes
pmid,title, andabstract - No dependency on the Python
mcppackage
Requirements
- Python 3.10+
requests- An NCBI API key
Installation
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
Authentication
By default the server reads credentials from ./auth.json.
You can also override the path with PUBMED_AUTH_FILE.
- Copy
auth.example.jsontoauth.json - Fill in your own credentials
- Do not commit
auth.json
Example:
{
"api_key": "your_ncbi_api_key",
"email": "your_email@example.com"
}
Run
python server.py
Codex MCP Configuration
[mcp_servers.pubmed-search]
command = "python"
args = ["/path/to/pubmed-mcp/server.py"]
[mcp_servers.pubmed-search.env]
PUBMED_AUTH_FILE = "/path/to/pubmed-mcp/auth.json"
Notes
- The server only reads credentials locally and never returns them in tool output.
limitmust be between1and50.- The default upstream endpoint is
https://eutils.ncbi.nlm.nih.gov/entrez/eutils.
Files
server.py: MCP server implementationauth.example.json: local credential templateREADME_zh_cn.md: Chinese documentationLICENSE: MIT license
License
MIT. See LICENSE.
Quick Setup
Installation guide for this server
Install Package (if required)
uvx pubmed-mcp
Cursor configuration (mcp.json)
{
"mcpServers": {
"simon37645-pubmed-mcp": {
"command": "uvx",
"args": [
"pubmed-mcp"
]
}
}
}