home / mcp / ncbi gene mcp server
Provides an MCP server to query NCBI Gene/Protein data via Entrez and return structured gene metadata and protein details.
Configuration
View docs{
"mcpServers": {
"mohammadnajeeb-ncbi_gene_mcp_client": {
"command": "ncbi_gene_mcp_client-server",
"args": [],
"env": {
"ENV_VAR_PLACEHOLDER": "<optional>"
}
}
}
}You can use this MCP server to fetch gene and protein metadata from the NCBI Entrez API and expose it to MCP-compatible clients as simple, structured JSON data. This server lets you search for genes, retrieve detailed gene and protein information, and perform symbol-based queries, while respecting NCBI rate limits.
You run the MCP server and connect to it from MCP clients to perform gene and protein queries. Use the provided commands to start the server, then invoke the available tools from your client to search genes, fetch gene info by ID, fetch protein info by ID, and search by symbol with optional organism filters.
Key capabilities you can leverage include searching for genes by flexible queries, obtaining detailed gene metadata by NCBI Gene ID, retrieving protein details by ID, and searching by gene symbol with optional organism constraints. The server is designed to work with MCP clients through JSON-RPC, making integration straightforward for workflows that need gene/protein data pulled from NCBI.
Prerequisites: ensure Python 3 and a working Internet connection are available on your system.
1. Clone the project repository.
git clone <repository-url>
cd ncbi_gene_mcp_client2. Install in development mode to pull in editable source and dependencies.
pip install -e .3. Start the MCP server for integration with MCP clients.
c ncbi-gene-mcp-serverThe server exposes an MCP endpoint that includes several tools for gene and protein data access. You can configure the server in environments that require explicit environment variables or credentials if your setup requires them, otherwise you can run with default settings.
If you need to connect to external services or adjust request behavior, you can typically provide credentials or API keys as environment variables at startup. The server honors rate limiting requirements of the NCBI Entrez API, adapting request frequency based on whether credentials are provided.
Common tools available via the MCP server include: search for genes, fetch gene information by ID, fetch protein information by ID, and search by gene symbol with an optional organism filter.
Search for genes using a query string and retrieve matching gene IDs and basic metadata.
Fetch detailed gene metadata by NCBI Gene ID, including name, description, organism, and chromosomal location.
Fetch detailed protein information by NCBI Protein ID, returning protein-specific metadata.
Search genes by a gene symbol, with an optional organism filter to narrow results.
Demo command that showcases typical usage and quick start behavior of the MCP server.