Look up allele frequencies by ancestry, gene constraint, variants, and coverage over gnomAD.
Look up variant allele frequencies by ancestry, gene loss-of-function constraint, gene variant lists, and sequencing coverage over gnomAD — with ClinVar significance joined in — via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://gnomad-genetics.caseyjhand.com/mcp
Population genetics over gnomAD (Broad Institute), with ClinVar clinical significance joined in from NCBI. Look up per-ancestry allele frequencies, gene loss-of-function constraint, gene variant catalogs, and sequencing coverage, then query large result sets with SQL from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
| Tool | Description |
|---|---|
gnomad_get_variant | Full population record for one or more variants — AC/AN/AF overall and per genetic-ancestry group, homozygote/hemizygote counts, quality flags, transcript consequence, in-silico predictors, and joined ClinVar significance. |
gnomad_get_gene_constraint | Gene loss-of-function constraint — pLI, LOEUF (oe_lof_upper) with confidence interval, observed/expected ratios, and Z-scores. By HGNC symbol or Ensembl gene ID. |
gnomad_list_gene_variants | Every variant in a gene, transcript, or region with allele frequencies and predicted consequences, filterable by consequence class and max allele frequency. |
gnomad_get_coverage | Sequencing coverage across a gene, transcript, or region — mean/median depth and the fraction of samples over depth thresholds, per callset track. |
gnomad_search_clinvar | Gene-level ClinVar detail via NCBI E-utilities — classified variants, review status, conditions, and submission counts. |
gnomad_dataframe_query | Run a read-only SQL SELECT across canvas tables staged by the list tools. |
gnomad_dataframe_describe | List the tables staged on a canvas and their columns before writing SQL. |
gnomad_dataframe_drop | Drop a named table from a canvas to reclaim memory. Opt-in via GNOMAD_DATAFRAME_DROP_ENABLED=true — off by default. |
| Resource | Description |
|---|---|
gnomad://variant/{dataset}/{variantId} | Population record for one variant — mirrors gnomad_get_variant. |
gnomad://gene/{dataset}/{gene}/constraint | Gene loss-of-function constraint — mirrors gnomad_get_gene_constraint. |
All resource data is also reachable via tools. The list tools (gnomad_list_gene_variants, gnomad_get_coverage, gnomad_search_clinvar) return analytical row sets rather than stable single-URI documents, so they are not exposed as resources — call the tools instead.
| Prompt | Description |
|---|---|
gnomad_variant_triage | Guided rare-disease variant-triage workflow: population frequency → gene constraint → callability check, in order. |
gnomad_get_variant toolGNOMAD_MAX_VARIANT_BATCH), each a chrom-pos-ref-alt variantId (e.g. 1-55051215-G-GA) or an rsID (e.g. rs11591147)failed[] without failing the othersexome / genome) carry the variant, quality flags, transcript consequence, in-silico predictor scores, and the ClinVar significance gnomAD joins per variantfound[] for a well-formed ID means the variant is not in the chosen dataset — pair with gnomad_get_coverage to confirm the position is callable before concluding true absencegnomad_get_gene_constraint toolPCSK9) or an Ensembl gene ID (ENSG00000169174)oe_lof_upper (<0.6 intolerant in v4, <0.35 in v2) with its lower bound, observed/expected ratios for LoF / missense / synonymous, and the three Z-scoresconstraint_flags surfaces v4 beta caveats flagged by the gnomAD teamgnomad_list_gene_variants toolgene, transcript_id, or region (chrom-start-stop, 1-based inclusive)consequence_class (lof / missense / synonymous / other) and/or a maximum allele frequencygene_variants with an inline preview returned alongside canvas_id and table_name — query it with gnomad_dataframe_query to rank by AF, count by consequence, or group across the complete setcanvas_id REPLACES the staged table; it does not appendCANVAS_PROVIDER_TYPE != duckdb) the tool returns a capped inline preview (100 rows) with spilled=false and the SQL path is unavailablegnomad_get_coverage toolgene, transcript_id, or regioncoverage_source narrows to one track (exome / genome); omit to return every available trackgnomad_search_clinvar toolclinical_significance (e.g. pathogenic) and a minimum star rating (min_review_stars, 0–4)clinvar_variants canvas table with an inline preview; reusing a canvas_id REPLACES that tableNCBI_API_KEY for a higher rate limit (10 vs 3 req/s)gnomad_dataframe_query toolSELECTs against a canvas table staged by gnomad_list_gene_variants or gnomad_search_clinvar — writes, DDL, and file/HTTP table functions are rejected by the canvas gategene_variants or clinvar_variants)truncated: true marks a result clipped at the canvas row capCANVAS_PROVIDER_TYPE=duckdb — otherwise fails with a canvas_disabled errorgnomad_dataframe_describe toolgnomad_dataframe_queryCANVAS_PROVIDER_TYPE=duckdb — otherwise fails with a canvas_disabled errorgnomad_dataframe_drop toolreadOnlyHint: false, destructiveHint: true) on an otherwise read-only surfaceGNOMAD_DATAFRAME_DROP_ENABLED=true; absent from tools/list when off, since per-table TTL already reclaims memory automaticallyCANVAS_PROVIDER_TYPE=duckdb — otherwise fails with a canvas_disabled errorgnomad://variant/{dataset}/{variantId} resourceapplication/json — mirrors gnomad_get_variant; the dataset segment keeps the URI self-describingvariantId accepts a chrom-pos-ref-alt ID or an rsID, same grammar as the toolinvalid_variant_id (outside the coordinate/rsID grammar) and variant_not_foundgnomad://gene/{dataset}/{gene}/constraint resourceapplication/json — mirrors gnomad_get_gene_constraintgene accepts an HGNC symbol or Ensembl gene IDgene_not_found when no gene matches in the requested buildgnomad_variant_triage promptvariant required (chrom-pos-ref-alt or rsID); gene and dataset optionalgnomad_get_variant) → gene constraint (gnomad_get_gene_constraint) → callability check (gnomad_get_coverage on the exact position, not gene-level)variant with a validation error before generating the chainBuilt on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
gnomAD-specific:
dataset and reference_genome are distinct, coherence-validated parameters (v4/v3 ⇒ GRCh38, v2.1/ExAC ⇒ GRCh37); both are echoed in every tool's output so a wrong-build coordinate mismatch is visibleGNOMAD_MAX_CONCURRENCY, default 2) and exponential backoff against a community-funded, rate-limited APIgnomad_list_gene_variants and gnomad_search_clinvar stage their full result on a DuckDB-backed canvas table queryable via gnomad_dataframe_queryAgent-friendly output:
gnomad_get_variant returns per-item failed[] rows with actionable messages instead of failing the whole batchdataset and reference_genome echoed back; null upstream fields preserved as null, never fabricatedincoherent_build, invalid_target, gene_not_found, canvas_disabled) so callers know the next moveA public instance is available at https://gnomad-genetics.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"gnomad-genetics-mcp-server": {
"type": "streamable-http",
"url": "https://gnomad-genetics.caseyjhand.com/mcp"
}
}
}
Add the following to your MCP client configuration file. gnomAD is a free, keyless API — no credentials required.
{
"mcpServers": {
"gnomad-genetics-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/gnomad-genetics-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"gnomad-genetics-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/gnomad-genetics-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"gnomad-genetics-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/gnomad-genetics-mcp-server:latest"
]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
To enable the SQL analytics path, also set CANVAS_PROVIDER_TYPE=duckdb — @duckdb/node-api ships as a dependency, so nothing extra to install.
NCBI_API_KEY raises the gnomad_search_clinvar rate limit.git clone https://github.com/cyanheads/gnomad-genetics-mcp-server.git
cd gnomad-genetics-mcp-server
bun install
cp .env.example .env
# all vars are optional — the server runs keyless out of the box
All variables are optional; the server runs keyless with the defaults below.
| Variable | Description | Default |
|---|---|---|
GNOMAD_API_BASE_URL | gnomAD GraphQL endpoint. Override for a private mirror or testing. | https://gnomad.broadinstitute.org/api |
GNOMAD_DEFAULT_DATASET | Dataset used when a tool call omits dataset (gnomad_r4 / gnomad_r3 / gnomad_r2_1 / exac). | gnomad_r4 |
GNOMAD_REQUEST_TIMEOUT_MS | Per-request timeout against the GraphQL endpoint, in milliseconds. | 30000 |
GNOMAD_MAX_CONCURRENCY | Cap on concurrent upstream requests — politeness against a community-funded API. | 2 |
GNOMAD_MAX_VARIANT_BATCH | Maximum variant IDs accepted per gnomad_get_variant call. | 25 |
CLINVAR_BASE_URL | NCBI E-utilities base URL for gnomad_search_clinvar. | https://eutils.ncbi.nlm.nih.gov/entrez/eutils |
NCBI_API_KEY | Optional NCBI key. Raises the E-utilities rate limit from 3 to 10 req/s. | — |
CANVAS_PROVIDER_TYPE | Set to duckdb to enable the spill/SQL path behind the list tools. When none, they return a capped inline preview. | none |
GNOMAD_DATAFRAME_DROP_ENABLED | Gate for the opt-in gnomad_dataframe_drop tool. Off by default. | false |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for the HTTP server. | 3010 |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security
bun run test # Vitest test suite
bun run lint:mcp # Validate MCP definitions against spec
docker build -t gnomad-genetics-mcp-server .
docker run --rm -e MCP_TRANSPORT_TYPE=http -p 3010:3010 gnomad-genetics-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/gnomad-genetics-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools/resources/prompts and inits services. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools | Tool definitions (*.tool.ts) and shared input schemas. |
src/mcp-server/resources | Resource definitions (*.resource.ts). |
src/mcp-server/prompts | Prompt definitions (*.prompt.ts). |
src/services/gnomad | gnomAD GraphQL client, query documents, and domain types. |
src/services/clinvar | NCBI E-utilities client for the optional ClinVar tool. |
src/services/canvas-accessor.ts | Module-level accessor for the framework's optional DataCanvas. |
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagecreateApp() arrays in src/index.tsgnomAD data is provided by the Genome Aggregation Database (Broad Institute). ClinVar data is provided by NCBI.
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/gnomad-genetics-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-gnomad-genetics-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/gnomad-genetics-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.cyanheads/gnomad-genetics-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.