home / mcp / pubmed mcp server
Provides MCP access to PubMed's E-utilities for searching, downloading, and summarizing biomedical articles in XML, JSON, and text formats.
Configuration
View docs{
"mcpServers": {
"aeghnnsw-pubmed-mcp": {
"command": "python",
"args": [
"server.py"
],
"env": {
"NCBI_EMAIL": "[email protected]",
"NCBI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}You run a local MCP server that exposes PubMed’s E-utilities API for searching and downloading biomedical articles. It lets you quickly search PubMed, retrieve metadata and abstracts, and fetch full content when available, all through the MCP interface.
Now that your PubMed MCP Server is running, you can perform practical tasks through an MCP client. You can search PubMed with flexible queries, fetch individual articles, download multiple articles in a single request, and retrieve document summaries that include metadata. Outputs can be returned in XML, JSON, or plain text. If you need to stay within PubMed’s usage limits, the server automatically applies rate limiting.
Common workflows you can perform:
Key tips to get the most from the server:
Install prerequisites and set up a local Python environment, then start the server so you can begin using MCP clients.
# Prerequisites
# - Python 3.8+ installed
# - Optional: git for cloning
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On macOS/Linux
source venv/bin/activate
# On Windows
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Optional: copy environment template for API key and contact email
cp .env.example .env
# Edit .env to include your NCBI API key and email
```} ,{Search PubMed articles by a query and return matching PMIDs and metadata.
Download details for a single PubMed ID in a chosen format (abstract, medline, or full) and return in a specified return format (xml, text, or json).
Download multiple articles in a single request and return combined content along with the list of requested PMIDs.
Fetch document summaries (metadata only) for a list of PubMed IDs.