BRaVa MCP
BRaVa MCP
Un servidor MCP para los resultados de asociación del consorcio Biobank Rare Variant Analysis (BRaVa): pruebas basadas en genes de variantes codificantes raras, metaanalizadas en ~1,2 millones de individuos de 10 biobancos globales, 44 rasgos armonizados y 7 estratos ancestrales.
Solo estadísticas resumidas. No apto para uso clínico.
Entrega la tabla, no un envoltorio
Los resultados a nivel de gen son una única tabla plana de hechos, y un modelo ya escribe SQL a nivel experto, por lo que query se la entrega: 61.791.444 filas, en local, sin red. Cualquier pregunta es una consulta, incluidas aquellas que un conjunto fijo de herramientas nunca habría anticipado.
-- 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
Herramientas
Herramienta | Para qué sirve |
| SQL de solo lectura sobre toda la tabla a nivel de gen |
| Tablas, columnas, recetas ejecutables y las trampas que hacen que una consulta válida sea científicamente errónea. Léelo primero |
| Replicación entre ancestros para un par gen-rasgo, o un cribado sobre una lista de aciertos |
| Resultados de variante única, en todo el genoma para un rasgo o dentro de un gen |
Las tres herramientas no consulta cubren lo que SQL no puede.
gene_phenotype_detail, porque el recuento de concordancia debe excluir All y non_EUR, que agrupan a los mismos individuos que los estratos que se cuentan: el SQL obvio duplica el recuento y parece completamente razonable.
variants, porque el lanzamiento a nivel de variante es un formato ascendente separado, un orden de magnitud mayor y se reconstruye con la suficiente frecuencia como para que una copia local quede obsoleta en una semana.
schema(), porque una consulta sintácticamente perfecta puede ser científicamente errónea aquí. Los tamaños del efecto pertenecen a una prueba diferente del valor p que los acompaña, una máscara es un control de calibración en lugar de una categoría biológica, los estratos ancestrales se superponen, y un valor p de exactamente cero es el resultado más fuerte en lugar de uno faltante. Varios de ellos invierten una respuesta en lugar de degradarla, por lo que viajan con las columnas en lugar de estar en un README.
La base de datos
873 MB, publicada como un activo de lanzamiento y descargada una vez en ~/.cache/brava-mcp/ en el primer uso. Deliberadamente no incluida en el repositorio: los despliegues reinician el clon en cada inicio, por lo que un gigabyte dentro de él se volvería a descargar para siempre. Clonar este repositorio cuesta 3,9 MB.
Construida por etl/build_db.py a partir de los 280 archivos phenotype/{P}.{ANC}.json publicados. Estos contienen los mismos datos que los 19.541 archivos por gen, por lo que el pivote se elige por cortesía: 280 solicitudes frente a 19.541 para una cobertura idéntica, una vez, en lugar de una por gen consultada para siempre. Las operaciones de Clase B son el recurso escaso en el nivel gratuito ascendente; la salida es gratuita en R2.
Ordenada en las columnas clave de baja cardinalidad y construida sin índices ART: 2,49 GB con índices, 1,75 GB sin ellos, 0,87 GB ordenada. No se echa de menos ningún índice, porque se trata de escaneos filtrados y los zonemaps de DuckDB ya los sirven. Cada consulta anterior devuelve resultados en menos de 70 ms.
Ejecución
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 # stdioReconstruye la base de datos desde el origen con uv run python etl/build_db.py (~200 s: 120 s de descargas, 76 s de carga, luego la compactación ordenada).
Variable | Por defecto | Propósito |
|
|
|
|
| puerto del demonio |
| el activo de lanzamiento | dónde descargar la base de datos |
|
| base de datos local |
| R2 ascendente | archivos a nivel de variante |
Lectura de los resultados
beta > 0 aumenta el riesgo (rasgos binarios) o el valor del rasgo (cuantitativo).
betaysesiempre provienen del metaanálisis Burden ponderado por varianza inversa, incluso en filas donde leesp_skato. No hay un tamaño del efecto SKAT-O.SKAT-O es la prueba ómnibus principal. Burden es más potente cuando las variantes de un gen apuntan en la misma dirección; SKAT cuando están mezcladas.
La máscara
synonymouses un control de calibración. Un resultado sinónimo significativo indica inflación residual de la prueba, no biología.Umbrales del artículo principal: gen × máscara Bonferroni 1,39e-7, Cauchy a nivel de gen 2,5e-6, a nivel de variante 1,82e-8.
BRaVa no contiene frecuencias alélicas ni GWAS de variantes comunes. Las filas de variantes enlazan a gnomAD para las primeras.
schema() devuelve todo esto, más cinco trampas adicionales, junto con las columnas.
Evaluación
evals/questions.json contiene catorce preguntas, las catorce resueltas directamente a partir de los archivos ascendentes originales por evals/resolve_golds.py, que no importa nada de brava, por lo que el punto de referencia no puede coincidir con un error de decodificación y funciona como un detector de desviación ascendente.
evals/selfcheck.py recorre cada pregunta a través de las herramientas: actualmente 14/14, una mediana de una llamada por pregunta y cero solicitudes HTTP salientes para todo el conjunto. Comprueba la evidence de cada pregunta (los valores que las herramientas deben devolver) y nunca su answer, porque varias respuestas son conclusiones que ninguna coincidencia de cadenas puede verificar. Por lo tanto, demuestra que los datos son accesibles y a qué costo, no que un modelo llegue a la conclusión correcta; esa mitad necesita un ejecutor con modelo en el bucle y aún falta.
Tráfico
Las preguntas a nivel de gen son locales, por lo que no cuestan nada al proyecto ascendente. Solo variants realiza búsquedas, y cada archivo se almacena en caché de forma permanente. Construir la base de datos cuesta 280 solicitudes, una vez. Consulta nikbaya/brava_browser#1 para la conversación con el autor ascendente.
Citación
Palmer, Hill, Hodgson, et al. Rare variant association analyses across 10 global biobanks. medRxiv (2026). doi:10.64898/2026.05.21.26353759
La base de datos se deriva de ese lanzamiento a través de los archivos publicados del navegador BRaVa y se redistribuye bajo la licencia MIT del navegador.
Licencia
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.
| Name | Required | Description | Default |
|---|---|---|---|
| maf | No | "<0.1%" (default) or "<0.01%". | <0.1% |
| gene | Yes | Gene symbol or Ensembl id, or a comma-separated list of them. | |
| mask | No | Variant annotation mask (default "pLoF | damaging missense"). | pLoF | damaging missense |
| test | No | Burden, SKAT or SKAT-O (default SKAT-O). | SKAT-O |
| phenotype | Yes | Trait id or name. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only statement (SELECT / WITH / DESCRIBE / SHOW / EXPLAIN). Combine steps with a CTE rather than sending several statements. | |
| max_rows | No | Rows returned (default 50, capped 500). The response is also capped at 25,000 characters, so select the columns you need. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| gene | No | Restrict to one gene. Omit for the genome-wide scan. | |
| chrom | No | Restrict the genome-wide scan to one chromosome ("2", "X"). | |
| limit | No | Max rows (default 25). | |
| max_p | No | p-value ceiling. The variant-level threshold is 1.82e-8. | |
| offset | No | Skip this many rows, to page through a long result set. | |
| ancestry | No | All (cross-ancestry meta, default) or a specific stratum. Only meaningful together with `gene`. | All |
| phenotype | Yes | Trait id or name. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v0.1.0- First observed
gene_phenotype_detail - First observed
query - First observed
schema - First observed
variants
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
Look up allele frequencies by ancestry, gene constraint, variants, and coverage over gnomAD.
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
Pharmacogenomics for AI agents: cited drug–gene, gene and rsID lookups plus a medication screen.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAccess to 1000 Genomes Project dataset, hosted online in Dnaerys variant store2Apache 2.0
- AlicenseCqualityFmaintenanceProvides 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