Skip to main content
Glama

BRaVa MCP

Biobank Rare Variant Analysis (BRaVa)コンソーシアムの関連解析結果のためのMCPサーバー。約120万人(10の国際バイオバンク、44の調和化された形質、7つの祖先層)を対象にメタ解析された、稀なコーディングバリアント、遺伝子ベースの検定結果。

要約統計量のみ。臨床用途には使用不可。

テーブルそのものを提供し、ラッパーではない

遺伝子レベルの結果は単一のフラットなファクトテーブルであり、モデルは既に専門家レベルでSQLを記述するため、queryはそのまま引き渡す:61,791,444行、ローカル、ネットワーク不要。あらゆる質問はクエリであり、固定されたツールセットでは決して想定できなかった質問も含む。

-- 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

ツール

ツール

目的

query

遺伝子レベルテーブル全体に対する読み取り専用SQL

schema

テーブル、カラム、実行可能なレシピ、および妥当なクエリを科学的に間違ったものにする落とし穴。最初にこれを読む

gene_phenotype_detail

遺伝子-形質ペアの交差祖先再現性、またはヒットリストに対するスクリーニング

variants

単一バリアントの結果、形質ごとの全ゲノムワイドまたは1つの遺伝子内

クエリ以外の3つのツールは、SQLでは対応できないものをカバーする。

gene_phenotype_detail:一致カウントからはAllとnon_EURを除外する必要があるため。これらはカウント対象の層と同じ個体をプールしており、単純なSQLでは二重計上となり、完全に妥当に見える。

variants:バリアントレベルのリリースは別の上流フォーマットであり、一桁規模が大きく、頻繁に再構築されるため、ローカルコピーは1週間以内に古くなる。

schema():構文的に完全なクエリでも、ここでは科学的に間違っている可能性があるため。効果量は隣のp値とは異なる検定に属し、あるマスクは生物学的カテゴリではなく較正コントロールであり、祖先層は重複し、p値が正確にゼロは欠損ではなく最も強い結果である。これらのいくつかは回答を劣化させるのではなく反転させるため、READMEに書くのではなくカラムと共に提供される。

データベース

873 MB、リリースアセットとして公開され、初回使用時に~/.cache/brava-mcp/に一度ダウンロードされる。意図的にコミットされていない:デプロイメントはスポーンごとにクローンをリセットするため、内部にギガバイトがあると永遠に再取得されることになる。このリポジトリのクローンは3.9 MB。

公開されている280個のphenotype/{P}.{ANC}.jsonファイルからetl/build_db.pyによって構築。これらは19,541個の遺伝子ごとのファイルと同じデータを持つため、ピボットは礼儀のために選択されている:同一のカバレッジに対して280リクエスト対19,541リクエスト、一度だけ、遺伝子ごとに1つずつ永遠に参照されることはない。上流の無料ティアではクラスB操作が希少リソースであり、R2からのエグレスは無料。

低カーディナリティのキーカラムでソートされ、ARTインデックスなしで構築:インデックスありで2.49 GB、インデックスなしで1.75 GB、ソート状態で0.87 GB。欠落するインデックスはない。なぜならこれらはフィルタリングスキャンであり、DuckDBのゾーンマップが既にそれらを提供するから。上記のすべてのクエリは70 ms未満で返る。

実行方法

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

上流からデータベースを再構築するにはuv run python etl/build_db.py(約200秒:ダウンロード120秒、ロード76秒、その後ソート圧縮)。

変数

デフォルト

目的

MCP_TRANSPORT

stdio

共有デーモン用のhttp

MCP_PORT

3163

デーモンポート

BRAVA_DB_URL

リリースアセット

データベースの取得先

BRAVA_DB_PATH

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

ローカルデータベース

BRAVA_VARIANT_BASE_URL

上流R2

バリアントレベルファイル

結果の読み方

  • beta > 0 はリスク(二値形質)または形質値(量的形質)を増加させる。 betaとseは常に逆分散重み付けBurdenメタ解析に由来し、p_skatoを読む行でも同様。SKAT-Oの効果量は存在しない。

  • SKAT-O は主要な包括的検定。Burden は遺伝子のバリアントが同じ方向を示す場合に最も強力であり、SKAT は混合している場合に強力。

  • synonymousマスクは較正コントロールである。有意な同義結果は、生物学ではなく残差検定の膨張を示す。

  • 旗艦論文からの閾値:遺伝子×マスク Bonferroni 1.39e-7、遺伝子レベル Cauchy 2.5e-6、バリアントレベル 1.82e-8。

  • BRaVa はアレル頻度も共通バリアントGWASも保持しない。バリアント行は前者についてはgnomADにリンクする。

schema()はこれらすべてと、さらに5つの落とし穴をカラムと共に返す。

評価

evals/questions.jsonには14の質問が含まれ、そのすべてがevals/resolve_golds.pyによって上流の生ファイルから直接解決される。このスクリプトはbravaから何もインポートしないため、ベンチマークがデコードのバグと一致することはなく、上流のドリフト検出器としても機能する。

evals/selfcheck.pyは各質問をツールを通じて実行する:現在14/14、質問あたりの中央値は1回の呼び出し、セット全体で発信HTTPリクエストはゼロ。各質問のevidence(ツールが返すべき値)をチェックし、answerは決してチェックしない。なぜなら、いくつかの回答は文字列マッチで検証できない結論だからである。したがって、データに到達可能であり、そのコストがどれほどかを証明するものであり、モデルが正しい結論に達するかどうかを証明するものではない。後者の半分にはモデルインザループのランナーが必要であり、まだ欠落している。

トラフィック

遺伝子レベルの質問はローカルであるため、上流プロジェクトにはまったくコストがかからない。variantsのみがフェッチを行い、各ファイルは恒久的にキャッシュされる。データベースの構築には280リクエストが一度かかる。上流の作者との会話についてはnikbaya/brava_browser#1を参照。

引用

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

データベースはBRaVaブラウザの公開ファイルを介してそのリリースから派生したものであり、ブラウザのMITライセンスの下で再配布される。

ライセンス

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.

Inputs: gene (required), phenotype (required), maf, mask, +1 more. Returns: result

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.

Inputs: sql (required), max_rows. Returns: result

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.

Inputs: no named parameters. Returns: result

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.

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

    A4/5.0

    Scored across 4 tools

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      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
      49 PyPI
      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.
      15
      MIT