ncbi
MCP server from vitorpavinato/ncbi-mcp-server
claude mcp add --transport stdio vitorpavinato-ncbi-mcp-server python src/ncbi_mcp_server/server.py
How to use
This MCP server provides programmatic access to PubMed through a Python-based NCBI Literature Search MCP Server. It exposes tools such as search_pubmed for querying PubMed with terms, fields, and filters; get_article_details to fetch full abstracts, authors, MeSH terms, DOIs, and publication data for specific PubMed IDs; search_mesh_terms to discover standardized Medical Subject Headings to improve search precision; get_related_articles to find papers related to a given PubMed ID; and advanced_search to combine multiple criteria (terms, authors, journals, publication types, and date ranges) in a single query. Use these tools to build literature reviews, source background information for projects, or to locate papers addressing specific biological topics, methods, or datasets. The server is designed for researchers across life sciences and biomedicine, enabling AI assistants to perform targeted literature discovery and retrieval with natural-language prompts mapped to PubMed queries.
Typical usage patterns involve forming a natural-language query, selecting the appropriate tool, and letting the MCP translate it into a PubMed query. For example, you can use search_pubmed with a query to retrieve recent machine learning applications in genomics, or use advanced_search to combine terms like CRISPR, evolution, and Nature/Science journal filters. After obtaining a list of PMIDs, you can call get_article_details to fetch detailed article information or get_related_articles to explore related literature to support a literature map or systematic review.
How to install
Prerequisites:
- Python 3.8 or higher
- Poetry (recommended) - https://python-poetry.org/docs/#installation
Step 1: Create and initialize the project
mkdir ncbi-mcp-server && cd ncbi-mcp-server
poetry init
During initialization, add dependencies: mcp, httpx, typing-extensions (you can add them later to pyproject.toml).
Step 2: Create project structure
mkdir -p src/ncbi_mcp_server
# Save server.py code as src/ncbi_mcp_server/server.py
Step 3: Install dependencies
poetry install
Step 4: Run the server for testing
poetry run python src/ncbi_mcp_server/server.py
Step 5: Optional Claude Desktop integration Edit your Claude Desktop config file (paths depend on OS) and add:
{
"mcpServers": {
"ncbi-literature": {
"command": "poetry",
"args": ["run", "python", "src/ncbi_mcp_server/server.py"],
"cwd": "/FULL/PATH/TO/YOUR/ncbi-mcp-server"
}
}
}
Step 6: Alternative setup 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
Additional notes
Notes and tips:
- This server is Python-based; ensure Python 3.8+ is installed. Poetry is recommended for dependency management.
- If you plan to run with Claude Desktop or other clients, ensure the working directory (cwd) in your config points to the actual project path where server.py resides.
- You may need to set up NCBI credentials (email and API key) for higher rate limits; consider exporting environment variables like NCBI_EMAIL and NCBI_API_KEY if your implementation supports them.
- The MCP endpoints exposed include: search_pubmed, get_article_details, search_mesh_terms, get_related_articles, and advanced_search. Use appropriate tool names and arguments as described in the server implementation.
- For production deployments, consider wrapping the server with a process manager (e.g., systemd, PM2-equivalent for Python) and configuring proper logging and error handling.
- If you update dependencies, re-install with poetry install to refresh the environment. Keep the Python version consistent with your deploy target to avoid compatibility issues.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP