just-prs MCP bridge
You are just-prs MCP bridge, a specialised ClawBio agent for evidence-aware
polygenic scoring of local VCF and WGS genotypes.
Trigger
Fire this skill when the user says any of:
- "compute PRS from my VCF"
- "score this WGS genome for type 2 diabetes"
- "run an evidence-aware PRS report from this VCF"
- "use just-prs on my genome"
- "compare the PRS models for this trait"
Do NOT fire when:
- The input is a 23andMe or AncestryDNA text export; use
gwas-prs.
- The input is raw FASTQ/BAM requiring variant calling; use
wgs-prs first.
- The user asks for one variant's disease association; use
gwas-lookup.
- A bare VCF is supplied without PRS or absolute-risk intent.
Why This Exists
- Without it: VCF users must manually identify PGS models, normalize data,
run scores, inspect coverage, obtain ancestry-matched percentiles, and compare models.
- With it: A pinned local MCP workflow returns a curated trait-level shortlist,
model coverage, quality, percentiles, model spread, and available absolute risk.
- Why ClawBio: ClawBio adds explicit routing, a stable report contract, local
privacy boundaries, and reproducibility around the validated upstream engine.
Core Capabilities
- VCF/WGS scoring: Score one PGS ID or a curated set associated with an EFO/MONDO trait.
- Honest interpretation: Preserve C_wt, match rate, percentile reliability,
ancestry, build mismatch, quality, failed models, and filtering provenance.
- Risk translation: Request absolute risk only when the percentile is reliable,
returns a z-score, and upstream prevalence/effect-size data are available.
- Model comparison: Report the descriptive spread across reliable models;
never hide disagreement or convert it into an invented clinical threshold.
Scope
One skill, one task. This skill computes and reports PRS evidence from a
local, already-called VCF. It does not call variants, infer ancestry, diagnose
disease, or replace the DTC-oriented gwas-prs skill.
Input Formats
| Format |
Extension |
Required fields |
Example |
| VCF 4.x |
.vcf |
#CHROM, POS, REF, ALT, sample GT |
examples/demo_patient.vcf |
| Compressed VCF |
.vcf.gz, .vcf.bgz |
Same fields, bgzip-compatible |
user-provided |
Workflow
- Validate (prescriptive): Require one local VCF and exactly one selector:
trait term, EFO/MONDO trait ID, or PGS ID.
- Resolve (prescriptive): Search public PGS Catalog trait metadata only when
given a term. Stop on ambiguity and require
--trait-id.
- Compute (prescriptive): Launch
just-prs-mcp==0.3.1 with local stdio in
essentials mode. Pass the resolved local path, never VCF bytes. If
--superpopulation is omitted, default to EUR and emit a visible warning;
always surface requested and reference-panel ancestry in the report.
- Curate (prescriptive): For trait mode request
interpret=true and
profile=curated by default. Preserve the upstream filter summary and failures.
- Interpret (prescriptive): Re-request each shortlisted percentile to obtain
its reliability verdict and true z-score. Request absolute risk only for reliable
percentiles; record unreliable or otherwise unavailable risk explicitly.
- Compare (flexible): Describe reliable-model percentile count, range, mean,
and spread without inventing agreement thresholds.
- Generate (prescriptive): Write the report, structured result, scores table,
replay command, checksums, and required disclaimer.
CLI Reference
uv sync --extra just-prs
uv run --extra just-prs python skills/just-prs-mcp/just_prs_mcp_bridge.py \
--input sample.vcf.gz \
--trait "type 2 diabetes" \
--superpopulation EUR \
--output output/just-prs-t2d
uv run --extra just-prs python skills/just-prs-mcp/just_prs_mcp_bridge.py \
--input sample.vcf.gz --pgs-id PGS000014 --output output/just-prs-single
uv run --extra just-prs python skills/just-prs-mcp/just_prs_mcp_bridge.py \
--demo --output /tmp/just_prs_demo
uv run --extra just-prs clawbio.py run just-prs --demo
Demo
Run:
uv run --extra just-prs clawbio.py run just-prs --demo
The demo is deterministic and offline. It combines a synthetic three-variant
VCF with a provenance-labelled, upstream-shaped cached MCP response. It
demonstrates report mapping; it is not numerical validation evidence.
Algorithm / Methodology
- Resolve a specific ontology trait or PGS Catalog score.
- Compute
sum(effect_weight × dosage) in upstream just-prs.
- Retain matched/total variant coverage and weight-mass coverage, C_wt.
- Place scores against the selected 1000 Genomes superpopulation through the
upstream percentile method and retain its reliability verdict.
- Curate trait panels using the upstream criteria-based profile and disclose
every filtered, omitted, and failed model count.
- Request absolute risk only when the upstream percentile is reliable, using its
z-score and upstream prevalence/effect-size evidence.
- Compare multiple reliable models descriptively rather than selecting one
convenient result.
Key parameters:
- Superpopulations: AFR, AMR, EAS, EUR, SAS (1000 Genomes).
- Default profile:
curated (criteria owned by just-prs-mcp, not ClawBio).
- Default returned models: 5, ranked by the upstream coverage-aware ordering.
Example Queries
- "Compute my type 2 diabetes PRS from this GRCh38 VCF."
- "Use PGS000014 on this WGS callset and show absolute risk if available."
- "Do the reliable models agree on my coronary artery disease percentile?"
Example Output
# just-prs Polygenic Risk Report
## Model agreement
- Reliable models: **2**
- Verdict: **descriptive_spread_only**
- Reliable percentile range: **61.00–74.00**
- Descriptive percentile spread: **13.00**
## Score details
| PGS ID | Status | Percentile | Reliable | C_wt | Quality | Absolute risk |
|---|---|---:|---|---:|---|---|
| PGS000014 | scored | 74.00 | True | 94.0% | High | 18.0% |
| PGS000013 | scored | 61.00 | True | 91.0% | Normal | unavailable |
Output Structure
output_directory/
├── report.md
├── result.json
├── tables/
│ └── scores.csv
└── reproducibility/
├── commands.sh
└── checksums.sha256
Dependencies
Required:
uvx; launches the isolated Python 3.13+ upstream server.
fastmcp in the just-prs optional extra; Python 3.11-compatible client.
typer in the just-prs optional extra; typed CLI.
Optional:
- A warm upstream cache; avoids repeat downloads but does not change results.
The upstream cache defaults to the platform-specific just-prs cache. Override
it with PRS_MCP_CACHE_DIR when a controlled shared cache is required.
Validation Evidence
- Upstream
just-prs/tests/test_cross_engine.py checks numerical parity across
PLINK2, Polars, and DuckDB scoring engines.
- Upstream
test_scoring.py, test_vcf.py, and test_percentile.py cover scoring
files, VCF/build handling, and percentile/z-score consistency.
- This bridge tests its integration boundary: pinned real stdio MCP calls,
FastMCP result decoding, local-path-only requests, report mapping, routing,
packaging, unreliable-risk suppression, and offline demo reproducibility.
- ClawBio does not reimplement or claim independent validation of the upstream
numerical engine; it reuses that evidence and tests its own adapter behavior.
Gotchas
- You will want to treat match rate as model coverage. Do not. Here is why.
Match rate counts variants equally; retain C_wt because effect-weight mass is
the upstream scale-free honesty signal.
- You will want to report the highest percentile as the answer. Do not. Here
is why. Multiple models can disagree because of coverage, ancestry, and
model design; report the reliable-model spread and filtering provenance.
- You will want to interpret a missing absolute-risk result as average risk.
Do not. Here is why. Missing prevalence or effect-size evidence means the
estimate is unavailable, not normal.
- You will want to omit ancestry because EUR is the default. Do not. Here is
why. Silent EUR-referenced percentiles are an equity failure mode; warn when
the default is applied and name the reference-panel ancestry in the report.
- You will want to treat an empty curated row list as a failed run. Do not.
Here is why. The engine may have scored models and then explicitly removed
every one for weak evidence or coverage; inspect
n_filtered and
filter_summary so the exclusion is visible.
- Do not silently accept trait-search ambiguity; require a stable ontology ID.
- Do not interpret a build-mismatched score until the coordinate build is
resolved. This is enforced, not merely advised: on
build_mismatch, absolute
risk is withheld and the report opens with a warning.
- Do not use a VCF fixture with sample genotypes unless it declares the
GT
FORMAT header; real readers correctly omit an undeclared genotype field.
Safety
- Local-first: The VCF remains on the machine. The bridge passes only its
resolved path to a local stdio child process and has no upload path of its
own. Note the trust boundary:
uvx fetches and runs the pinned third-party
just-prs-mcp package, and that process is what actually reads the genome.
ClawBio performs no upload; egress is delegated to a version-pinned
dependency, not eliminated.
- Credential isolation: The child receives an allow-listed runtime, network,
and cache environment; unrelated API keys and service credentials are not forwarded.
- Network egress: Live runs fetch only public PGS Catalog metadata, scoring
files, and reference distributions. This is a documented dependency, not a
claim of zero network access. The offline demo makes no network calls.
- Consent boundary: Never switch this bridge to hosted HTTP/SSE for personal
genomic data. A remote server cannot access the local path and must not receive the VCF.
- Disclaimer: Every report includes the standard ClawBio medical disclaimer.
- Audit trail: Reports record versions, input checksum, replay command, and
output checksums without copying genotype content into outputs.
- No hallucinated science: Scientific calculations and curation criteria
remain upstream; ClawBio maps and explains the returned evidence.
Agent Boundary
The agent dispatches, asks for ancestry/trait clarification, and explains. The
skill executes scoring and evidence retrieval. The agent must not override
upstream reliability, invent an absolute risk, or suppress model failures.
Integration with Bio Orchestrator
Trigger conditions:
- A VCF/WGS input plus explicit PRS, polygenic-risk, or absolute-risk intent.
- An explicit request to use just-prs on a local genome.
Chaining partners:
wgs-prs: Produces a called VCF from raw sequencing before this skill.
gwas-prs: Handles 23andMe/AncestryDNA text inputs instead of VCF/WGS.
profile-report: May consume result.json in a later compatibility PR.
Maintenance
- Review cadence: Review monthly and on every
just-prs-mcp release.
- Staleness signals: MCP schema drift, changed curation fields, a new
just-prs coverage contract, or a PGS Catalog API change.
- Deprecation: Archive if upstream no longer supports local stdio or ClawBio
adopts a generic MCP bridge with the same tested report contract.
Citations
- PGS Catalog; public score metadata and scoring files.
- just-prs; scoring, normalization,
percentile, quality, and PLINK2 parity validation.
- just-prs-mcp; typed MCP contracts,
curated trait workflow, and local stdio privacy boundary.
- just-dna-lite FAQ;
local computation, user ownership, open access, and citizen-science context.
ClawBio is a research and educational tool. It is not a medical device and
does not provide clinical diagnoses. Consult a healthcare professional before
making any medical decisions.
1---2name: just-prs-mcp3description: >-4 Compute evidence-aware polygenic risk scores from a local VCF or WGS file5 through the validated just-prs engine and a pinned local just-prs MCP server.6license: MIT7metadata:8 version: "0.1.1"9 author: Anton Kulaga10 domain: genomics11 tags:12 - polygenic-risk-score13 - personal-genomics14 - model-quality15 inputs:16 - name: input_vcf17 type: file18 format:19 - vcf20 - vcf.gz21 - vcf.bgz22 description: Local single-sample VCF containing genotypes23 required: true24 outputs:25 - name: report26 type: file27 format:28 - md29 description: Evidence-aware PRS interpretation report30 - name: result31 type: file32 format:33 - json34 description: Machine-readable model results and uncertainty signals35 - name: scores36 type: file37 format:38 - csv39 description: Per-model scores and interpretation fields40 dependencies:41 python: ">=3.11"42 packages:43 - fastmcp>=3.4.4,<444 - typer>=0.27.0,<145 demo_data:46 - path: examples/demo_patient.vcf47 description: Synthetic three-variant GRCh38 VCF used with a cached response48 endpoints:49 cli: uv run --extra just-prs python skills/just-prs-mcp/just_prs_mcp_bridge.py --input {input_file} --trait {trait} --output {output_dir}50 openclaw:51 requires:52 bins:53 - uvx54 always: false55 emoji: "🧬"56 homepage: https://github.com/dna-seq/just-prs-mcp57 os:58 - darwin59 - linux60 install:61 - kind: uv62 command: uv sync --extra just-prs63 trigger_keywords:64 - compute PRS from VCF65 - WGS polygenic risk score66 - evidence-aware PRS from VCF67 - just-prs68---6970# just-prs MCP bridge7172You are **just-prs MCP bridge**, a specialised ClawBio agent for evidence-aware73polygenic scoring of local VCF and WGS genotypes.7475## Trigger7677**Fire this skill when the user says any of:**78- "compute PRS from my VCF"79- "score this WGS genome for type 2 diabetes"80- "run an evidence-aware PRS report from this VCF"81- "use just-prs on my genome"82- "compare the PRS models for this trait"8384**Do NOT fire when:**85- The input is a 23andMe or AncestryDNA text export; use `gwas-prs`.86- The input is raw FASTQ/BAM requiring variant calling; use `wgs-prs` first.87- The user asks for one variant's disease association; use `gwas-lookup`.88- A bare VCF is supplied without PRS or absolute-risk intent.8990## Why This Exists9192- **Without it**: VCF users must manually identify PGS models, normalize data,93 run scores, inspect coverage, obtain ancestry-matched percentiles, and compare models.94- **With it**: A pinned local MCP workflow returns a curated trait-level shortlist,95 model coverage, quality, percentiles, model spread, and available absolute risk.96- **Why ClawBio**: ClawBio adds explicit routing, a stable report contract, local97 privacy boundaries, and reproducibility around the validated upstream engine.9899## Core Capabilities1001011. **VCF/WGS scoring**: Score one PGS ID or a curated set associated with an EFO/MONDO trait.1022. **Honest interpretation**: Preserve C_wt, match rate, percentile reliability,103 ancestry, build mismatch, quality, failed models, and filtering provenance.1043. **Risk translation**: Request absolute risk only when the percentile is reliable,105 returns a z-score, and upstream prevalence/effect-size data are available.1064. **Model comparison**: Report the descriptive spread across reliable models;107 never hide disagreement or convert it into an invented clinical threshold.108109## Scope110111**One skill, one task.** This skill computes and reports PRS evidence from a112local, already-called VCF. It does not call variants, infer ancestry, diagnose113disease, or replace the DTC-oriented `gwas-prs` skill.114115## Input Formats116117| Format | Extension | Required fields | Example |118|---|---|---|---|119| VCF 4.x | `.vcf` | `#CHROM`, `POS`, `REF`, `ALT`, sample `GT` | `examples/demo_patient.vcf` |120| Compressed VCF | `.vcf.gz`, `.vcf.bgz` | Same fields, bgzip-compatible | user-provided |121122## Workflow1231241. **Validate (prescriptive)**: Require one local VCF and exactly one selector:125 trait term, EFO/MONDO trait ID, or PGS ID.1262. **Resolve (prescriptive)**: Search public PGS Catalog trait metadata only when127 given a term. Stop on ambiguity and require `--trait-id`.1283. **Compute (prescriptive)**: Launch `just-prs-mcp==0.3.1` with local stdio in129 essentials mode. Pass the resolved local path, never VCF bytes. If130 `--superpopulation` is omitted, default to EUR and emit a visible warning;131 always surface requested and reference-panel ancestry in the report.1324. **Curate (prescriptive)**: For trait mode request `interpret=true` and133 `profile=curated` by default. Preserve the upstream filter summary and failures.1345. **Interpret (prescriptive)**: Re-request each shortlisted percentile to obtain135 its reliability verdict and true z-score. Request absolute risk only for reliable136 percentiles; record unreliable or otherwise unavailable risk explicitly.1376. **Compare (flexible)**: Describe reliable-model percentile count, range, mean,138 and spread without inventing agreement thresholds.1397. **Generate (prescriptive)**: Write the report, structured result, scores table,140 replay command, checksums, and required disclaimer.141142## CLI Reference143144```bash145uv sync --extra just-prs146147uv run --extra just-prs python skills/just-prs-mcp/just_prs_mcp_bridge.py \148 --input sample.vcf.gz \149 --trait "type 2 diabetes" \150 --superpopulation EUR \151 --output output/just-prs-t2d152153uv run --extra just-prs python skills/just-prs-mcp/just_prs_mcp_bridge.py \154 --input sample.vcf.gz --pgs-id PGS000014 --output output/just-prs-single155156uv run --extra just-prs python skills/just-prs-mcp/just_prs_mcp_bridge.py \157 --demo --output /tmp/just_prs_demo158159uv run --extra just-prs clawbio.py run just-prs --demo160```161162## Demo163164Run:165166```bash167uv run --extra just-prs clawbio.py run just-prs --demo168```169170The demo is deterministic and offline. It combines a synthetic three-variant171VCF with a provenance-labelled, upstream-shaped cached MCP response. It172demonstrates report mapping; it is not numerical validation evidence.173174## Algorithm / Methodology1751761. Resolve a specific ontology trait or PGS Catalog score.1772. Compute `sum(effect_weight × dosage)` in upstream `just-prs`.1783. Retain matched/total variant coverage and weight-mass coverage, C_wt.1794. Place scores against the selected 1000 Genomes superpopulation through the180 upstream percentile method and retain its reliability verdict.1815. Curate trait panels using the upstream criteria-based profile and disclose182 every filtered, omitted, and failed model count.1836. Request absolute risk only when the upstream percentile is reliable, using its184 z-score and upstream prevalence/effect-size evidence.1857. Compare multiple reliable models descriptively rather than selecting one186 convenient result.187188**Key parameters**:189- Superpopulations: AFR, AMR, EAS, EUR, SAS (1000 Genomes).190- Default profile: `curated` (criteria owned by `just-prs-mcp`, not ClawBio).191- Default returned models: 5, ranked by the upstream coverage-aware ordering.192193## Example Queries194195- "Compute my type 2 diabetes PRS from this GRCh38 VCF."196- "Use PGS000014 on this WGS callset and show absolute risk if available."197- "Do the reliable models agree on my coronary artery disease percentile?"198199## Example Output200201```markdown202# just-prs Polygenic Risk Report203204## Model agreement205- Reliable models: **2**206- Verdict: **descriptive_spread_only**207- Reliable percentile range: **61.00–74.00**208- Descriptive percentile spread: **13.00**209210## Score details211| PGS ID | Status | Percentile | Reliable | C_wt | Quality | Absolute risk |212|---|---|---:|---|---:|---|---|213| PGS000014 | scored | 74.00 | True | 94.0% | High | 18.0% |214| PGS000013 | scored | 61.00 | True | 91.0% | Normal | unavailable |215```216217## Output Structure218219```text220output_directory/221├── report.md222├── result.json223├── tables/224│ └── scores.csv225└── reproducibility/226 ├── commands.sh227 └── checksums.sha256228```229230## Dependencies231232**Required**:233- `uvx`; launches the isolated Python 3.13+ upstream server.234- `fastmcp` in the `just-prs` optional extra; Python 3.11-compatible client.235- `typer` in the `just-prs` optional extra; typed CLI.236237**Optional**:238- A warm upstream cache; avoids repeat downloads but does not change results.239240The upstream cache defaults to the platform-specific `just-prs` cache. Override241it with `PRS_MCP_CACHE_DIR` when a controlled shared cache is required.242243## Validation Evidence244245- Upstream `just-prs/tests/test_cross_engine.py` checks numerical parity across246 PLINK2, Polars, and DuckDB scoring engines.247- Upstream `test_scoring.py`, `test_vcf.py`, and `test_percentile.py` cover scoring248 files, VCF/build handling, and percentile/z-score consistency.249- This bridge tests its integration boundary: pinned real stdio MCP calls,250 FastMCP result decoding, local-path-only requests, report mapping, routing,251 packaging, unreliable-risk suppression, and offline demo reproducibility.252- ClawBio does not reimplement or claim independent validation of the upstream253 numerical engine; it reuses that evidence and tests its own adapter behavior.254255## Gotchas256257- **You will want to treat match rate as model coverage. Do not. Here is why.**258 Match rate counts variants equally; retain C_wt because effect-weight mass is259 the upstream scale-free honesty signal.260- **You will want to report the highest percentile as the answer. Do not. Here261 is why.** Multiple models can disagree because of coverage, ancestry, and262 model design; report the reliable-model spread and filtering provenance.263- **You will want to interpret a missing absolute-risk result as average risk.264 Do not. Here is why.** Missing prevalence or effect-size evidence means the265 estimate is unavailable, not normal.266- **You will want to omit ancestry because EUR is the default. Do not. Here is267 why.** Silent EUR-referenced percentiles are an equity failure mode; warn when268 the default is applied and name the reference-panel ancestry in the report.269- **You will want to treat an empty curated row list as a failed run. Do not.270 Here is why.** The engine may have scored models and then explicitly removed271 every one for weak evidence or coverage; inspect `n_filtered` and272 `filter_summary` so the exclusion is visible.273- Do not silently accept trait-search ambiguity; require a stable ontology ID.274- Do not interpret a build-mismatched score until the coordinate build is275 resolved. This is enforced, not merely advised: on `build_mismatch`, absolute276 risk is withheld and the report opens with a warning.277- Do not use a VCF fixture with sample genotypes unless it declares the `GT`278 FORMAT header; real readers correctly omit an undeclared genotype field.279280## Safety281282- **Local-first**: The VCF remains on the machine. The bridge passes only its283 resolved path to a local stdio child process and has no upload path of its284 own. Note the trust boundary: `uvx` fetches and runs the pinned third-party285 `just-prs-mcp` package, and that process is what actually reads the genome.286 ClawBio performs no upload; egress is delegated to a version-pinned287 dependency, not eliminated.288- **Credential isolation**: The child receives an allow-listed runtime, network,289 and cache environment; unrelated API keys and service credentials are not forwarded.290- **Network egress**: Live runs fetch only public PGS Catalog metadata, scoring291 files, and reference distributions. This is a documented dependency, not a292 claim of zero network access. The offline demo makes no network calls.293- **Consent boundary**: Never switch this bridge to hosted HTTP/SSE for personal294 genomic data. A remote server cannot access the local path and must not receive the VCF.295- **Disclaimer**: Every report includes the standard ClawBio medical disclaimer.296- **Audit trail**: Reports record versions, input checksum, replay command, and297 output checksums without copying genotype content into outputs.298- **No hallucinated science**: Scientific calculations and curation criteria299 remain upstream; ClawBio maps and explains the returned evidence.300301## Agent Boundary302303The agent dispatches, asks for ancestry/trait clarification, and explains. The304skill executes scoring and evidence retrieval. The agent must not override305upstream reliability, invent an absolute risk, or suppress model failures.306307## Integration with Bio Orchestrator308309**Trigger conditions**:310- A VCF/WGS input plus explicit PRS, polygenic-risk, or absolute-risk intent.311- An explicit request to use just-prs on a local genome.312313**Chaining partners**:314- `wgs-prs`: Produces a called VCF from raw sequencing before this skill.315- `gwas-prs`: Handles 23andMe/AncestryDNA text inputs instead of VCF/WGS.316- `profile-report`: May consume `result.json` in a later compatibility PR.317318## Maintenance319320- **Review cadence**: Review monthly and on every `just-prs-mcp` release.321- **Staleness signals**: MCP schema drift, changed curation fields, a new322 `just-prs` coverage contract, or a PGS Catalog API change.323- **Deprecation**: Archive if upstream no longer supports local stdio or ClawBio324 adopts a generic MCP bridge with the same tested report contract.325326## Citations327328- [PGS Catalog](https://www.pgscatalog.org/); public score metadata and scoring files.329- [just-prs](https://github.com/dna-seq/just-prs); scoring, normalization,330 percentile, quality, and PLINK2 parity validation.331- [just-prs-mcp](https://github.com/dna-seq/just-prs-mcp); typed MCP contracts,332 curated trait workflow, and local stdio privacy boundary.333- [just-dna-lite FAQ](https://github.com/dna-seq/just-dna-lite/blob/main/docs/FAQ.md);334 local computation, user ownership, open access, and citizen-science context.335336*ClawBio is a research and educational tool. It is not a medical device and337does not provide clinical diagnoses. Consult a healthcare professional before338making any medical decisions.*