gnomad-mcp

koido/gnomad-mcp

3.2

If you are the rightful owner of gnomad-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The gnomAD MCP Server provides a programmatic interface to the Genome Aggregation Database API, supporting multiple API versions and abstracting version-specific differences.

gnomAD MCP Server

Overview

This MCP server provides a programmatic interface to the Genome Aggregation Database (gnomAD) API, supporting multiple API versions (v2.1.1, v3.1.2, v4.1.0).
It abstracts version-specific field and schema differences, exposing a unified API for downstream tools and users.

Status

๐Ÿšง Under Active Development ๐Ÿšง

This project is under active development. APIs and features may change without notice.

Supported gnomAD API Versions

  • v4.1.0 (gnomad_r4)
  • v3.1.2 (gnomad_r3)
  • v2.1.1 (gnomad_r2_1)

Supported Queries by Version

The following table summarizes which queries are available for each gnomAD API version:

Query TypeDescriptionv2v3v4
get_gene_infoRetrieve gene metadata and constraint metrics (direct lookup by gene_id/gene_symbol)โŒโŒโœ…
get_region_infoRetrieve variant and summary information for a genomic regionโŒโŒโœ…
get_variant_infoRetrieve variant metadata and population frequency data (by variantId)โœ…โœ…โœ…
get_clinvar_variant_infoRetrieve ClinVar variant data and clinical significanceโœ…โœ…โœ…
get_mitochondrial_variant_infoRetrieve mitochondrial variant data and population frequenciesโŒโŒโœ…
get_structural_variant_infoRetrieve structural variant (SV) data and population frequenciesโœ…โŒโœ…
get_copy_number_variant_infoRetrieve copy number variant (CNV) data and population frequenciesโŒโŒโœ…
search_for_genesSearch for genes by symbol or name (no direct gene_id lookup in v2/v3)โœ…โœ…โœ…
search_for_variantsSearch for variants by ID, gene, or regionโœ…โœ…โœ…
get_str_infoRetrieve short tandem repeat (STR) data and population frequenciesโŒโŒโœ…
get_all_strsRetrieve all STRs in the datasetโŒโŒโœ…
get_variant_liftoverRetrieve liftover mapping for a variant between genomesโœ…โŒโŒ
get_metadataRetrieve gnomAD browser metadata and API version infoโœ…โœ…โœ…
  • โœ… = Supported in this version
  • โŒ = Not supported in this version

Dependencies

  • Python >= 3.13
  • aiohttp >= 3.11.18
  • fastmcp >= 2.2.1
  • gql >= 3.5.2
  • httpx >= 0.28.1
  • mcp[cli] >= 1.6.0
  • nest-asyncio >= 1.6.0
  • pytest >= 8.3.5
  • pytest-asyncio >= 0.26.0

Directory Structure

.
โ”œโ”€โ”€ gnomad/              # Main package
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ types.py         # Type definitions
โ”‚   โ”œโ”€โ”€ queries/         # GraphQL query templates
โ”‚   โ”‚   โ”œโ”€โ”€ v2/         # v2.1 specific queries
โ”‚   โ”‚   โ”œโ”€โ”€ v3/         # v3 specific queries
โ”‚   โ”‚   โ””โ”€โ”€ v4/         # v4 specific queries
โ”‚   โ””โ”€โ”€ schemas/         # Versioned schema files
โ”œโ”€โ”€ tests/               # Test code and data
โ”‚   โ”œโ”€โ”€ input/          # Test input data
โ”‚   โ”‚   โ”œโ”€โ”€ analyzed_schemas/  # Analyzed schema data
โ”‚   โ”‚   โ”œโ”€โ”€ schema2query/     # Schema to query conversion
โ”‚   โ”‚   โ””โ”€โ”€ schemas/          # Raw schema files
โ”‚   โ”œโ”€โ”€ output/         # Test output data
โ”‚   โ”‚   โ”œโ”€โ”€ server/     # Server test outputs
โ”‚   โ”‚   โ”œโ”€โ”€ v2/         # v2.1 test outputs
โ”‚   โ”‚   โ”œโ”€โ”€ v3/         # v3 test outputs
โ”‚   โ”‚   โ””โ”€โ”€ v4/         # v4 test outputs
โ”‚   โ”œโ”€โ”€ scripts/        # Test utility scripts
โ”‚   โ””โ”€โ”€ tests/          # Additional test modules
โ”œโ”€โ”€ server.py           # FastMCP server entrypoint
โ”œโ”€โ”€ pyproject.toml      # Project metadata
โ”œโ”€โ”€ README.md           # This file
โ””โ”€โ”€ README_tests.md     # Testing documentation

Setup

Install dependencies

uv sync

Activate the virtual environment

. .venv/bin/activate

Test the server

uv --directory ./ run mcp dev server.py

Add the MCP server to your MCP server list (Claude, Cursor, etc.)

{
    "mcpServers": {
      "gnomad": {
        "command": "uv",
        "args": ["--directory", "where you cloned the repo", "run", "server.py"],
        "env": {}
      }
    }
}

Run tests

Please see

Query & API Design

  • Uses the QueryTemplateEngine pattern to manage version-specific GraphQL query templates.
  • Currently, queries are fixed; see (./gnomad/queries)
    • The queries were obtained using and
    • TODO: Dynamic queries
  • MCP tool endpoints are documented with detailed parameter and output descriptions.

License

This MCP server itself is licensed under the Apache License 2.0 - see the file for details.

This project uses the gnomAD API. Please ensure you cite gnomAD when using this tool or its outputs.

Acknowledgements