- Explore MCP Servers
- ncbi-mcp
Ncbi Mcp
What is Ncbi Mcp
ncbi-mcp is a Model Control Protocol (MCP) adapter designed for seamless interaction with NCBI databases, implemented in Python.
Use cases
Use cases for ncbi-mcp include searching for scientific articles, retrieving gene information, fetching genome details, and accessing specific records from NCBI databases.
How to use
To use ncbi-mcp, clone the repository, install the required dependencies via pip, set up a .env file with your NCBI API key and email, and run the MCP server with the command ‘python ncbi_mcp.py’. You can then interact with the server using natural language queries.
Key features
Key features of ncbi-mcp include natural language query support, easy setup with API key configuration, and the ability to fetch various types of information from NCBI databases, such as research articles, gene data, and genome information.
Where to use
ncbi-mcp can be used in fields such as bioinformatics, genomics, and medical research, where access to NCBI databases is essential for retrieving scientific data.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Ncbi Mcp
ncbi-mcp is a Model Control Protocol (MCP) adapter designed for seamless interaction with NCBI databases, implemented in Python.
Use cases
Use cases for ncbi-mcp include searching for scientific articles, retrieving gene information, fetching genome details, and accessing specific records from NCBI databases.
How to use
To use ncbi-mcp, clone the repository, install the required dependencies via pip, set up a .env file with your NCBI API key and email, and run the MCP server with the command ‘python ncbi_mcp.py’. You can then interact with the server using natural language queries.
Key features
Key features of ncbi-mcp include natural language query support, easy setup with API key configuration, and the ability to fetch various types of information from NCBI databases, such as research articles, gene data, and genome information.
Where to use
ncbi-mcp can be used in fields such as bioinformatics, genomics, and medical research, where access to NCBI databases is essential for retrieving scientific data.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
NCBI Model Context Protocol (MCP)
A Python implementation of the Model Context Protocol for interacting with NCBI databases.
Setup
- Clone this repository
- Install dependencies:
pip install -r requirements.txt - Create a
.envfile with your NCBI API key:NCBI_API_KEY=your_api_key_here [email protected]
Running the MCP Server
python ncbi_mcp.py
Using with Cursor/Claude
Once the MCP server is running, you can interact with it using natural language in Cursor/Claude.
Using Natural Language Queries
You can use natural language to perform searches and retrieve information:
tools/call { "name": "nlp-query", "arguments": { "query": "Find research articles about BRCA1" } }
Or more simply, just use the query directly:
@ncbi-mcp Find research articles about BRCA1
Example Queries
Here are some example queries you can try:
-
Search for scientific articles:
@ncbi-mcp Find the latest research on COVID-19 vaccines -
Get gene information:
@ncbi-mcp Tell me about the BRCA1 gene -
Fetch genome information:
@ncbi-mcp Get genome information for Homo sapiens -
Fetch a specific record:
@ncbi-mcp Get gene ID 70
Testing
To test the MCP server with various queries, you can use the included test files:
# Test natural language query functionality (default) .\run_test.bat # Test all tools .\run_test.bat all # Test specific test file .\run_test.bat test_all_tools.jsonl
The test script will:
- Start the MCP server in background
- Send test requests from the specified file
- Wait for a few seconds to allow processing
- Terminate the server and display the output
This approach is used because the MCP server is designed to run continuously as a service. For manual testing without automatic termination, you can use:
# Run manually with any test file type test_nlp_query.jsonl | python ncbi_mcp.py
The test files contain example JSON-RPC requests that simulate how Cursor/Claude would interact with the MCP server.
Advanced Usage
For more advanced usage, you can directly call the specific tools:
Search NCBI Databases
tools/call { "name": "ncbi-search", "arguments": { "database": "pubmed", "term": "BRCA1", "filters": { "organism": "Homo sapiens", "date_range": { "start": "2020" } } } }
Fetch NCBI Records
tools/call { "name": "ncbi-fetch", "arguments": { "database": "gene", "ids": ["70"], "rettype": "gb" } }
Get Gene Information
tools/call { "name": "get_gene_info", "arguments": { "gene_id": "672" } }
Get Genome Information
tools/call { "name": "get_genome_info", "arguments": { "organism": "Homo sapiens", "reference": true } }
License
Apache-2.0
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










