- Home
- MCP servers
- NCBI
NCBI
- python
8
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"vitorpavinato-ncbi-mcp-server": {
"command": "poetry",
"args": [
"run",
"python",
"src/ncbi_mcp_server/server.py"
],
"env": {
"NCBI_EMAIL": "you@example.com",
"NCBI_API_KEY": "YOUR_API_KEY"
}
}
}
}You can query PubMed’s vast literature through a dedicated MCP Server that translates natural language questions into precise PubMed searches. This server helps researchers in life sciences to perform literature reviews, discover relevant studies, and access complete article details efficiently, all through an MCP client interface.
How to use
You connect to the MCP server using an MCP client and run searches by describing your question in natural language. The server converts your request into PubMed queries, retrieves matching records, and returns abstracts, author lists, MeSH terms, DOIs, and publication details. You can refine results with advanced searches, look up related articles, and fetch full article details for papers of interest.
How to install
Prerequisites you need before starting are Python 3.8 or higher and Poetry (recommended) for dependency management.
- Create and initialize the project.
mkdir ncbi-mcp-server && cd ncbi-mcp-server
poetry init
During initialization, add dependencies: mcp, httpx, and typing-extensions.
- Create the project structure and save the server code.
mkdir -p src/ncbi_mcp_server
# Save server.py code as src/ncbi_mcp_server/server.py
- Install dependencies.
poetry install
- Test the server locally.
poetry run python src/ncbi_mcp_server/server.py
- Configure the MCP client integration (Claude Desktop) by adding the MCP server entry to your Claude configuration. The example config below assumes your project lives at the path shown.
{
"mcpServers": {
"ncbi-literature": {
"command": "poetry",
"args": ["run", "python", "src/ncbi_mcp_server/server.py"],
"cwd": "/FULL/PATH/TO/YOUR/ncbi-mcp-server"
}
}
}
Configuration and important notes
To run the server with the best performance, you can use an API key and email alignment for NCBI requests if you implement that in your environment. The server accepts local runtime execution via Poetry and a Python server script. You can deploy in development or production modes as needed.
Troubleshooting
If the server won’t start, ensure you are using Python 3.8 or newer and that all dependencies are installed with Poetry.
If searches return no results, verify your query syntax and consider using broader search terms or enabling dateRange controls in advanced searches.
If you encounter rate limit issues, obtain an NCBI API key and associate it with your requests to increase the limit per second.
Deployment quick reference
Local development and Docker deployment are supported. Use the provided shell commands to install dependencies and run the server, then connect via your MCP client.
The server is designed to be extended with additional data sources and search capabilities as your research needs grow.
Tools and endpoints you can use
You can access several core MCP functions to perform literature searches and retrieve article data.
Available tools
search_pubmed
Primary search tool for PubMed database; accepts query terms, supports field tags, and returns a list of PMIDs with basic metadata.
get_article_details
Fetch complete information for specific PubMed articles, including abstracts, authors, MeSH terms, DOI, and publication details.
search_mesh_terms
Find standardized MeSH terms to improve search precision and discover related concepts.
get_related_articles
Retrieve articles related to a given PubMed ID to aid literature reviews.
advanced_search
Perform complex queries by combining multiple terms, authors, journals, and publication types with logical operators.
get_analytics_summary
Provide an overview of usage, performance, and system health metrics for the MCP server.
get_detailed_metrics
Return detailed performance metrics for a specified time period, with hourly breakdowns and error rates.
reset_analytics
Permanently clear all collected analytics data.