BRaVa MCP
BRaVa MCP is a read-only server for exploring BRaVa rare-variant gene-based and single-variant association results, mostly with local SQL and some HTTP-fetched variant data.
Run read-only SQL over 61.8 million gene-level rows: every gene × trait × variant mask × MAF cutoff × ancestry, including Burden/SKAT/SKAT-O p-values, beta/SE, and heterogeneity.
Get the
schematool with tables, columns, runnable query recipes, analysis vocabulary, significance thresholds, and pitfalls that prevent scientifically wrong queries.Use
gene_phenotype_detailto check whether a gene–trait association replicates across ancestries/biobanks, screening a single pair or a comma-separated hit list.Use
variantsto fetch single-variant results genome-wide for a trait, restrict to one gene or chromosome, filter by p-value, and link to gnomAD for allele frequencies.Answer scientific questions such as most pleiotropic genes, ancestry-specific signals, and significant associations hidden in pooled strata.
Supports local cached operation, stdio or HTTP transport, and offline testing/evaluation workflows.
Emphasises careful interpretation: effect sizes belong to the Burden test, the synonymous mask is a calibration control, ancestry strata overlap, and exact-zero p-values are the strongest signals.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BRaVa MCP Screen PCSK9, LDLR, APOB for LDLC replication"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Read-only SQL over the whole gene-level table |
| Tables, columns, runnable recipes, and the traps that make a valid query scientifically wrong. Read this first |
| Cross-ancestry replication for a gene-trait pair, or a screen over a hit list |
| 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 # stdioRebuild 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 |
|
|
|
|
| daemon port |
| the release asset | where to fetch the database |
|
| local database |
| upstream R2 | variant-level files |
Reading the results
beta > 0 increases risk (binary traits) or the trait value (quantitative).
betaandsealways come from the inverse-variance-weighted Burden meta-analysis, including on rows where you readp_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
synonymousmask 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 toolsgene_phenotype_detailBRead-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.
Inputs: gene (required), phenotype (required), maf, mask, +1 more. Returns: result
queryARead-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.
Inputs: sql (required), max_rows. Returns: result
schemaARead-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.
Inputs: no named parameters. Returns: result
variantsARead-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.
Inputs: phenotype (required), gene, chrom, limit, +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
Ancestry allele frequencies, LoF constraint, variant lists, and coverage from gnomAD, with ClinVar.
Find pharmacogenomics guidelines, translate diplotypes, and retrieve prescribing recommendations.
dbSNP refSNP records and HGVS/SPDI/rsID normalization for human genetic variants, from NCBI…
Canine genomics for agents: breed allele frequencies, AI pathogenicity + OMIA clinical disease layer
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAccess to 1000 Genomes Project dataset, hosted online in Dnaerys variant store3Apache 2.0
- AlicenseCqualityDmaintenanceProvides 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.441MIT
- AlicenseNot gradedqualityDmaintenanceEnables real-time pharmacogenomics analysis, including variant clinical significance, drug-gene interactions, and dosing guidelines, by connecting to ClinVar, PharmGKB, gnomAD, and other databases.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query clinical genomics databases, retrieve supporting literature, analyze population genetics, and visualize biological pathways.18MIT