ncbi-datasets-mcp
This server provides access to NCBI Datasets v2, enabling genomic and taxonomic data discovery, metadata retrieval, and file downloads.
Install CLI tools: Automatically check, download, and install the required NCBI
datasetsanddataformatbinaries needed for downloads and format conversion.Discover data types: Browse all available NCBI Datasets report types (genes, genome assemblies, sequences, taxonomy, viruses, etc.), including which tools retrieve each type and full field/schema details for a specific type.
Search genome assemblies by taxon: Query genome assembly metadata by organism name or tax ID, with filters for assembly level, source (GenBank/RefSeq), reference status, and annotation status.
Fetch genome metadata by accession: Retrieve detailed assembly metadata for one or more known RefSeq or GenBank accessions.
Download genome packages: Download genome data (sequences, RNA, proteins, GFF3, etc.) by taxon or accession, with support for dehydrated packages.
Rehydrate genome packages: Fetch the full sequence files for a previously downloaded dehydrated package.
Convert genome reports to TSV: Transform genome JSONL data reports into TSV format, with optional field selection.
Explore taxonomy: Get lineage, rank, scientific/common names, and child taxa for any taxon by name or tax ID.
Download taxonomy packages: Retrieve a complete taxonomy data package for a given taxon.
The server is configurable via environment variables or a Claude Desktop JSON config, supporting settings like an NCBI API key (for higher rate limits), default download directory, auto-installation of CLI tools, and maximum results for summary tools.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ncbi-datasets-mcp search genome assemblies for Escherichia coli"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ncbi-datasets-mcp
NOTE: This is not affiliated with NCBI or NCBI Datasets, this is a user provided tool.
An MCP server that gives Claude access to NCBI Datasets v2 — discover what data NCBI Datasets offers, search genome assembly metadata, retrieve taxonomy records, and download data packages without leaving your conversation.
Tools
Tool | Transport | Description |
| — | Install the NCBI CLI tools (run once, or set |
| — | Describe what kinds of data NCBI Datasets provides; optional per-type detail |
| REST | Search genome assemblies by organism name or tax ID |
| REST | Fetch assembly metadata for known accessions |
| CLI | Download a genome package by taxon |
| CLI | Download a genome package by accession |
| CLI | Fetch sequence files for a dehydrated package |
| CLI | Convert a genome JSONL data report to TSV |
| REST | Get lineage, rank, and names for a taxon |
| CLI | Download a taxonomy package |
Discovering available data
Not sure what NCBI Datasets offers? Ask "what kind of data can I get from
datasets?" and the server's list_data_types tool returns a readable catalog of
every data report type — genes, genome assemblies, genome sequences, taxonomy,
viruses, and more — along with which tools retrieve each one. Pass a specific
type (e.g. genome-assembly) for its full field list and schema documentation
link.
Related MCP server: BioMCP
Installation
Option 1 — Desktop Extension (recommended for Claude Desktop users)
Download
ncbi-datasets.mcpbfrom the Releases page.Double-click the file and click Install in Claude Desktop.
Optionally enter your NCBI API key and download directory.
The NCBI CLI tools are downloaded automatically on first use (NCBI_AUTO_INSTALL=true is set by default in the extension).
Option 2 — JSON config (Claude Desktop / Claude Code)
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"ncbi-datasets": {
"command": "uvx",
"args": ["ncbi-datasets-mcp"],
"env": {
"NCBI_API_KEY": "your_key_here",
"NCBI_DOWNLOAD_DIR": "/path/to/downloads",
"NCBI_AUTO_INSTALL": "true"
}
}
}
}Requires uv (curl -LsSf https://astral.sh/uv/install.sh | sh).
Configuration
Variable | Default | Description |
| (none) | NCBI API key — raises rate limit to 10 req/s |
|
| Default download location |
|
| Auto-install CLI tools on startup |
|
| Cap for summary tool result counts |
|
| Seconds before a download times out |
| (auto) | Override path to |
| (auto) | Override path to |
Development
# Install with dev extras
pip install -e ".[dev]"
# Run unit tests
pytest
# Run all tests including live network calls
pytest -m integration
# Regenerate enums from the current NCBI OpenAPI spec
python scripts/gen_enums.py
# Run the server locally (stdio transport)
ncbi-datasets-mcpArchitecture
src/ncbi_datasets_mcp/
server.py FastMCP app — tool registrations only
config.py Pydantic-settings env config
cli/
locator.py Find datasets/dataformat (config → PATH → cache)
installer.py Download binaries from NCBI FTP
runner.py Async subprocess wrapper
rest/
client.py httpx client for metadata/summary endpoints
domains/
_generated_enums.py Vendored enums from OpenAPI spec
common.py Shared utilities (output dir, filename sanitising)
genome.py Genome CLI arg builders + response shaping
taxonomy.py Taxonomy CLI arg builders
models/
responses.py Shared DownloadResult dataclassSummary tools (no file I/O) → REST API.
Download and format-conversion tools → NCBI CLI binaries.
Cite
If you use NCBI Datasets in your research, please cite:
NCBI Datasets. National Center for Biotechnology Information. https://www.ncbi.nlm.nih.gov/datasets/
License
MIT
Available Tools
10 toolsdataformat_genome_tsvB
Convert a genome JSONL data report from a downloaded package to TSV.
Args: jsonl_path: Path to the genome data_report.jsonl file inside the package. fields: Optional list of fields to include. Omit to use the default set.
Inputs: jsonl_path (required), fields. Returns: result
ensure_cliA
Check whether the NCBI datasets/dataformat CLI tools are installed and, if not, download and install them automatically. Call this tool once before using any download or format-conversion tools.
Returns the install status, binary paths, and version string.
Inputs: no named parameters. Returns: object
genome_download_by_accessionA
Download a genome data package for one or more assembly accessions.
Returns the local path to the downloaded ZIP file.
Args: accessions: RefSeq/GenBank assembly accessions include: Data types — genome, rna, protein, cds, gff3, gbff, seq-report. Defaults to ["genome"]. output_dir: Directory for the download. Uses NCBI_DOWNLOAD_DIR if omitted. dehydrated: Download a lightweight dehydrated package (use rehydrate_genome_package to fetch the actual sequence files).
Inputs: accessions (required), include, output_dir, dehydrated. Returns: object
genome_download_by_taxonA
Download genome data packages for assemblies matching a taxon.
For taxa with many assemblies, use dehydrated=True first, then call rehydrate_genome_package to fetch only the data you need.
Args: taxon: Taxon name or NCBI tax ID include: Data types — genome, rna, protein, cds, gff3, gbff, seq-report output_dir: Directory for the download dehydrated: Download a dehydrated package (recommended for large taxa) reference_only: Download only the reference/representative genome
Inputs: taxon (required), include, output_dir, dehydrated, +1 more. Returns: object
genome_summary_by_accessionA
Retrieve genome assembly metadata for one or more NCBI accessions.
Args: accessions: RefSeq or GenBank assembly accessions (e.g. ["GCF_000001405.40", "GCA_000001405.29"])
Inputs: accessions (required). Returns: object
genome_summary_by_taxonA
Search NCBI for genome assemblies matching a taxon name or tax ID.
Returns assembly metadata including accession numbers, organism info, assembly statistics, annotation status, and submission details.
Args: taxon: Taxon name (e.g. "human", "Mus musculus") or NCBI tax ID assembly_level: Filter by level — chromosome, complete_genome, contig, scaffold assembly_source: Filter by source — all, genbank, refseq reference_only: Return only reference/representative genomes annotated_only: Return only annotated genomes limit: Maximum number of assemblies to return (capped by server config)
Inputs: taxon (required), assembly_level, assembly_source, reference_only, +2 more. Returns: object
list_data_typesA
Describe the kinds of data NCBI Datasets can provide.
Call with no arguments for a readable overview of every NCBI Datasets data report type (genes, genome assemblies, sequences, taxonomy, viruses, and more), including which other tools in this server retrieve each one.
Pass a report_type (e.g. "genome-assembly", "taxonomy", "virus") to get that type's full field categories and a link to its schema documentation.
Args: report_type: Optional data report type key. Omit to list all types. Unknown values return the list of valid keys.
Inputs: report_type. Returns: object
rehydrate_genome_packageA
Fetch the full sequence files for a dehydrated genome package.
Args: package_path: Path to the dehydrated ZIP file or its extracted directory.
Inputs: package_path (required). Returns: object
taxonomy_downloadC
Download a taxonomy data package for a given taxon.
Args: taxon: Taxon name or NCBI tax ID output_dir: Directory for the download
Inputs: taxon (required), output_dir. Returns: object
taxonomy_summaryA
Get taxonomy metadata for a taxon — lineage, rank, scientific name, common names, and child taxa.
Args: taxon: Taxon name (e.g. "human", "Bacteria") or NCBI tax ID
Inputs: taxon (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: setup, summary/download by accession or taxon, taxonomy, format conversion, and data type listing. No overlap in functionality.
Most tools follow a consistent resource_action_by_criterion pattern (genome_download_by_accession, genome_summary_by_taxon), with minor deviations like dataformat_genome_tsv and ensure_cli. Still highly readable.
10 tools is well-scoped for NCBI Datasets: provides setup, summary, download, conversion, and overview without being overwhelming.
Covers the full lifecycle: setup, search/summary, download (including dehydrated/rehydration), format conversion, and data type listing. No obvious gaps for the domain.
Maintenance
Related MCP Connectors
Hosted MCP server for live public-data APIs and Skills for AI agents.
Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that provides direct access to PubMed and PubMed Central via the NCBI E-utilities API. It enables AI models to search biomedical literature, retrieve detailed article metadata, and download open-access full texts.5MIT
- AlicenseAqualityBmaintenanceA high-performance MCP server that gives LLMs access to 25 biomedical tools federated across 50+ upstream APIs for genes, variants, drugs, diseases, literature, clinical trials, and structural biology.43128 npm12Apache 2.0
- AlicenseAqualityAmaintenanceAn MCP server that gives AI assistants access to biological and biomedical RDF databases via SPARQL at the RDF Portal, as well as selected REST APIs (NCBI E-utilities, UniProt, ChEMBL, PDB, Reactome, Rhea, MeSH, and more).23321MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for querying gene annotations, full-text gene search, and species taxonomy via MyGene.info. Enables AI agents to access gene data through natural language questions.89 npmMIT