Skip to main content
Glama
ncbi-datasets-mcp

ncbi-datasets-mcp

by syntheticgio

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

ensure_cli

—

Install the NCBI CLI tools (run once, or set NCBI_AUTO_INSTALL=true)

list_data_types

—

Describe what kinds of data NCBI Datasets provides; optional per-type detail

genome_summary_by_taxon

REST

Search genome assemblies by organism name or tax ID

genome_summary_by_accession

REST

Fetch assembly metadata for known accessions

genome_download_by_taxon

CLI

Download a genome package by taxon

genome_download_by_accession

CLI

Download a genome package by accession

rehydrate_genome_package

CLI

Fetch sequence files for a dehydrated package

dataformat_genome_tsv

CLI

Convert a genome JSONL data report to TSV

taxonomy_summary

REST

Get lineage, rank, and names for a taxon

taxonomy_download

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

  1. Download ncbi-datasets.mcpb from the Releases page.

  2. Double-click the file and click Install in Claude Desktop.

  3. 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

NCBI_API_KEY

(none)

NCBI API key — raises rate limit to 10 req/s

NCBI_DOWNLOAD_DIR

~/Downloads/ncbi_datasets

Default download location

NCBI_AUTO_INSTALL

false

Auto-install CLI tools on startup

NCBI_MAX_RESULTS

20

Cap for summary tool result counts

NCBI_REQUEST_TIMEOUT

300

Seconds before a download times out

NCBI_CLI_PATH

(auto)

Override path to datasets binary

NCBI_DATAFORMAT_PATH

(auto)

Override path to dataformat binary

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-mcp

Architecture

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 dataclass

Summary 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 tools
dataformat_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

    A4/5.0

    Scored across 10 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    10 tools is well-scoped for NCBI Datasets: provides setup, summary, download, conversion, and overview without being overwhelming.

    Completeness5/5

    Covers the full lifecycle: setup, search/summary, download (including dehydrated/rehydration), format conversion, and data type listing. No obvious gaps for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An 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.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A 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.
      43
      128 npm
      12
      Apache 2.0
    • A
      license
      A
      quality
      A
      maintenance
      An 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).
      2
      33
      21
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP 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 npm
      MIT

    Appeared in Searches