Search PubMed's 35+ million articles through natural language queries
NCBI Literature Search MCP Server
A Model Context Protocol (MCP) server for searching NCBI databases, designed for researchers across all life sciences and biomedical fields. This server provides seamless access to PubMed's vast collection of 35+ million scientific articles through natural language queries, enabling AI assistants to help with literature reviews, research discovery, and scientific analysis.
Features
š¬ Comprehensive Search: Search PubMed's 35+ million articles across all biological disciplines
š Advanced Queries: Support for complex searches with boolean operators, field tags, and filters
𧬠Life Sciences Research: Covers all biological and biomedical fields including genetics, ecology, medicine, and biotechnology
š» Computational Biology: Perfect for finding bioinformatics methods, algorithms, and computational tools
š¬ Research Applications: Literature reviews, hypothesis generation, method discovery, and staying current with scientific advances
š Full Article Details: Get abstracts, author lists, MeSH terms, DOIs, and publication information
š Related Articles: Discover relevant research through NCBI's relationship algorithms
š MeSH Integration: Search and utilize Medical Subject Headings for precise terminology
Quick Start
Prerequisites
- Python 3.8 or higher
- Poetry (recommended) - Install Poetry
Setup (5 minutes)
Create and initialize project
mkdir ncbi-mcp-server && cd ncbi-mcp-server poetry initDuring init, add dependencies:
mcp,httpx,typing-extensionsCreate project structure
mkdir -p src/ncbi_mcp_server # Save server.py code as src/ncbi_mcp_server/server.pyInstall dependencies
poetry installTest the server
poetry run python src/ncbi_mcp_server/server.pyConfigure Claude Desktop
Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
Add this configuration:
{ "mcpServers": { "ncbi-literature": { "command": "poetry", "args": ["run", "python", "src/ncbi_mcp_server/server.py"], "cwd": "/FULL/PATH/TO/YOUR/ncbi-mcp-server" } } }- macOS:
Restart Claude Desktop and start searching!
Alternative Setup Methods
Click to expand alternative installation methods
**Conda Environment**
conda env create -f environment.yml
conda activate ncbi-mcp
python server.py
**Standard pip + venv**
python -m venv venv
source venv/bin/activate # Linux/macOS
pip install -r requirements.txt
python server.py
Usage Examples
For Evolutionary Biology Research
Search for phylogenetic studies:
"Search for recent phylogenetic analysis papers on mammalian evolution"
ā Uses: search_pubmed with query "phylogenetic analysis[ti] AND mammalian[ti] AND evolution"
Find computational phylogenetics methods:
"Find papers about maximum likelihood methods for phylogenetic reconstruction"
ā Uses: search_pubmed with query "maximum likelihood[ti] AND phylogenetic reconstruction"
Search by specific organism:
"Find recent papers on Drosophila comparative genomics"
ā Uses: search_pubmed with query "Drosophila[ti] AND comparative genomics[ti]"
For Computational Biology Research
Algorithm and method papers:
"Search for machine learning applications in genomics from the last 2 years"
ā Uses: search_pubmed with date_range="730" and query "machine learning AND genomics"
Software and database papers:
"Find papers about new bioinformatics tools for sequence analysis"
ā Uses: search_pubmed with query "bioinformatics[ti] AND software[ti] AND sequence analysis"
Advanced Search Examples
Multi-criteria search:
"Find review articles about CRISPR applications in evolutionary studies published in Nature or Science"
ā Uses: advanced_search with terms=["CRISPR", "evolution"], publication_types=["Review"], journals=["Nature", "Science"]
Author-specific searches:
"Find recent papers by researchers working on ancient DNA and phylogenomics"
ā Uses: search_pubmed with query "ancient DNA[ti] AND phylogenomics[ti]"
Tool Reference
`search_pubmed`
Primary search tool for PubMed database
- query: Search terms (supports field tags like
[ti]for title,[au]for author,[mh]for MeSH terms) - max_results: Number of results (1-100, default: 20)
- sort: Sort by "relevance", "pub_date", "author", or "journal"
- date_range: Limit to recent articles ("30", "90", "365", "1095" days)
Examples:
"CRISPR[ti] AND evolution"- CRISPR
Tools (1)
search_pubmedPrimary search tool for PubMed databaseConfiguration
{"mcpServers": {"ncbi-literature": {"command": "poetry", "args": ["run", "python", "src/ncbi_mcp_server/server.py"], "cwd": "/FULL/PATH/TO/YOUR/ncbi-mcp-server"}}}