Skip to main content
Glama
BacDive MCP Server
by ZengZichao

BacDive MCP Server


Overview

BacDive (Bacterial Diversity Metadatabase) is an online database developed and maintained by the German Collection of Microorganisms and Cell Cultures (DSMZ). The >80,000 bacterial and archaeal strains are catalogued in BacDive with detailed information covering physiology, morphology, taxonomy, culture conditions, metabolism, enzymology activities, antibiotic resistance, sequences, and many more.

This project is an MCP (Model Context Protocol) server that enables AI large language models (such as Claude) to directly query and retrieve data from the BacDive database. Through this MCP server, the AI assistants can:

  • πŸ” Search for strains by species or genus name

  • πŸ“‹ Retrieve full strain details by BacDive ID

  • 🧫 Search for culture media by name or ID

  • 🧬 Search for 16S rRNA or genome sequences

  • πŸ“– Perform free-text searches across the entire taxon database

Related MCP server: TimeTree MCP Server

Features

Data Query Capabilities

Feature

Description

Strain Search

Search strains by species name (e.g., Escherichia coli) or genus name

Full-text Search

Search taxa by any keyword (e.g., "thermophilic", "spore-forming", "nitrogen-fixing")

Strain Details

Retrieve full strain information by BacDive ID (taxonomy, morphology, culture conditions, metabolism, enzymology, resistance, safety, etc.)

DSM Number Search

Search by DSMZ strain number (e.g., DSM 3)

Culture Medium Search

Search culture media by name or retrieve full composition by ID

16S rRNA Search

Search 16S rRNA gene sequences by species/genus

Genome Search

Search genome sequences by species/genus

Browse All

Paginated browsing of all taxa in BacDive

Health Check

Check BacDive API connectivity

Technical Features

  • TypeScript implementation with type safety

  • Uses Node.js native https module β€”zero external HTTP dependencies

  • Communicates with MCP clients via standard size transport

  • Compatible with any MCP client (Claude Desktop, Cursor, etc.)

Installation

Prerequisites

  • Node.js >= 18.0.0

  • npm or yarn or pnpm (any one)

Build from Source

# Clone or download this project locally
cd BacDive-MCP

# Install dependencies
npm install

# Compile TypeScript
npm run build

After compilation, the runnable file will be at dist/index.js.

Global Install (Optional)

npm run build
npm link

# Now you can run it globally
bacdive-mcp

Configuration & Usage

Claude Desktop Configuration

Add the BacDive MCP server to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "bacdive-mcp": {
      "command": "node",
      "args": [
        "C:/your/path/to/BacDive-MCP/dist/index.js"
      ]
    }
  }
}

Tip: Replace C:/your/path/to/BacDive-MCP/dist/index.js with your actual project path.

Cursor Configuration

Add to Cursor's MCP settings:

{
  "mcpServers": {
    "bacdive-mcp": {
      "command": "node",
      "args": [
        "C:/your/path/to/BacDive-MCP/dist/index.js"
      ]
    }
  }
}

Generic MCP Client Configuration

Any MCP-compatible client can connect to this server via stdeo. The server startup command is:

node dist/index.js

Manual Testing

# Build
npm run build

# Start the server (communicates via stdin/stdout)
npm start

Available Tools

This MCP server provides the following 10 tools:

1. bacdive_search_strain β€” Strain Search

Search for strains by species and/or genus name.

Parameters:

Parameter

Type

Required

Description

species

string

one of two

Full or partial species name (e.g., "Escherichia coli")

genus

string

one of two

Full or partial genus name (e.g., "Bacillus")

page

number

no

Page number, default 1

Example call:

{
  "species": "Escherichia coli",
  "page": 1
}

2. bacdive_search_taxon β€” Full-text Search

Search across the entire taxon database with free text.

Parameters:

Parameter

Type

Required

Description

query

string

yes

Search query (e.g., "thermophilic", "spore-forming")

page

number

no

Page number, default 1

3. bacdive_get_strain_by_id β€” Get Strain Details

Retrieve full strain information by BacDive ID.

Parameters:

Parameter

Type

Required

Description

id

number

yes

BacDive strain ID (e.g., 2)

Returned content includes:

  • General information (DSMZ strain number, accession, dates, etc.)

  • Name & taxonomic classification (species, genus, family, order, class, phylum, domain, full name, LPSN, synonyms, etc.)

  • Morphology

  • Culture and growth conditions

  • Physiology and metabolism

  • Enzyme activities

  • Antibiotic resistance

  • Safety information

  • Applications

  • References

  • Sequence information (16S rRNA gene, genome)

  • External links

4. bacdive_search_by_dsm_number β€” Search by DSM Number

Search for a strain by its DSMZ strain number.

Parameters:

Parameter

Type

Required

Description

dsm_number

string

yes

DSMZ strain number (e.g., "DSM 3" or "3")

5. bacdive_browse_taxa β€” Browse All Taxa

Browse all taxa in the BacDive database with pagination.

Parameters:

Parameter

Type

Required

Description

page

number

no

Page number, default 1

6. bacdive_search_culture_medium β€” Search Culture Media

Search for culture media by name.

Parameters:

Parameter

Type

Required

Description

medium_name

string

yes

Full or partial medium name (e.g., "Nutrient", "LB")

page

number

no

Page number, default 1

7. bacdive_get_culture_medium_by_id β€” Get Culture Medium Details

Retrieve full culture medium information by DSMZ medium ID.

Parameters:

Parameter

Type

Required

Description

medium_id

number

yes

DSMZ medium ID (e.g., 1)

8. bacdive_search_16s β€” Search 16S rRNA Sequences

Search for 16S rRNA gene sequences by species or genus name.

Parameters:

Parameter

Type

Required

Description

species

string

one of two

Species name

genus

string

one of two

Genus name

page

number

no

Page number, default 1

9. bacdive_search_genome β€” Search Genomes

Search for genome sequences by species or genus name.

Parameters:

Parameter

Type

Required

Description

species

string

one of two

Species name

genus

string

one of two

Genus name

page

number

no

Page number, default 1

10. bacdive_ping β€” Health Check

Check BacDive API connectivity.

Parameters: None

Usage Examples

Here are some natural language conversation examples when using Claude Desktop:

Example 1: Find a Specific Strain

User: Help me search for E. coli (Escherichia coli) in the BacDive database.

AI Assistant: (Calls the bacdive_search_strain tool and returns matching results)

Example 2: Get Detailed Information

User: For the strain with BacDive ID 2, give me its complete culture conditions and metabolism info.

AI Assistant: (Calls bacdive_get_strain_by_id and extracts culture conditions and metabolism data)

Example 3: Search for Culture Methods

User: I need to culture a Bacillus subtilis strain. Help me find the Nutrient medium recipe.

AI Assistant: (Calls bacdive_search_culture_medium and returns the medium recipe)

User: Find thermophilic bacteria in BacDive.

AI Assistant: (Calls bacdive_search_taxon with query "thermophilic")

Project Structure

BacDive-MCP/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts               # Entry point, starts MCP server
β”‚   β”œβ”€β”€ server.ts              # MCP server core, tool definitions and handlers
β”‚   └── bacdive-client.ts      # BacDive API client
β”œβ”€β”€ examples/
β”‚   └── claude_desktop_config.json  # Claude Desktop config example
β”œβ”€β”€ package.json               # Project configuration and dependencies
β”œβ”€β”€ tsconfig.json              # TypeScript compilation config
β”œβ”€β”€ .env.example               # Environment variables example
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md                  # English documentation (this file)
β”œβ”€β”€ README_CN.md               # Chinese documentation
└── LICENSE                    # MIT License

Development

Development Setup

# Install dependencies
npm install

# Watch mode compilation (optional)
# Use tsc --watch

# Build
npm run build

# Run
npm start

# Type check (no output files)
npm run lint

Adding New Tools

  1. Add a new tool definition in the TOOLS array in src/server.ts

  2. Add a corresponding case branch in the handleToolCall function

  3. Add the corresponding API client method in src/bacdive-client.ts (if needed)

  4. Rebuild and run

Code Architecture

  • bacdive-client.ts: Wraps BacDive REST API HTTP calls with type-safe methods. Uses Node.js built-in https module β€” no external dependencies needed.

  • server.ts: Defines MCP tool metadata (name, description, input schema) and handlers. Routes tool calls to the appropriate BacDiveClient methods.

  • index.ts: Entry point β€” creates the client, server, and stdio transport, then starts the service.

API Reference

BacDive REST API documentation:

  • Homepage: https://bacdive.dsmz.de/

  • API base path: https://api.bacdive.dsmz.de/api/v1/

  • Main endpoints:

    • GET /taxon/ β€” Taxon search

    • GET /strain/{id}/ β€” Strain details

    • GET /culturemedium/ β€” Culture medium search

    • GET /culturemedium/{id}/ β€” Culture medium details

    • GET /sequence_16s/ β€” 16S rRNA search

    • GET /genome/ β€” Genome search

About BacDive

BacDive (https://bacdive.dsmz.de/) is a bacterial diversity metadatabase maintained by DSMZ, containing detailed descriptions of over 80,000 strains covering taxonomy, morphology, physiology, ecology, molecular biology, and more. The database is publicly accessible and is an important resource for microbiological research.

Disclaimer: This project is an independent, unofficial MCP server wrapper for the BacDive API. All BacDive data and the BacDive API are owned and operated by DSMZ. For official information, please visit https://bacdive.dsmz.de/.


License

MIT License

Available Tools

10 tools
bacdive_browse_taxaA

Browse all taxa in the BacDive database with pagination. This is useful for systematically exploring the database or getting an overview of available strains. Each page contains up to 50 taxa.

Inputs: page.

bacdive_get_culture_medium_by_idA

Retrieve detailed information about a specific culture medium from BacDive using its numeric DSMZ medium ID. Returns the full medium composition, growth conditions, and citation.

Inputs: medium_id (required).

bacdive_get_strain_by_idA

Retrieve full detailed information about a specific strain from BacDive using its numeric BacDive ID. This returns comprehensive data including: general information, name and taxonomic classification, morphology, culture and growth conditions, physiology and metabolism, enzyme activities, antibiotic resistance, safety information, applications, references, sequence information (16S rRNA gene, genome), and external links.

Inputs: id (required).

bacdive_pingA

Check the connectivity and availability of the BacDive API. Returns a boolean indicating whether the BacDive API is currently reachable. Use this to diagnose connection issues.

Inputs: no named parameters.

bacdive_search_16sC

Search for 16S rRNA gene sequences in the BacDive database by species or genus name. 16S rRNA gene sequences are the gold standard for bacterial phylogenetic identification and taxonomy.

Inputs: page, genus, species.

bacdive_search_by_dsm_numberB

Search for a strain in BacDive by its DSMZ strain number (e.g. 'DSM 3', 'DSM 10'). DSMZ numbers are the accession identifiers used by the German Collection of Microorganisms and Cell Cultures. Returns the matching taxon entry.

Inputs: dsm_number (required).

bacdive_search_culture_mediumA

Search for culture media in the BacDive database by medium name. Returns details about culture media including composition, growth conditions, and citation. Useful when you need to find how to cultivate specific microorganisms.

Inputs: medium_name (required), page.

bacdive_search_genomeB

Search for genome sequences in the BacDive database by species or genus name. Returns genome sequence accessions and associated strain information.

Inputs: page, genus, species.

bacdive_search_strainA

Search for bacterial or archaeal strains in the BacDive database by species name, genus name, or both. Returns a paginated list of matching taxa with their taxon IDs, species, genus, family, order, class, phylum, and domain. Use this when looking up strains by their scientific name.

Inputs: page, genus, species.

bacdive_search_taxonA

Perform a free-text search across the BacDive taxon database. This is useful for searching by physiological traits, morphological characteristics, or any other keywords (e.g. 'thermophilic', 'spore-forming', 'nitrogen-fixing'). Returns a paginated list of matching taxa.

Inputs: query (required), page.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools are cleanly separated by resource and access path (ID lookup vs name search vs browse). However, bacdive_search_strain (by scientific name) and bacdive_search_taxon (free-text) both return taxa lists and could be confused, and search_strain/search_16s/search_genome all take species/genus names, differing only in returned content. Descriptions mitigate this well enough that selection is usually clear.

    Naming Consistency5/5

    Every tool follows a consistent bacdive_ prefix plus verb_noun pattern (search_strain, get_strain_by_id, search_culture_medium, browse_taxa). The distinction between search_* and get_*_by_id is applied predictably across resources.

    Tool Count5/5

    Ten tools is well-scoped for a read-only microbial database covering strains, taxa, media, sequences, and connectivity. Each tool clearly earns its place with no redundancy.

    Completeness4/5

    Strong lifecycle coverage: search and ID-based retrieval for strains and media, sequence lookups, browsing, and a ping. Minor gap: there is a bacdive_get_strain_by_id and get_culture_medium_by_id but no get_taxon_by_id, so taxon IDs surfaced by browse/search cannot be directly dereferencedβ€”though strain detail largely compensates.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables AI assistants to search and retrieve global biodiversity data β€” species taxonomy, occurrence records, datasets, map tiles, literature citations and controlled vocabularies β€” through a standard tool interface. It exposes the source's API as dozens of typed, paginated tools that any MCP client can call.
      58
      CC BY-4.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to search and retrieve prokaryotic names, taxon details, full classifications, and rank-based browsing from the List of Prokaryotic names with Standing in Nomenclature in real time, plus read related information pages.
      7
      1
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to query and retrieve microbial nomenclature data from the SeqCode Registry through its public REST API. Provides 18 tools for names, genomes, type genomes, register lists, publications, authors, journals, subjects, strains, and full-text search, with pagination and status filtering.
      18
      1
      MIT