PubMed MCP Server
Provides tools for searching PubMed scientific publications, retrieving detailed article information by PMID, and finding similar articles, with filtering, sorting, date ranges, and links to PubMed/DOI/full text.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PubMed MCP Server
A Model Context Protocol (MCP) server that provides access to PubMed scientific publications. Search research papers, retrieve abstracts, and get publication details directly within your Claude Desktop application.
β¨ Features
π Smart PubMed Search - Search scientific publications with advanced filtering
π Detailed Article Info - Get comprehensive publication details by PMID
π Related Articles - Discover similar research papers
π Clickable Links - Direct access to PubMed, DOI, and full-text sources
π Secure API Management - Environment-based API key storage
β‘ Fast & Reliable - Optimized API calls with proper error handling
Related MCP server: NCBI Literature Search MCP Server
π Quick Start
1. Clone the Repository
git clone https://github.com/yourusername/pubmed-mcp-server.git
cd pubmed-mcp-server2. Install Dependencies
pip install -r requirements.txt3. Configure Environment
# Copy the example environment file
cp .env.example .env
# Edit .env with your details
PUBMED_API_KEY=your_api_key_here
PUBMED_EMAIL=your_email@example.com
PUBMED_TOOL_NAME=PubMedMCPServerπ‘ Getting an API Key: Visit NCBI Account Settings to generate a free API key for better rate limits.
4. Test the Server
python test_server.pyπ§ Claude Desktop Integration
1. Locate Your Claude Desktop Config
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
2. Add Server Configuration
{
"mcpServers": {
"pubmed": {
"command": "python",
"args": ["/path/to/your/pubmed-mcp-server/server.py"],
"env": {
"PYTHONPATH": "/path/to/your/pubmed-mcp-server"
}
}
}
}3. Restart Claude Desktop
You should now see PubMed tools available in Claude Desktop! π
π οΈ Available Tools
search_pubmed
Search PubMed for scientific publications with advanced filtering.
Parameters:
query(required): Search terms (e.g., "machine learning healthcare", "CRISPR gene editing")max_results(optional): Results to return (1-50, default: 10)sort(optional): Sort by "relevance", "pub_date", "author", or "journal"date_range(optional): Filter by date ("2020:2024", "last_5_years", "2023")
get_publication_details
Get comprehensive information about a specific publication.
Parameters:
pmid(required): PubMed ID of the publication
get_similar_articles
Find articles similar to a given publication.
Parameters:
pmid(required): Reference publication PMIDmax_results(optional): Number of similar articles (1-20, default: 10)
π¬ Usage Examples
Once connected to Claude Desktop, try these natural language queries:
π "Search PubMed for recent papers on COVID-19 vaccines published in 2024"
π "Get detailed information for PMID 33301246"
π "Find articles similar to PMID 34567890"
π "Look up machine learning applications in radiology from the last 3 years"
𧬠"Search for CRISPR gene editing papers, show me 20 results sorted by date"①API Rate Limits
Without API key: 3 requests/second
With API key: 10 requests/second
The server automatically handles rate limiting and includes retry logic.
π Troubleshooting
Server Won't Start
# Check dependencies
python diagnose.py
# Verify Python version
python --version # Should be 3.8+Claude Desktop Not Connecting
Verify file paths in Claude config
Restart Claude Desktop completely
Check server logs for errors
Ensure .env file is properly configured
No Search Results
Check internet connection
Verify PubMed API accessibility
Try simpler search terms
Check if API key is valid
π API Reference
This server uses the NCBI E-utilities API:
E-search: Find publication PMIDs
E-fetch: Retrieve detailed article information
E-link: Discover related articles
π§ͺ Development
Project Structure
pubmed-mcp-server/
βββ server.py # Main MCP server
βββ test_server.py # Test suite
βββ diagnose.py # Diagnostic tool
βββ requirements.txt # Dependencies
βββ .env.example # Environment template
βββ README.md # DocumentationAdding New Features
New Tools: Extend
_setup_handlers()inserver.pyAPI Endpoints: Add methods following PubMed E-utilities
Data Sources: Integrate other NCBI databases (PMC, Taxonomy, etc.)
Running Tests
python test_server.py
python diagnose.pyπ Requirements
Python: 3.8 or higher
Claude Desktop: Latest version
Dependencies: See
requirements.txtOptional: NCBI API key for better performance
π€ Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
NCBI for the excellent E-utilities API
Claude Desktop for MCP integration
π Support
π Bug Reports: GitHub Issues
π‘ Feature Requests: GitHub Discussions
π§ Contact: your.email@example.com
β Star this repo if it helps your research! β
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Search 36M+ PubMed biomedical articles and ClinicalTrials.gov studies.
Search PubMed, read abstracts and summaries, and find similar articles in NCBI PubMed.
Search PubMed with precision using keyword and journal filters and smart sorting. Uncover MeSH terβ¦
Search biomedical literature, get article details, find related articles, and explore MeSH terms
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to search and retrieve biomedical research articles from PubMed's database of over 35 million citations, including metadata, abstracts, MeSH terms, and full-text PDFs when available.12MIT
- FlicenseNot gradedqualityDmaintenanceProvides seamless access to over 35 million PubMed scientific articles through natural language queries for research discovery and analysis. It enables tools for advanced searches, retrieving article details, and exploring related research within the life sciences and biomedical fields.13-
- AlicenseAqualityDmaintenanceEnables AI agents to search and read PubMed academic literature directly, without requiring an NCBI API key.21MIT
- FlicenseNot gradedqualityDmaintenanceEnables users to search and fetch PubMed biomedical literature articles through natural language queries in Microsoft 365 Copilot.-