Skip to main content
Glama

BRaVa MCP

An MCP server for the Biobank Rare Variant Analysis (BRaVa) consortium's association results: rare coding-variant, gene-based tests meta-analysed across ~1.2M individuals from 10 global biobanks, 44 harmonised traits, 7 ancestry strata.

Summary statistics only. Not for clinical use.

SQL over the whole table

query runs read-only SQL against all 61,791,444 gene-level rows: every gene x trait x variant-mask x MAF-cutoff x ancestry cell, with the Burden, SKAT and SKAT-O p-values, the effect size and its standard error, and the cross-cohort heterogeneity test. The database is local, so a query costs no network.

-- what does this gene do
SELECT trait, mask, p_skato, beta FROM results
WHERE gene='PCSK9' AND ancestry='All' AND mask<>'synonymous'
ORDER BY p_skato LIMIT 20

-- most pleiotropic genes
SELECT gene, count(DISTINCT trait) traits FROM results
WHERE ancestry='All' AND p_skato < 1.39e-7 GROUP BY gene ORDER BY traits DESC

-- what a European-only study would have missed
SELECT a.gene, a.trait, a.p_skato FROM results a
WHERE a.ancestry='AFR' AND a.p_skato < 2.5e-6 AND NOT EXISTS (
  SELECT 1 FROM results e WHERE e.ancestry='EUR'
  AND e.gene_idx=a.gene_idx AND e.pheno=a.pheno AND e.p_skato < 2.5e-6)

Related MCP server: gwas-mcp

Tools

Tool

What it is for

query

Read-only SQL over the whole gene-level table

schema

Tables, columns, runnable recipes, and the traps that make a valid query scientifically wrong. Read this first

gene_phenotype_detail

Cross-ancestry replication for a gene-trait pair, or a screen over a hit list

variants

Single-variant results, genome-wide for a trait or inside one gene

Why the other three exist.

gene_phenotype_detail computes the concordance count over the five superpopulations only, excluding All and non_EUR, which pool the same individuals. A query that aggregates over every ancestry double-counts.

variants fetches over HTTP. The variant-level release is a separate upstream format of 3.09 GiB across ~176,000 objects, against 1.19 GiB for the gene-level data, and it is not included in the local database.

schema() returns the tables and columns, runnable query templates, and ten pitfalls: effect sizes belong to a different test than the p-value beside them, one mask is a calibration control rather than a biological category, ancestry strata overlap, a p-value of exactly zero is the strongest result rather than a missing one, and six more. Read it before writing SQL.

The database

873 MB, published as a release asset and downloaded once into ~/.cache/brava-mcp/ at first use. Cloning this repo costs 3.9 MB.

Built by etl/build_db.py from the 280 published phenotype/{P}.{ANC}.json files. Those carry the same data as the 19,541 per-gene files, so the pivot is chosen for politeness: 280 requests against 19,541 for identical coverage, once, rather than one per gene consulted forever. Class B operations are the scarce resource on the upstream free tier; egress is free on R2.

Sorted on the low-cardinality key columns and built without ART indexes: 2.49 GB with indexes, 1.75 GB without, 0.87 GB sorted. No index is missed, because these are filtered scans and DuckDB's zonemaps already serve them. Every query above returns in under 70 ms.

Running it

make sync                 # install
make db                   # download the published database (873 MB, once)
make test                 # offline suite
make test-all             # + live-data checks
make eval                 # 14 benchmark questions, answers derived independently
make serve                # HTTP daemon on :3163
uv run python server.py   # stdio

Rebuild the database from upstream with uv run python etl/build_db.py (~200 s: 120 s of downloads, 76 s of loading, then the sorted compaction).

Variable

Default

Purpose

MCP_TRANSPORT

stdio

http for the shared daemon

MCP_PORT

3163

daemon port

BRAVA_DB_URL

the release asset

where to fetch the database

BRAVA_DB_PATH

~/.cache/brava-mcp/brava.duckdb

local database

BRAVA_VARIANT_BASE_URL

upstream R2

variant-level files

Reading the results

  • beta > 0 increases risk (binary traits) or the trait value (quantitative). beta and se always come from the inverse-variance-weighted Burden meta-analysis, including on rows where you read p_skato. There is no SKAT-O effect size.

  • SKAT-O is the primary omnibus test. Burden is most powerful when a gene's variants point the same way; SKAT when they are mixed.

  • The synonymous mask is a calibration control. A significant synonymous result indicates residual test inflation, not biology.

  • Thresholds from the flagship paper: gene × mask Bonferroni 1.39e-7, gene-level Cauchy 2.5e-6, variant-level 1.82e-8.

  • BRaVa carries no allele frequencies and no common-variant GWAS. Variant rows link to gnomAD for the former.

schema() returns all of this, plus five more traps, alongside the columns.

Evaluation

evals/questions.json holds fourteen questions, all fourteen resolved directly from the raw upstream files by evals/resolve_golds.py, which imports nothing from brava, so the benchmark cannot agree with a decoding bug and doubles as an upstream-drift detector.

evals/selfcheck.py walks each question through the tools: currently 14/14, a median of one call per question, and zero outbound HTTP requests for the whole set. It checks each question's evidence (the values the tools must return) and never its answer, because several answers are conclusions no string match can verify. So it proves the data is reachable and at what cost, not that a model reaches the right conclusion; that half needs a model-in-the-loop runner and is still missing.

Traffic

Gene-level questions are local, so they cost the upstream project nothing at all. Only variants fetches, and each file is cached permanently. Building the database costs 280 requests, once. See nikbaya/brava_browser#1 for the conversation with the upstream author.

Citation

Palmer, Hill, Hodgson, et al. Rare variant association analyses across 10 global biobanks. medRxiv (2026). doi:10.64898/2026.05.21.26353759

The database is derived from that release via the BRaVa browser's published files, and is redistributed under the browser's MIT licence.

Licence

MIT.

Available Tools

4 tools
gene_phenotype_detailB
Read-onlyIdempotent

Does a gene-trait association replicate across ancestries and biobanks?

BRaVa's distinctive view, and a tool rather than a documented query because the concordance count has to exclude the two pooled strata ('All' and 'non_EUR') that contain the same individuals as the ones being counted. The obvious SQL double-counts and looks entirely reasonable.

Pass a comma-separated list to screen a whole hit list at once: one gene at a time costs a call each, the list form returns a verdict per gene. Verdicts separate "underpowered" from "discordant", which is the distinction that matters when a stratum is fifteen times smaller than another.

ParametersJSON Schema
NameRequiredDescriptionDefault
mafNo"<0.1%" (default) or "<0.01%".<0.1%
geneYesGene symbol or Ensembl id, or a comma-separated list of them.
maskNoVariant annotation mask (default "pLoF | damaging missense").pLoF | damaging missense
testNoBurden, SKAT or SKAT-O (default SKAT-O).SKAT-O
phenotypeYesTrait id or name.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, setting a baseline for safety. The description adds context beyond annotations: it explains why this is a tool (SQL double-counting) and describes the verdict types. This is helpful but not exhaustive—there is no mention of rate limits, authentication needs, or what happens if inputs are invalid. The description adds some behavioral insight but falls short of full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is verbose and includes extraneous technical reasoning about SQL double-counting and the tool's origin. While informative, the first three sentences could be condensed. The key actionable information (handling lists, verdict meanings) appears only in the last two sentences. The structure lacks front-loading of essential details, making it less efficient for an AI agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists (context confirms), the description does not need to detail return values. It explains the tool's purpose, input batch behavior, and verdict semantics, which suffices for most use cases. However, it omits specifics about supported biobanks, ancestry strata, or example phenotype IDs. The description is adequate for an expert but could be more complete for general AI consumption.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers all 5 parameters with descriptions (100% coverage), so the baseline is 3. The description adds extra value: it notes that the 'gene' parameter accepts a comma-separated list and that using a list returns a verdict per gene. It also clarifies the default for 'maf' and 'mask'. This goes beyond the schema, improving parameter understanding for batch usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear question defining the tool's purpose: 'Does a gene-trait association replicate across ancestries and biobanks?' This directly states the function. It also distinguishes itself as a specialized view that handles a SQL double-counting issue, which helps set it apart from generic query tools like the sibling 'query'. However, the purpose is embedded within technical reasoning, slightly reducing clarity for a general AI agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage advice: passing a comma-separated list to screen multiple genes, noting that one gene at a time costs a call each. It also explains the verdict distinction between 'underpowered' and 'discordant'. However, it does not explicitly say when to use this tool versus its siblings ('query', 'schema', 'variants') or when not to use it. The guidance is present but implicit and incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

queryA
Read-onlyIdempotent

Run read-only SQL over the whole BRaVa gene-level results table.

61.8 million rows: every gene x trait x variant-mask x MAF-cutoff x ancestry cell, with the Burden, SKAT and SKAT-O p-values, the effect size and its standard error, and the cross-cohort heterogeneity test. Local, so a query costs no network.

Call schema() first. It returns the tables, the columns, worked query templates, and the semantic traps that make a syntactically valid query scientifically wrong here. Several of them invert the answer rather than degrade it.

Query the results view rather than the raw tables: it exposes p-values instead of -log10, and labels instead of integer codes, so the obvious query is also the correct one.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesOne read-only statement (SELECT / WITH / DESCRIBE / SHOW / EXPLAIN). Combine steps with a CTE rather than sending several statements.
max_rowsNoRows returned (default 50, capped 500). The response is also capped at 25,000 characters, so select the columns you need.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so the description's behavioral burden is lower. The description adds value by disclosing the exact size of the table ('61.8 million rows'), the cost profile ('local, so a query costs no network'), and the fact that results are capped (25,000 characters, max rows 500). This goes beyond basic safety disclosure to provide performance expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear introductory sentence, a list of table contents, a callout to call schema() first, and a recommendation to use the results view. Every sentence adds value. It could be slightly more concise by removing the exact row count and focusing on the most critical guidance, but it's not overly verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the domain (61.8 million rows, multiple dimensions per cell), the rich annotations (readOnly, openWorld, idempotent), a fully described 2-parameter schema, and the presence of an output schema, the description is remarkably complete. It explains the exact contents, potential pitfalls (semantic traps), and best practices. There is no need to discuss return values since an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides clear descriptions for both parameters (sql and max_rows) with examples and constraints. Schema description coverage is 100%, so the baseline is 3. The description does not add meaning beyond what the schema provides, as the schema already explains the allowed SQL statements, default row count, and character limit. The description's mention of capping (500 rows, 25,000 chars) is redundant with the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs 'read-only SQL over the whole BRaVa gene-level results table.' It specifies the verb ('query'), resource ('BRaVa gene-level results table'), and scope ('read-only SQL'). While the name 'query' is generic, the description distinguishes it from siblings by specifying the exact domain (BRaVa) and table type (gene-level results), making it clear what this tool does compared to 'variant' or 'schema'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises to 'call `schema()` first' to understand the correct tables, columns, and semantic traps. It warns about semantic traps that can 'invert the answer.' It recommends querying the `results` view instead of raw tables. This provides explicit when-to-use guidance and a prerequisite action (calling schema()), which is excellent for avoiding misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

schemaA
Read-onlyIdempotent

The tables, the query templates, and the traps. Read this before querying.

Returns the shipped tables with their columns and row counts, worked queries for the questions people actually ask, the analysis vocabulary (masks, MAF cutoffs, tests, significance thresholds), and a list of ways a correct-looking query gives a wrong answer on this data. That list is not boilerplate: it covers effect sizes that belong to a different test than the p-value beside them, a mask that is a calibration control rather than a biological category, ancestry strata that overlap, and p-values of exactly zero that mean the most significant result rather than a missing one.

Returns: tables, columns, recipes, vocabulary, thresholds and pitfalls.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint, openWorldHint, and idempotentHint, which signal safety and non-mutating behavior. The description adds significant behavioral value beyond these: it details specific pitfalls (e.g., effect sizes mismatched to p-values, overlapping ancestry strata, p-values of exactly zero) that would otherwise be opaque. It also describes the return structure comprehensively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately concise but slightly verbose in the second paragraph (listing all pitfalls could be slightly tighter). However, it front-loads the critical usage instruction ('Read this before querying') and the return list. Every sentence adds value and earns its place by providing context not in structured fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters, no nested objects, and a likely output schema (mentioned but not provided here), the description is remarkably complete. It covers purpose, usage timing, return structure, and even specific pitfalls. The contextual signals (parameter count 0, schema coverage 100%) confirm no gaps need filling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters and schema description coverage is 100% (though empty schema). The description adds no parameter details because there are none, but this is appropriate and complete for a parameterless tool. No further explanation needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns 'tables, columns, recipes, vocabulary, thresholds and pitfalls' – a specific resource (schema/metadata) with a distinct verb 'returns'. It distinguishes itself from siblings like 'query' and 'variants' by describing this as a metadata discovery tool rather than a data retrieval tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Read this before querying,' setting a clear usage context: this should be called before using sibling tools (e.g., 'query') to understand the data structure, pitfalls, and analysis vocabulary. It implies when-not-to-use by framing itself as preparatory, not transactional.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

variantsA
Read-onlyIdempotent

Single-variant results for a trait, genome-wide or inside one gene.

Drops below the gene-level burden tests to the individual variants carrying a signal. Without gene this ranks the whole genome for the trait; with gene it restricts to that gene and adds the per-biobank effect-direction tally, the cross-biobank replication evidence.

Still fetched over HTTP rather than shipped in the database: the variant-level format is a separate, actively changing upstream release, an order of magnitude larger than the gene-level table, and rebuilt often enough that a local copy would be stale within the week. Each file is cached permanently once fetched.

Each row links to gnomAD, where population allele frequencies live.

ParametersJSON Schema
NameRequiredDescriptionDefault
geneNoRestrict to one gene. Omit for the genome-wide scan.
chromNoRestrict the genome-wide scan to one chromosome ("2", "X").
limitNoMax rows (default 25).
max_pNop-value ceiling. The variant-level threshold is 1.82e-8.
offsetNoSkip this many rows, to page through a long result set.
ancestryNoAll (cross-ancestry meta, default) or a specific stratum. Only meaningful together with `gene`.All
phenotypeYesTrait id or name.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds rich behavioral context beyond the annotations: explains the HTTP fetch mechanism, reasons for not storing the data locally (large size, frequent upstream rebuilds), caching behavior (permanent caching after first fetch), and links to external data (gnomAD). This goes far beyond the readOnlyHint, openWorldHint, and idempotentHint annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured into three clear paragraphs, front-loaded with the core purpose. It contains some explanatory detail (e.g., HTTP fetch rationale) that is valuable but slightly verbose. Overall, each sentence contributes to understanding the tool's behavior and usage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not detail return values. It covers purpose, modes, differentiation from siblings, caching, and external references. It does not explicitly mention pagination or error handling, but the schema descriptions for limit/offset and context signals provide that. The description is largely complete for a read-only data retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing baseline 3. The description adds significant value for the 'gene' parameter by explaining it enables additional per-biobank effect-direction and cross-biobank replication evidence. It also reinforces the role of 'max_p' implicitly through mention of the threshold. For other parameters, the schema descriptions suffice.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns 'single-variant results for a trait, genome-wide or inside one gene', explicitly distinguishing it from gene-level burden tests (likely a sibling tool). It uses a specific verb (returns/fetches) and resource (variants), and explains the two distinct modes of operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use genome-wide vs per-gene mode and contrasts with gene-level burden tests. It implies usage context well but does not explicitly state 'when not to use' or name alternative tools. The guidance on caching and HTTP fetch provides operational context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedgene_phenotype_detail
    • First observedquery
    • First observedschema
    • First observedvariants

TDQS

A4/5.0
Disambiguation5/5

Each tool has a distinct role: schema provides metadata and pitfalls, query runs arbitrary SQL, gene_phenotype_detail performs cross-ancestry replication analysis, and variants retrieves single-variant results. There is no overlap in functionality, and descriptions clearly differentiate use cases.

Naming Consistency4/5

All tool names use lowercase and underscores, but they mix single-word verbs ('query', 'schema') and descriptive multi-word nouns ('gene_phenotype_detail', 'variants'). While the style is consistent (underscore_case), the pattern varies between imperative and descriptive, which is acceptable but not perfectly uniform.

Tool Count5/5

Four tools are appropriate for a specialized genomic data server. Schema is a mandatory prerequisite, query enables flexible exploration, gene_phenotype_detail addresses the server's primary analysis use case, and variants provides deeper variant-level data. The count is compact and focused without being insufficient.

Completeness4/5

The server covers the main workflows: understanding the schema, running analytical SQL queries, performing replication checks, and accessing variant-level results. It lacks explicit tools for listing available traits or genes, but these can be obtained via query. The set is functionally complete for its domain, with minor gaps.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    F
    maintenance
    Provides AI-powered access to major biological databases for GWAS and bioinformatics research. Enables natural language queries for protein, gene, variant, pathway, and drug discovery analysis.
    44
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables real-time pharmacogenomics analysis, including variant clinical significance, drug-gene interactions, and dosing guidelines, by connecting to ClinVar, PharmGKB, gnomAD, and other databases.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to query clinical genomics databases, retrieve supporting literature, analyze population genetics, and visualize biological pathways.
    19
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/plemio/brava-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server