pubmed
pubmed mcp server
claude mcp add --transport stdio hanxuanliang-pubmed-mcp-server uvx main.py \ --env DOWNLOAD_PATH="Path to store PDFs (default: /tmp/pubmed-pdfs)"
How to use
PubMed MCP Server provides a FastAPI-based MCP interface to search PubMed, retrieve article metadata, and download PMC PDFs. It exposes endpoints that allow clients to search PubMed by keywords, fetch detailed information for specific PubMed IDs (including title, abstract, authors, and keywords), and download related PMC article PDFs to a local directory specified by configuration. The server is designed to be used with an MCP client, which can configure the PubMed endpoint and consume data via the provided API in SSE mode for streaming updates or results. Typical usage involves running the server locally, then querying the search endpoint with a keyword to retrieve a list of articles, followed by requesting metadata for a chosen article and initiating a PDF download to the configured path.
How to install
Prerequisites:
- Python 3.12+ installed
- Internet access to install dependencies
Installation steps:
- Clone the repository
git clone https://github.com/yourusername/pubmed-mcp-server.git
cd pubmed-mcp-server
- Create and activate a Python environment and install uv as described in the project
pip install uv
- Install project dependencies (via pyproject.toml)
pip install -r <requirements-if-any.txt> || python -m pip install .
- Configure environment variables
# Create a config file or set environment variables as needed
echo "DOWNLOAD_PATH=/path/to/store/pdfs" > .env
- Run the server using uv
uv run main.py
- Verify the server is running at http://localhost:8977
Additional notes
Environment variable DOWNLOAD_PATH controls where downloaded PDFs are stored; if not set, the default is /tmp/pubmed-pdfs. Ensure network access to PubMed/PubMed Central services. The server runs on port 8977 by default, so if you have a firewall or proxy, adjust rules accordingly. If you encounter issues with dependencies, recreate the virtual environment with uv sync and install the required packages from pyproject.toml. When using the MCP client, configure the PubMed endpoint URL and enable SSE if supported for streaming results.
Related MCP Servers
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
mcp-yfinance
Real-time stock API with Python, MCP server example, yfinance stock analysis dashboard
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
cloudwatch-logs
MCP server from serkanh/cloudwatch-logs-mcp
servicenow-api
ServiceNow MCP Server and API Wrapper
the -company
TheMCPCompany: Creating General-purpose Agents with Task-specific Tools