Provides containerization support with built-in Docker integration, enabling easy deployment and consistent runtime environment through provided Dockerfile and docker-compose configurations.
Used for configuration management, allowing users to set up required NCBI API credentials and optional settings like cache parameters and rate limits through environment variables.
Integrates with GitHub for issue tracking, documentation hosting via wiki, and community discussions, providing support channels for users of the MCP server.
Provides advanced PubMed literature search capabilities with complex filters, citation formatting in multiple formats, article details retrieval, author search, related article discovery, MeSH term exploration, journal analysis, and research trend analysis.
Utilized for data validation and modeling within the MCP server, enabling structured handling of PubMed data and tool requests.
Built on Python with specific version requirements (3.8+), leveraging Python's ecosystem for the MCP server implementation.
PubMed MCP Server
A comprehensive Model Context Protocol (MCP) server for PubMed literature search and management. This server provides advanced search capabilities, citation formatting, and research analysis tools through the MCP protocol.
Features
- Advanced PubMed Search: Search with complex filters including date ranges, article types, authors, journals, and MeSH terms
- Article Details: Retrieve detailed information for specific PMIDs including abstracts, authors, and metadata
- Citation Export: Export citations in multiple formats (BibTeX, APA, MLA, Chicago, Vancouver, EndNote, RIS)
- Author Search: Find articles by specific authors with co-author information
- Related Articles: Discover articles related to a specific PMID
- MeSH Term Search: Search and explore Medical Subject Headings
- Journal Analysis: Get metrics and recent articles from specific journals
- Research Trends: Analyze publication trends over time
- Article Comparison: Compare multiple articles side by side
- Caching: Built-in caching for improved performance
- Rate Limiting: Respectful API usage with configurable rate limits
Installation
Prerequisites
- Python 3.8 or higher
- NCBI API key (free registration required)
- Valid email address for NCBI API identification
Quick Start
- Clone the repository:
- Install dependencies:
- Set up environment variables:
- Run the server:
Development Installation
For development with additional tools:
Or manually:
Configuration
Create a .env
file in the project root with the following variables:
Getting an NCBI API Key
- Visit NCBI Account Settings
- Sign in or create an account
- Navigate to "API Key Management"
- Create a new API key
- Copy the key to your
.env
file
Usage
Available Tools
The server provides the following MCP tools:
1. search_pubmed
Search PubMed with advanced filtering options.
2. get_article_details
Get detailed information for specific PMIDs.
3. search_by_author
Search for articles by a specific author.
4. export_citations
Export citations in various formats.
5. find_related_articles
Find articles related to a specific PMID.
6. search_mesh_terms
Search using MeSH terms.
7. analyze_research_trends
Analyze publication trends over time.
Example Usage with MCP Client
Development
Running Tests
Code Quality
Project Structure
Docker
Build and Run
Docker Compose
API Reference
Search Parameters
query
: Search query using PubMed syntaxmax_results
: Maximum number of results (1-200)sort_order
: Sort order (relevance, pub_date, author, journal, title)date_from
/date_to
: Date range filtersdate_range
: Predefined ranges (1y, 5y, 10y, all)article_types
: Filter by publication typesauthors
: Filter by author namesjournals
: Filter by journal namesmesh_terms
: Filter by MeSH termslanguage
: Language filter (e.g., 'eng', 'fre')has_abstract
: Only articles with abstractshas_full_text
: Only articles with full texthumans_only
: Only human studies
Citation Formats
bibtex
: BibTeX formatapa
: APA stylemla
: MLA stylechicago
: Chicago stylevancouver
: Vancouver styleendnote
: EndNote formatris
: RIS format
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
Development Guidelines
- Follow PEP 8 style guidelines
- Add type hints to all functions
- Write comprehensive tests
- Update documentation for new features
- Use conventional commit messages
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Issues: GitHub Issues
- Documentation: Project Wiki
- Discussions: GitHub Discussions
Acknowledgments
- NCBI E-utilities for PubMed API access
- Model Context Protocol for the MCP specification
- Anthropic for MCP development and support
Changelog
See CHANGELOG.md for a detailed history of changes.
Note: This server requires a valid NCBI API key and follows NCBI's usage guidelines. Please be respectful of API rate limits and terms of service.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A comprehensive Model Context Protocol server that enables advanced PubMed literature search, citation formatting, and research analysis through natural language interactions.
Related MCP Servers
- -securityFlicense-qualityAn MCP server implementation that enables searching and retrieving research articles from PubMed with specific focus on open access content filtering and full-text link retrieval.Last updated -43JavaScript
- AsecurityAlicenseAqualityA Model Context Protocol server that provides access to the DBLP computer science bibliography database, allowing AI models to search publications, process citations, and generate accurate BibTeX entries.Last updated -61PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server providing AI assistants with access to healthcare data tools, including FDA drug information, PubMed research, health topics, clinical trials, and medical terminology lookup.Last updated -6Python
- -securityAlicense-qualityA Model Context Protocol server that enables querying the Crossref API to search for academic publications by title, author, or DOI, returning structured metadata about scholarly works.Last updated -JavaScriptMIT License