gcMeta-MCP
by ZengZichao
README.md
# gcMeta-MCP
[](https://opensource.org/licenses/MIT)
[](https://nodejs.org/)
[](https://www.typescriptlang.org/)
[](https://modelcontextprotocol.io/)
[](https://github.com/zengzichao/gcMeta-MCP/releases)
> An MCP (Model Context Protocol) server that provides LLMs with access to the [gcMeta](https://gcmeta.wdcm.org/) (Global Catalogue of Metagenomics) platform.
**English** | [ไธญๆ](./README_zh.md)
---
## ๐ Table of Contents
- [Overview](#overview)
- [Background](#background)
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Claude Desktop](#claude-desktop)
- [Other MCP Clients](#other-mcp-clients)
- [Direct Execution](#direct-execution)
- [Available Tools](#available-tools)
- [Development](#development)
- [Project Structure](#project-structure)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)
- [Citation](#citation)
- [Acknowledgements](#acknowledgements)
---
## Overview
**gcMeta-MCP** is a [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that bridges Large Language Models (LLMs) with the [gcMeta](https://gcmeta.wdcm.org/) โ the **Global Catalogue of Metagenomics** platform maintained by [WDCM](https://www.wdcm.org/) / [NMDC](https://nmdc.cn/).
By exposing gcMeta's rich metagenomics data as MCP tools, this server enables LLM-powered assistants to search, retrieve, and analyze metagenomics data โ including BioProjects, BioSamples, sequencing Runs, Metagenome-Assembled Genomes (MAGs), Biome Catalogues, Taxonomy Abundance, and Functional Annotations โ all through natural language queries.
## Background
[gcMeta](https://gcmeta.wdcm.org/) is a global repository of metagenome-assembled genomes (MAGs) enabling cross-ecosystem microbial discovery and function research. As of 2026, it hosts:
| Metric | Count |
|--------|-------|
| Total MAGs | 3,917,189 |
| All MAGs under catalogues | 2,756,886 |
| Species-level representative MAGs | 109,586 |
| Runs | 177,196 |
| BioSamples | 127,760 |
| BioProjects | 9,653 |
The platform organizes MAGs into **50+ Biome Catalogues** spanning diverse ecosystems:
- **Human**: Gut, Skin, Vaginal
- **Animals**: Chicken, Pig, Cattle, Mouse, Cat, Dog, Horse, Goat, Sheep, etc.
- **Marine**: Seawater, Sediment
- **Freshwater**: Lake Water, Riverine, Sediment
- **Environments**: Agricultural Soil, Hot Spring, Permafrost, Wastewater, etc.
- **Extreme Environments**: Acid, Cold, Hot, Pressure, Saline-alkaline Habitats
- **Plant Rhizosphere**: Rice, Wheat, Arabidopsis, Bean
- **Wild Animals**: Bear, Deer, Elephant, Giant Panda, Koala, Vulture, etc.
gcMeta also provides **functional annotation** across several categories: Antibiotics Resistance Genes (ARGs), KEGG Pathways, Virulence Factors (VFs), Carbohydrate-Active enZYmes (CAZy), Biosynthetic Gene Clusters (BGCs), Mobile Genetic Elements (MGEs), and Defense Systems.
## Features
- ๐ **MCP Protocol Support** โ Full compatibility with the Model Context Protocol specification.
- ๐งฌ **13 Tools** โ Search and retrieve BioProjects, BioSamples, Runs, MAGs, Biome Catalogues, Taxonomy Abundance, Functional Annotations, and platform statistics.
- ๐ **Type-safe** โ Written in TypeScript with Zod schema validation for all inputs.
- โก **Lightweight** โ Minimal dependencies, stdio-based transport, no external server required.
- ๐ง **Configurable** โ Custom base URL, authentication token, and timeout settings.
- ๐ฆ **Zero-config** โ Works out of the box with `npx` or direct installation.
## Prerequisites
- **Node.js** >= 18.0.0
- An MCP-compatible client (e.g., [Claude Desktop](https://claude.ai/download), [Cursor](https://cursor.sh/), or any MCP client)
## Installation
### Option 1: Using npx (recommended โ no installation needed)
```bash
npx gcmeta-mcp
```
### Option 2: Global installation
```bash
npm install -g gcmeta-mcp
gcmeta-mcp
```
### Option 3: Local development
```bash
git clone https://github.com/zengzichao/gcMeta-MCP.git
cd gcMeta-MCP
npm install
npm run build
npm start
```
## Configuration
The server reads configuration from environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| `GCMETA_BASE_URL` | Base URL of the gcMeta instance | `https://gcmeta.wdcm.org` |
| `GCMETA_AUTH_TOKEN` | Optional authentication token | _(none)_ |
Copy `.env.example` to `.env` and adjust as needed:
```bash
cp .env.example .env
```
## Usage
### Claude Desktop
Add the following to your Claude Desktop configuration file:
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"gcmeta": {
"command": "npx",
"args": ["-y", "gcmeta-mcp"]
}
}
}
```
For local development:
```json
{
"mcpServers": {
"gcmeta": {
"command": "node",
"args": ["/path/to/gcMeta-MCP/dist/index.js"]
}
}
}
```
### Other MCP Clients
This server uses **stdio transport**, making it compatible with any MCP-compliant client. Simply configure your client to run `npx -y gcmeta-mcp` as the server command.
### Direct Execution
```bash
# After installation or building from source
node dist/index.js
# With custom base URL
GCMETA_BASE_URL=https://gcmeta.wdcm.org node dist/index.js
```
## Available Tools
The server exposes 13 tools:
| # | Tool | Description |
|---|------|-------------|
| 1 | `search_bioprojects` | Search for BioProjects by keyword, organism, etc. |
| 2 | `get_bioproject` | Get detailed info about a single BioProject |
| 3 | `search_biosamples` | Search for BioSamples with multiple filters |
| 4 | `get_biosample` | Get detailed info about a single BioSample |
| 5 | `search_runs` | Search for sequencing Runs |
| 6 | `get_run` | Get detailed info about a single Run |
| 7 | `search_mags` | Search for Metagenome-Assembled Genomes (MAGs) |
| 8 | `get_mag` | Get detailed info about a single MAG |
| 9 | `list_biome_catalogues` | List all available biome catalogues |
| 10 | `get_biome_catalogue` | Get detailed info about a specific biome catalogue |
| 11 | `get_taxonomy_abundance` | Get taxonomy abundance for a sample or catalogue |
| 12 | `search_functional_annotations` | Search functional annotations (ARGs, KEGG, CAZy, etc.) |
| 13 | `get_statistics` | Get aggregate platform statistics |
See the [API Reference](./docs/en/API.md) for detailed input/output specifications of each tool.
## Development
```bash
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Lint
npm run lint
# Format
npm run format
```
## Project Structure
```
gcMeta-MCP/
โโโ src/
โ โโโ index.ts # Server entry point
โ โโโ gcmeta-client.ts # gcMeta HTTP API client
โ โโโ tools.ts # MCP tool definitions
โ โโโ types.ts # TypeScript type definitions
โโโ docs/
โ โโโ en/ # English documentation
โ โ โโโ INSTALLATION.md
โ โ โโโ API.md
โ โ โโโ CONFIGURATION.md
โ โโโ zh/ # Chinese documentation
โ โโโ ๅฎ่ฃ
ๆๅ.md
โ โโโ APIๆๆกฃ.md
โ โโโ ้
็ฝฎ่ฏดๆ.md
โโโ examples/
โ โโโ claude-desktop-config.json
โโโ package.json
โโโ tsconfig.json
โโโ eslint.config.js
โโโ .prettierrc
โโโ .editorconfig
โโโ .env.example
โโโ .gitignore
โโโ LICENSE
โโโ README.md # English (this file)
โโโ README_zh.md # Chinese
โโโ CHANGELOG.md
โโโ CONTRIBUTING.md
โโโ CONTRIBUTING_zh.md
```
## Documentation
- [Installation Guide (EN)](./docs/en/INSTALLATION.md) | [ๅฎ่ฃ
ๆๅ (ไธญๆ)](./docs/zh/ๅฎ่ฃ
ๆๅ.md)
- [API Reference (EN)](./docs/en/API.md) | [API ๆๆกฃ (ไธญๆ)](./docs/zh/APIๆๆกฃ.md)
- [Configuration (EN)](./docs/en/CONFIGURATION.md) | [้
็ฝฎ่ฏดๆ (ไธญๆ)](./docs/zh/้
็ฝฎ่ฏดๆ.md)
- [Changelog](./CHANGELOG.md)
- [Contributing (EN)](./CONTRIBUTING.md) | [่ดก็ฎๆๅ (ไธญๆ)](./CONTRIBUTING_zh.md)
## Contributing
Contributions are welcome! Please read the [Contributing Guide](./CONTRIBUTING.md) (ไธญๆ: [่ดก็ฎๆๅ](./CONTRIBUTING_zh.md)) for details on how to submit pull requests, report issues, and suggest features.
## License
This project is licensed under the [MIT License](./LICENSE).
## Citation
If you use gcMeta-MCP in your research, please cite both the tool and the gcMeta platform:
```bibtex
@software{gcmeta-mcp,
title = {gcMeta-MCP: An MCP Server for the Global Catalogue of Metagenomics},
author = {Zeng, Zichao},
year = {2026},
version = {0.1.0},
url = {https://github.com/zengzichao/gcMeta-MCP}
}
```
## Acknowledgements
- [gcMeta](https://gcmeta.wdcm.org/) โ Global Catalogue of Metagenomics, maintained by WDCM / NMDC
- [Model Context Protocol](https://modelcontextprotocol.io/) โ The protocol specification
- [WDCM](https://www.wdcm.org/) โ World Data Centre for Microorganisms
- [NMDC](https://nmdc.cn/) โ National Microbiology Data Center
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues