GTDB-MCP
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., "@GTDB-MCP What's the full taxonomic lineage of 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.
GTDB-MCP
A Model Context Protocol (MCP) server for the Genome Taxonomy Database (GTDB)
中文文档 | English
⚠️ Disclaimer: This is an unofficial, third-party community implementation and is not affiliated with, endorsed by, or associated with the GTDB team or Anthropic. GTDB is developed by the Australian Centre for Ecogenomics (ACE) at the University of Queensland. This project independently builds an MCP server to facilitate access to GTDB data. All GTDB data and trademarks belong to their respective owners.
📋 Table of Contents
Related MCP server: ITIS MCP
Overview
GTDB-MCP is a Model Context Protocol (MCP) server that provides seamless access to the Genome Taxonomy Database (GTDB). It enables LLM-powered applications to query bacterial and archaeal taxonomy data, search for genomes, navigate phylogenetic trees, and perform comparative analyses.
GTDB is a genome-based taxonomy database that provides standardized taxonomic classifications for bacterial and archaeal genomes based on over 120 conserved marker genes. This MCP server makes GTDB data accessible to AI assistants and other MCP-compatible tools.
Key Highlights
Zero-config startup: Ships with a curated built-in reference dataset covering major bacterial and archaeal taxa
Full database support: Can load complete GTDB TSV data files for comprehensive queries
12 powerful tools: Search, taxonomy lookup, genome queries, tree navigation, and comparison
Type-safe: Written in TypeScript with full type definitions
MCP-compliant: Follows the Model Context Protocol specification for tool-based interactions
Features
🔍 Search & Discovery
Search for taxa or genomes by name (partial matching supported)
Browse taxonomy by rank (phylum, class, order, family, genus, species)
List all phyla for bacteria or archaea
🌿 Taxonomy Navigation
Get complete taxonomic lineages (domain → species)
Retrieve taxon summaries with genome counts and child taxa
Navigate the taxonomy tree (get children of any taxon)
Find the phylogenetic path between two taxa
🧬 Genome Information
Look up genome metadata (size, GC content, quality, type strain status)
Find all genomes for a given species
Find all genomes under any taxonomic group
📊 Comparison & Analysis
Compare two genomes taxonomically (shared lineage, LCA, differences)
Get phylogenetic tree paths between taxa
Access database-wide statistics
Available Tools
Tool | Description |
| Search for taxa or genomes by name |
| Get the full taxonomic lineage of a taxon or genome |
| Get a comprehensive summary of a taxonomic group |
| Get direct child taxa of a given taxon |
| List all bacterial or archaeal phyla |
| List all taxa at a specific rank |
| Get detailed genome information by GTDB ID |
| Get all genomes for a species |
| Get all genomes under a taxonomic group |
| Compare two genomes taxonomically |
| Get the phylogenetic path between two taxa |
| Get GTDB database statistics |
Installation
Prerequisites
Node.js >= 18.0.0
npm or yarn
From Source
git clone <repository-url>
cd GTDB-MCP
npm install
npm run buildGlobal Installation (optional)
npm install -g .Configuration
Environment Variables
Variable | Description | Default |
| Path to external GTDB data directory | (none - uses built-in data) |
Using Built-in Data
By default, the server uses a curated built-in reference dataset that covers:
10 bacterial phyla (Bacillota, Pseudomonadota, Actinomycetota, Bacteroidota, Spirochaetota, Cyanobacteriota, Chlamydiota, Fusobacteriota, Mycoplasmatota, Campylobacterota)
6 archaeal phyla (Methanobacteriota, Thermoproteota, Methanomicrobiota, Halobacteriota, Nanoarchaeota, Thermoplasmataota)
100+ representative taxa across all ranks
25+ reference genomes with metadata
Using Full GTDB Data
For comprehensive database access, download GTDB data files from https://gtdb.ecogenomic.org/downloads and set the data directory:
# Set the data directory
export GTDB_DATA_DIR=/path/to/gtdb/data
# Expected files in the data directory:
# - bac120_taxonomy.tsv (bacterial taxonomy)
# - ar122_taxonomy.tsv (archaeal taxonomy)Usage
Starting the Server
# Using built-in data
node dist/index.js
# Using external GTDB data
GTDB_DATA_DIR=/path/to/gtdb/data node dist/index.jsProgrammatic API
import { GTDBClient } from "gtdb-mcp";
const client = new GTDBClient();
// Search for organisms
const results = client.search("Bacillus");
// Get taxonomy
const lineage = client.getLineage("Escherichia coli");
// Get taxon summary
const summary = client.getTaxonSummary("Enterobacteriaceae");
// Compare genomes
const comparison = client.compareGenomes("GCF_000005845.2", "GCF_000007865.2");Integration with MCP Clients
Claude Desktop
Add the server to your Claude Desktop configuration file (claude_desktop_config.json):
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"gtdb": {
"command": "node",
"args": ["/absolute/path/to/GTDB-MCP/dist/index.js"]
}
}
}With External GTDB Data
{
"mcpServers": {
"gtdb": {
"command": "node",
"args": ["/absolute/path/to/GTDB-MCP/dist/index.js"],
"env": {
"GTDB_DATA_DIR": "/path/to/gtdb/data"
}
}
}
}Example Queries
Once connected, you can ask your AI assistant questions like:
"What is the taxonomy of Escherichia coli?"
"List all bacterial phyla in GTDB"
"Compare the genomes GCF_000005845.2 and GCF_000007865.2"
"What are the child taxa of Bacillales?"
"Find all genomes in the family Enterobacteriaceae"
"Show me the phylogenetic path from Bacillus to Escherichia"
"Get statistics about the GTDB database"
Data Sources
GTDB Taxonomy Format
GTDB uses a standardized taxonomy format with rank prefixes:
d__Domain;p__Phylum;c__Class;o__Order;f__Family;g__Genus;s__SpeciesExample:
d__Bacteria;p__Pseudomonadota;c__Gammaproteobacteria;o__Enterobacterales;f__Enterobacteriaceae;g__Escherichia;s__Escherichia coliGenome Identifiers
GTDB uses NCBI assembly accessions as genome identifiers:
GCF_prefix: RefSeq assembliesGCA_prefix: GenBank assembliesUBA_prefix: Unclassified Binned AssembliesG_prefix: GTDB-assigned identifiers for non-NCBI genomes
Taxonomic Ranks
GTDB follows a seven-rank hierarchy:
Domain (d__) - Bacteria or Archaea
Phylum (p__) - e.g., Bacillota, Pseudomonadota
Class (c__) - e.g., Bacilli, Gammaproteobacteria
Order (o__) - e.g., Bacillales, Enterobacterales
Family (f__) - e.g., Bacillaceae, Enterobacteriaceae
Genus (g__) - e.g., Bacillus, Escherichia
Species (s__) - e.g., Bacillus subtilis, Escherichia coli
Development
Project Structure
GTDB-MCP/
├── package.json # Project configuration and dependencies
├── tsconfig.json # TypeScript configuration
├── README.md # English documentation (this file)
├── README_CN.md # Chinese documentation
├── LICENSE # MIT license
├── src/
│ ├── index.ts # MCP server entry point
│ ├── types.ts # TypeScript type definitions
│ ├── taxonomy.ts # Taxonomic rank definitions and utilities
│ ├── gtdb-client.ts # GTDB database client (core logic)
│ ├── test.ts # Test suite
│ └── data/
│ └── reference-data.ts # Built-in reference taxonomy data
└── dist/ # Compiled output (generated)Building
npm run build # Compile TypeScript
npm run dev # Watch mode for development
npm run clean # Remove dist directoryTesting
npm run build # Build first
node dist/test.js # Run the test suiteAdding New Taxa
To add new taxa to the built-in reference data, edit src/data/reference-data.ts and add entries to the BUILTIN_TAXONOMY array:
{
name: "YourTaxonName",
rank: "genus",
domain: "Bacteria",
lineage: makeLineage("Bacteria", "PhylumName", "ClassName", "OrderName", "FamilyName", "YourTaxonName", ""),
genomeCount: 1000,
speciesCount: 200,
children: ["Species1", "Species2"],
description: "A brief description of this taxon."
}License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
GTDB (Genome Taxonomy Database) - Parks et al., Nature Biotechnology 2018, 2020, 2022
Model Context Protocol (MCP) - Anthropic
GTDB is developed by the Australian Centre for Ecogenomics (ACE) at the University of Queensland
Version: 0.1.0
GTDB Version: R220 (2024-04-17)
Available Tools
12 toolscompare_genomesA
Compare two genomes taxonomically. Returns the shared lineage, lowest common ancestor (LCA), differing ranks, and genome metric differences (size, GC content).
Inputs: gid1 (required), gid2 (required).
get_childrenA
Get the direct child taxa of a given taxon in the GTDB taxonomy. For example, children of 'Bacillales' include 'Bacillaceae', 'Staphylococcaceae', etc.
Inputs: name (required).
get_database_statsA
Get statistics about the GTDB database, including version, release date, total genome counts, and taxonomic diversity metrics for both bacteria and archaea.
Inputs: no named parameters.
get_genomeA
Get detailed information about a specific genome by its GTDB genome ID (e.g., GCF_000005845.2). Returns taxonomy, genome size, GC content, quality metrics, and type strain status.
Inputs: gid (required).
get_genomes_for_speciesA
Get all genome assemblies classified under a given species in GTDB. Useful for finding reference genomes and type strains.
Inputs: species (required).
get_genomes_for_taxonB
Get all genome assemblies classified under a given taxonomic group. For example, get all genomes in the family Enterobacteriaceae or phylum Bacillota.
Inputs: taxon (required), limit.
get_taxonomyB
Get the complete taxonomic lineage of an organism or taxon from GTDB. Returns the full classification from domain down to species level (d__Domain; p__Phylum; c__Class; o__Order; f__Family; g__Genus; s__Species).
Inputs: name (required).
get_taxon_summaryA
Get a comprehensive summary of a taxonomic group, including genome counts, species counts, child taxa, and description. Useful for understanding the diversity and composition of any taxonomic level.
Inputs: name (required).
get_tree_pathA
Get the phylogenetic tree path between two taxa. Shows the route through the taxonomy tree from one taxon to another via their lowest common ancestor (LCA).
Inputs: to_taxon (required), from_taxon (required).
list_phylaA
List all bacterial or archaeal phyla in GTDB. This is the starting point for exploring the taxonomy tree from the top level.
Inputs: domain.
list_taxa_by_rankB
List all taxa at a specific taxonomic rank, optionally filtered by domain. Useful for browsing the taxonomy at any level.
Inputs: rank (required), domain.
searchA
Search for taxa or genomes in the GTDB database by name. Returns matching organisms, taxonomic groups, and genome assemblies. Supports partial matching (e.g., 'Bacillus' will match 'Bacillus subtilis', 'Bacillus cereus', etc.).
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have clearly distinct purposes, but a few overlap: list_phyla is a special case of list_taxa_by_rank, get_children is subsumed by get_taxon_summary, and get_genomes_for_species is a convenience wrapper around get_genomes_for_taxon. Descriptions help clarify intended use, so misselection is unlikely but not impossible.
All tools use snake_case with a predictable verb_noun or verb_object pattern (get_taxonomy, list_phyla, compare_genomes, get_database_stats). The lone exception is 'search', which lacks an explicit noun, but this is a minor deviation from an otherwise consistent convention.
12 tools is well-scoped for a taxonomic and genomic reference database; each tool covers a distinct exploration or retrieval operation without excessive fragmentation. No tool feels redundant enough to remove, and the set is not bloated.
The surface covers search, taxonomy traversal, genome retrieval, comparison, and database statistics, which is comprehensive for a read-only reference database. Minor gaps such as batch operations or sequence retrieval are outside the apparent scope and do not create dead ends.
Maintenance
Related MCP Connectors
Curated knowledge API for AI agents - skill packs, semantic search, validated patterns.
15 deterministic validation tools for AI agents: tax IDs (15 countries), VAT, IBAN, LEI, HS codes.
Live data gateway for AI — 3,300+ tools across 750+ sources, with citations
300+ deterministic data utilities for AI agents: validate, normalize, parse, match, redact.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables querying NCBI genome assemblies, gene details with cross-references, and taxonomy trees with per-node assembly and gene counts, providing structured answers about genomes, genes, and taxonomy.68 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to resolve scientific names to Taxonomic Serial Numbers, traverse complete taxonomic lineages from kingdom to children, and retrieve vernacular names in all languages from an authoritative US-government taxonomy.54 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to resolve scientific (Latin binomial) names to Open Tree of Life taxon IDs, retrieve full taxonomic details, synonyms, and ancestor lineages, and find the most recent common ancestor of up to 10 taxa within the synthetic tree of life. Runs keylessly over a hosted gateway endpoint or locally via npx.63 npmMIT
- AlicenseAqualityCmaintenanceEnables AI assistants to search and resolve taxon names, query divergence times between taxa, build evolutionary timelines for a taxon, and retrieve database metadata via MCP tools.41MIT