### Skill Command: Rendering Guides and Discover Examples Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/discover.md Demonstrates rendering detailed guides using the 'skill render' command, including routing rules, how-to references, and examples of using 'discover' for single-entity lookups versus relational or list questions. ```bash ../../tools/biomcp-ci skill render | mustmatch like '## Routing rules ## How-to reference single-entity free-text lookup only biomcp discover BRCA1 biomcp discover dabigatran ### Don't use `discover` for relational or list questions "drug classes that interact with warfarin" biomcp search article -k "drug classes that interact with warfarin" --type review --limit 5 "genes regulated by MEF2 in the heart" biomcp get gene ' ``` -------------------------------- ### Install BioMCP Skill Guidance Source: https://github.com/genomoncology/biomcp/blob/main/src/cli/list_reference.md Use this command to install the BioMCP skill guidance to your agent. This is a starting point for new users. ```bash skill install ``` -------------------------------- ### Display Trial Help with Examples Source: https://github.com/genomoncology/biomcp/blob/main/spec/entity/trial.md Shows the help message for the 'get trial' command, including usage examples. This is helpful for discovering available options and command structures. ```bash ../../tools/biomcp-ci get trial --help \ | awk '/^EXAMPLES:/{capture=1; next} /^See also:/{capture=0} capture' | mustmatch like 'biomcp get trial NCT02576665 --source ctgov eligibility' ``` -------------------------------- ### Display Trial Help with Pagination Examples Source: https://github.com/genomoncology/biomcp/blob/main/spec/entity/trial.md Displays the help message for the 'get trial' command, specifically highlighting examples related to location pagination. This helps users understand how to use offset and limit flags for retrieving paginated location data. ```bash ../../tools/biomcp-ci get trial --help \ | awk '/^EXAMPLES:/{capture=1; next} /^See also:/{capture=0} capture' | mustmatch '/biomcp get trial NCT02576665 --offset [0-9]+ --limit [0-9]+ locations/' ``` -------------------------------- ### Get BioMCP Suggestions Source: https://github.com/genomoncology/biomcp/blob/main/README.md Use 'biomcp suggest' with a biomedical question to get a shipped worked example and starter commands. ```bash biomcp suggest "" ``` -------------------------------- ### Build Feasibility Matrix and Get Recommendations Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/369-score-variant-agent-source-apis/harden.md This example shows how to fetch external API reports, build a feasibility matrix from the report, and then iterate through the recommended follow-up tickets, printing their order and title. ```python from source_api_scoring import build_feasibility_matrix, run_external_api_suite external_report = run_external_api_suite() matrix = build_feasibility_matrix(external_report) for item in matrix["recommended_follow_up_tickets"]: print(item["order"], item["title"]) ``` -------------------------------- ### Install BioMCP from Source Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/installation.md If you have a local checkout of the BioMCP repository, use the `make install` command to build and install the CLI. ```bash make install ``` -------------------------------- ### Install Biomcp from Source Source: https://github.com/genomoncology/biomcp/blob/main/README.md Build and install Biomcp from its source code using the make install command. Verifies the installation with a version check. ```bash make install "$HOME/.local/bin/biomcp" --version ``` -------------------------------- ### Basic BioMCP Usage Examples Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/biomcp-pubmed-articles.md Demonstrates fundamental BioMCP commands for searching articles by gene, retrieving a specific article, getting article citations, and extracting entities. ```bash biomcp skill install ``` ```bash biomcp search article --gene --limit 10 ``` ```bash biomcp get article ``` ```bash biomcp article citations --limit 5 ``` ```bash biomcp article entities ``` -------------------------------- ### Example BioMCP Command Outputs Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/we-deleted-35-tools.md Illustrates the contextual suggestions provided after a BioMCP command execution, guiding the user on potential next steps and available filters. ```text Use `get variant ` for details. Use `variant trials "BRAF V600E"` for recruiting trials. Filters: -g , --significance , --max-frequency <0-1> ``` -------------------------------- ### Biomcp Version and Skill Examples Source: https://github.com/genomoncology/biomcp/blob/main/docs/user-guide/cli-reference.md Commands to display the Biomcp version and access specific worked examples directly. Use `version` for release information and `skill ` for direct access to examples. ```text biomcp version [--verbose] ``` ```text biomcp skill 01 ``` ```text biomcp skill article-follow-up ``` -------------------------------- ### Install Biomcp via Binary Source: https://github.com/genomoncology/biomcp/blob/main/README.md Use this command to download and execute the installation script for the Biomcp binary. ```bash curl -fsSL https://biomcp.org/install.sh | bash ``` -------------------------------- ### Usage Examples Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/24-diagnostic-entity-landscape/harden.md Illustrative examples demonstrating how to use the `diagnostic_landscape` package functions. ```APIDOC ## Usage examples: ```python from diagnostic_landscape import build_full_scale_landscape landscape = build_full_scale_landscape() print(landscape.gtr.gene_to_records["BRCA1"]) print(landscape.gene_source_matrix["coverage_summary"]) ``` ```python from diagnostic_landscape import load_gtr_backbone bundle = load_gtr_backbone(gene_universe={"BRCA1", "EGFR", "BRAF"}) print(bundle.metrics["schema_completeness"]["gene_links_pct"]) print(sorted(bundle.gene_to_records["BRCA1"])[:5]) ``` ```python from diagnostic_landscape import build_regression_control_payload report = build_regression_control_payload() assert report["comparisons"]["gtr_bulk"]["mismatch_count"] == 0 ``` ``` -------------------------------- ### BioMCP Command Grammar Examples Source: https://github.com/genomoncology/biomcp/blob/main/architecture/ux/cli-reference.md Illustrates various BioMCP command structures for different operations like searching, getting details, pivoting, and suggesting actions. ```bash biomcp search [filters] → discovery queries ``` ```bash biomcp get [sections] → focused detail ``` ```bash biomcp → cross-entity pivot ``` ```bash biomcp suggest → offline question-to-playbook routing ``` ```bash biomcp discover → single-entity free-text resolution into typed follow-up commands ``` ```bash biomcp enrich → gene-set enrichment ``` ```bash biomcp batch → parallel gets ``` ```bash biomcp search all [slot filters] → unified fan-out ``` -------------------------------- ### Install and Run Basic Biomcp Commands Source: https://github.com/genomoncology/biomcp/blob/main/docs/index.md Install the biomcp-cli tool and execute initial health checks and basic discovery commands. ```bash uv tool install biomcp-cli biomcp health --apis-only biomcp suggest "What drugs treat melanoma?" biomcp discover "chest pain" biomcp list gene biomcp search all --gene BRAF --disease melanoma # unified cross-entity discovery biomcp get gene BRAF pathways hpa ``` -------------------------------- ### Stdio contract usage example Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/rmcp-client-mcp-contract/harden.md Example demonstrating how to use the stdio client to interact with the MCP service. It spawns a stdio client and asserts the initialization and tools contract. ```rust use biomcp_mcp_contract_client::{ContractHarness, assert_initialize_and_tools}; #[tokio::test(flavor = "multi_thread")] async fn stdio_contract() -> anyhow::Result<()> { let harness = ContractHarness::from_repo_root(env!("CARGO_MANIFEST_DIR")); let client = harness.spawn_stdio_client(&[]).await?; assert_initialize_and_tools(&client, &harness.repo_root).await?; client.cancel().await?; Ok(()) } ``` -------------------------------- ### BioMCP CLI Command Examples Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/we-deleted-35-tools.md Examples of how to query BioMCP for gene information, demonstrating different levels of detail and output formats. ```bash biomcp get gene BRAF → summary card (~200 tokens) ``` ```bash biomcp get gene BRAF pathways → + Reactome pathways ``` ```bash biomcp get gene BRAF civic → + CIViC evidence ``` ```bash biomcp get gene BRAF all → standard deep bundle (~2,000 tokens) ``` -------------------------------- ### Verify BioMCP Installation from Source Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/installation.md After building from source, verify the installation by checking the `biomcp` version using its expected installation path. ```bash "$HOME/.local/bin/biomcp" --version ``` -------------------------------- ### Get 'list discover' Command Help Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/cli.md Retrieves and checks the help text for the 'list discover' command, ensuring it guides users on query usage and handling of unresolved entities. ```bash discover=\"$(../../tools/biomcp-ci list discover)\"\nmustmatch like '\`discover \`' <<<\"$discover\"\nmustmatch like \"If no biomedical entities resolve\" <<<\"$discover\" ``` -------------------------------- ### BioMCP Installation Methods Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/we-deleted-35-tools.md Provides multiple command-line options for installing the BioMCP CLI tool, suitable for different package management preferences. ```bash curl -fsSL https://biomcp.org/install.sh | bash ``` ```bash uv tool install biomcp-cli ``` ```bash pip install biomcp-cli ``` -------------------------------- ### Biomcp JSON Output Examples Source: https://github.com/genomoncology/biomcp/blob/main/docs/user-guide/cli-reference.md Examples demonstrating JSON output for listing entities and commands, and for version information. Use the `--json` flag for structured data. ```text biomcp --json list ``` ```text biomcp --json list ``` ```text biomcp version --json ``` -------------------------------- ### Drug Safety Workflow: Example Source: https://github.com/genomoncology/biomcp/blob/main/docs/how-to/guide-workflows.md Example commands for retrieving drug safety information, including label details, adverse events, and aggregate vaccine safety summaries. ```bash biomcp get drug pembrolizumab label interactions approvals biomcp drug adverse-events pembrolizumab biomcp search adverse-event "COVID-19 vaccine" --source all --limit 10 ``` -------------------------------- ### Start the HTTP Server Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/remote-http.md Command to start the BioMCP streamable HTTP server. Use `--host 0.0.0.0` to allow connections from other machines. ```APIDOC ## Start the server ```bash biomcp serve-http --host 127.0.0.1 --port 8080 ``` Use `--host 0.0.0.0` only when the server must accept connections from other machines or containers. ``` -------------------------------- ### Install Rust Helper Tools Source: https://github.com/genomoncology/biomcp/blob/main/RUN.md Installs necessary Rust helper tools like cargo-nextest and cargo-deny. Ensure you have a Rust toolchain with cargo installed. ```bash cargo install cargo-nextest --locked cargo install cargo-deny --locked ``` -------------------------------- ### JSON Mode for Get Recommendations Source: https://github.com/genomoncology/biomcp/blob/main/docs/user-guide/pgx.md Execute PGX get recommendations command in JSON mode for structured output. ```bash biomcp --json get pgx CYP2D6 recommendations ``` -------------------------------- ### BioMCP CLI Installation Methods Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/we-deleted-35-tools.md Provides various methods for installing the BioMCP CLI, including using a curl script, uv, or pip. ```bash curl -fsSL https://biomcp.org/install.sh | bash ``` ```bash # or: uv tool install biomcp-cli ``` ```bash # or: pip install biomcp-cli ``` -------------------------------- ### Install Biomcp via PyPI Source: https://github.com/genomoncology/biomcp/blob/main/README.md Install the biomcp-cli package using uv or pip. This adds the biomcp binary to your system's PATH. ```bash uv tool install biomcp-cli # or: pip install biomcp-cli ``` -------------------------------- ### Suggest BioMCP Skill Example Source: https://github.com/genomoncology/biomcp/blob/main/README.md Use 'biomcp suggest' to find worked examples for a given question. This command helps in identifying the right workflow or skill to use. ```bash biomcp suggest "Is variant rs113488022 pathogenic in melanoma?" ``` -------------------------------- ### Broad Gene-Disease Workflow: Example Source: https://github.com/genomoncology/biomcp/blob/main/docs/how-to/guide-workflows.md Example commands for investigating a gene's role in a specific disease, covering general information, drugs, trials, and articles. ```bash biomcp search all --gene EGFR --disease "non-small cell lung cancer" --counts-only biomcp get gene EGFR pathways diseases protein druggability civic biomcp search drug --target EGFR --indication "non-small cell lung cancer" --limit 10 biomcp search trial -c "non-small cell lung cancer" --mutation "EGFR" --status recruiting --limit 10 biomcp search article -g EGFR -d "non-small cell lung cancer" --sort citations --limit 10 ``` -------------------------------- ### Install BioMCP CLI Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/cbioportal-study-analytics.md Instructions for installing the BioMCP command-line interface using different package managers. ```bash curl -fsSL https://biomcp.org/install.sh | bash ``` ```bash # or: uv tool install biomcp-cli ``` ```bash # or: pip install biomcp-cli ``` -------------------------------- ### Biomcp Installation and Basic Usage Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/biomcp-charts.md Install biomcp using curl, uv, or pip. Download a study and generate charts directly from the terminal. ```bash curl -fsSL https://biomcp.org/install.sh | bash ``` ```bash uv tool install biomcp-cli ``` ```bash pip install biomcp-cli ``` ```bash biomcp study download msk_impact_2017 ``` ```bash biomcp study survival --study msk_impact_2017 --gene TP53 \ --chart survival --terminal ``` ```bash biomcp study co-occurrence --study msk_impact_2017 \ --genes TP53,KRAS,PIK3CA,BRAF --chart heatmap --terminal ``` -------------------------------- ### Install BioMCP Skill Assets Source: https://github.com/genomoncology/biomcp/blob/main/README.md Install guided investigation workflows into your agent directory using the biomcp skill install command. ```bash biomcp skill install ~/.claude --force ``` -------------------------------- ### Display Help for MCP and Serve Stdio Entry Points Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/mcp.md Use these commands to view the help messages for the `mcp` and `serve` stdio entry points. This helps understand their usage and expected output. ```bash ../../tools/biomcp-ci mcp --help | mustmatch like 'Run MCP server over stdio Usage: biomcp mcp' ``` ```bash ../../tools/biomcp-ci serve --help | mustmatch like 'Alias for `mcp` Usage: biomcp serve' ``` -------------------------------- ### Get Diagnostic Information Example Source: https://github.com/genomoncology/biomcp/blob/main/README.md Retrieve regulatory information for a specific diagnostic identifier using the 'get' command with the 'diagnostic' entity. ```bash biomcp get diagnostic GTR000006692.3 regulatory ``` -------------------------------- ### Get Disease Genes Example Source: https://github.com/genomoncology/biomcp/blob/main/README.md Retrieve the genes associated with a specific disease, like 'Lynch syndrome', using the 'get' command with the 'disease' entity. ```bash biomcp get disease "Lynch syndrome" genes ``` -------------------------------- ### User Guide Search for Action Summary Options Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/trial-action-summary.md Searches the user guide for relevant terms including 'action-summary', 'listed CTGov sites', 'trial_type', 'access_caveats', and 'ranked_sites' to provide documentation on the opt-in surface and its limitations. ```bash grep -h "action-summary\|listed CTGov sites\|trial_type\|access_caveats\|ranked_sites" ../../docs/user-guide/trial.md | mustmatch like '--action-summary listed CTGov sites trial_type access_caveats ranked_sites' ``` -------------------------------- ### Minimal Python Client Example Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/remote-http.md A basic Python script demonstrating how to connect to the streamable HTTP MCP server and perform an initialization. ```APIDOC ## Minimal Python client ```python import asyncio from datetime import timedelta from mcp import ClientSession from mcp.client.streamable_http import streamable_http_client async def main() -> None: async with streamable_http_client( "http://127.0.0.1:8080/mcp", terminate_on_close=False, ) as (r, w, _): async with ClientSession( r, w, read_timeout_seconds=timedelta(seconds=30), ) as session: result = await session.initialize() print(result.serverInfo) asyncio.run(main()) ``` ``` -------------------------------- ### Semantic Assertion Example Source: https://github.com/genomoncology/biomcp/blob/main/architecture/technical/spec-v2.md Example of a semantic assertion using 'biomcp get gene BRAF' and 'mustmatch like' to check for specific user-visible behavior. ```shell biomcp get gene BRAF | mustmatch like "Entrez ID: 673" ``` -------------------------------- ### Get Protein Complexes Example Source: https://github.com/genomoncology/biomcp/blob/main/README.md Retrieve information about protein complexes for a given UniProt protein ID, such as 'P15056', using the 'get' command with the 'protein' entity. ```bash biomcp get protein P15056 complexes ``` -------------------------------- ### Suggest Command: Basic Usage and No-Match Handling Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/discover.md Demonstrates the 'suggest' command for question routing. The first example shows a successful match to a skill, while the subsequent examples illustrate how no-match scenarios are handled, returning null for matched_skill and empty command lists. ```bash ../../tools/biomcp-ci suggest "What drugs treat melanoma?" | mustmatch like 'matched_skill: `treatment-lookup` `biomcp skill treatment-lookup`' ``` ```bash ../../tools/biomcp-ci --json suggest "What is x?" | mustmatch like '"matched_skill": null' ``` ```bash ../../tools/biomcp-ci --json suggest "What is x?" | jq -e '.first_commands == [] and .full_skill == null' >/dev/null ``` -------------------------------- ### Get Gene Information Example Source: https://github.com/genomoncology/biomcp/blob/main/README.md Retrieve detailed information about a specific gene, including its pathways, using the 'get' command with the 'gene' entity and 'hpa' section. ```bash biomcp get gene BRAF pathways hpa ``` -------------------------------- ### BioMCP Search Examples Source: https://github.com/genomoncology/biomcp/blob/main/docs/reference/error-codes.md Examples of using the `biomcp search` command for different entities. These can be used to troubleshoot `NotFound` errors by searching before attempting to `get` a specific entity. ```bash biomcp search gene -q BRAF --limit 5 ``` ```bash biomcp search trial -c melanoma --limit 5 ``` ```bash biomcp search disease -q melanoma --limit 5 ``` -------------------------------- ### Install Skill and Verify Assets Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/skills.md Installs a skill package and then verifies that specific authoring assets and playbooks are correctly placed within the local agent root. Uses `find` and `sed` to check file structure. ```bash ../../tools/biomcp-ci skill install ../../.cache/spec-skill-install --force find ../../.cache/spec-skill-install/skills/biomcp -maxdepth 3 -type f | sed 's#^.*/biomcp/##' | sort | mustmatch like "AUTHORING.md SKILL.md use-cases/16-normalize-to-codes.md use-cases/_TEMPLATE.ladder.json use-cases/_TEMPLATE.md use-cases/normalize-to-codes.ladder.json" ``` -------------------------------- ### Manual Stdio Startup Guidance Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/mcp.md This script demonstrates how BioMCP behaves when stdio entry points are launched without an MCP client. It verifies that the system fails closed, provides stderr guidance, and keeps stdout clear for MCP protocol traffic. ```bash biomcp_bin="${BIOMCP_BIN:-../../target/release/biomcp}" for cmd in mcp serve; do stdout_file="$(mktemp)" stderr_file="$(mktemp)" set +e "$biomcp_bin" "$cmd" "$stdout_file" 2>"$stderr_file" status=$? set -e test "$status" -ne 0 test ! -s "$stdout_file" cat "$stderr_file" | mustmatch like 'expects an MCP client on stdin biomcp serve-http' cat "$stderr_file" | mustmatch not like 'connection closed initialized request' done ``` -------------------------------- ### Get Drug Information Source: https://github.com/genomoncology/biomcp/blob/main/docs/user-guide/cli-reference.md Example of retrieving detailed information for a specific drug, including all sections, in JSON format. ```bash biomcp get drug warfarin --json ``` -------------------------------- ### Install and Run BioMCP CLI Commands Source: https://github.com/genomoncology/biomcp/blob/main/README.md Install the BioMCP CLI tool and execute basic commands for health checks and suggesting treatments. Use the search command for cross-entity discovery and get command for specific gene information. ```bash uv tool install biomcp-cli biomcp health --apis-only biomcp suggest "What drugs treat melanoma?" biomcp list gene biomcp search all --gene BRAF --disease melanoma # unified cross-entity discovery biomcp get gene BRAF pathways hpa ``` -------------------------------- ### BioMCP Agent Skill Examples Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/we-deleted-35-tools.md Illustrates predefined multi-step investigation guides (skills) available through BioMCP for agent discovery and execution. ```text 01 variant-to-treatment Variant → ClinVar → CIViC → Trials → Drugs ``` ```text 04 rare-disease Phenotype → Disease → Gene → Variant → Trial ``` ```text 08 drug-safety-review Drug → FAERS → Labels → Recalls → Interactions ``` -------------------------------- ### Get Variant Pathogenicity Evidence Source: https://github.com/genomoncology/biomcp/blob/main/skills/use-cases/05-variant-pathogenicity.md Fetch ClinVar, computational predictions, and population frequency data for a variant. This is a starting point before making any pathogenicity claim. ```bash biomcp get variant "BRAF V600E" clinvar predictions population ``` -------------------------------- ### Get Aspirin Drug Information Source: https://github.com/genomoncology/biomcp/blob/main/docs/user-guide/cli-reference.md Example of retrieving information for the drug aspirin in JSON format. This may omit certain workflow ladders if thresholds are not met. ```bash biomcp get drug aspirin --json ``` -------------------------------- ### Run Public Streamable HTTP Demo Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/mcp.md Executes the public live walkthrough for the Streamable HTTP demo, keeping documented commands for discovery, variant evidence, and melanoma trials. ```bash uv run --no-sync python3 - <<'PY' | mustmatch like 'biomcp search all --gene BRAF --disease melanoma --counts-only biomcp get variant "BRAF V600E" clinvar biomcp search trial -c melanoma --mutation "BRAF V600E" --limit 5' import ast from pathlib import Path module = ast.parse(Path("../../examples/streamable-http/streamable_http_client.py").read_text()) for node in module.body: if isinstance(node, ast.Assign) and any(getattr(target, "id", None) == "WORKFLOW" for target in node.targets): print("\n".join(ast.literal_eval(node.value))) break PY ``` -------------------------------- ### Chart fixture usage example Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/rmcp-client-mcp-contract/harden.md Example demonstrating how to use chart fixtures with the stdio client. It provisions a study fixture, sets the study directory, and asserts chart calls. ```rust use biomcp_mcp_contract_client::{ ContractHarness, assert_chart_calls, provision_study_fixture, study_dir_from_fixture, }; #[tokio::test(flavor = "multi_thread")] async fn chart_contract() -> anyhow::Result<()> { let harness = ContractHarness::from_repo_root(env!("CARGO_MANIFEST_DIR")); let fixture_root = provision_study_fixture(&harness.repo_root)?; let study_dir = study_dir_from_fixture(fixture_root.path())?; let client = harness .spawn_stdio_client(&[("BIOMCP_STUDY_DIR", study_dir)]) .await?; assert_chart_calls(&client).await?; client.cancel().await?; Ok(()) } ``` -------------------------------- ### Get Gene Information with biomcp Source: https://github.com/genomoncology/biomcp/blob/main/skills/use-cases/03-gene-disease-orientation.md Retrieve the gene card for a specific gene to understand its aliases, summaries, and available structured surfaces. This is the starting point for gene-disease orientation. ```bash biomcp get gene IPO8 ``` -------------------------------- ### Validate BioMCP Server Setup Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/claude-desktop.md Run these commands in your terminal to validate that the BioMCP server is installed and accessible. The first command checks the version, and the second verifies API connectivity. ```bash biomcp --version ``` ```bash biomcp health --apis-only ``` -------------------------------- ### Runnable Demo Commands Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/remote-http.md Commands to run the standalone demo, which includes connectivity proof and a BRAF V600E melanoma workflow. The second command allows specifying a custom server URL. ```bash biomcp serve-http --host 127.0.0.1 --port 8080 uv run --script examples/streamable-http/streamable_http_client.py ``` ```bash uv run --script examples/streamable-http/streamable_http_client.py http://127.0.0.1:8080 ``` -------------------------------- ### CLI Compatibility and Checksum Example Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/reset-biomcp-test-strategy-around-request-contracts/harden.md Shows how to invoke the CLI wrapper and verify the integrity of the generated inventory file using sha256sum. This preserves the checksum contract. ```bash ./architecture/experiments/reset-biomcp-test-strategy-around-request-contracts/scripts/analyze_test_strategy.py sha256sum architecture/experiments/reset-biomcp-test-strategy-around-request-contracts/results/test_strategy_inventory.json ``` -------------------------------- ### Streamable HTTP contract usage example Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/rmcp-client-mcp-contract/harden.md Example demonstrating how to use the HTTP client to interact with the MCP service. It spawns an HTTP server and client, then asserts the explore core contract. ```rust use biomcp_mcp_contract_client::{ContractHarness, assert_explore_core_contract}; #[tokio::test(flavor = "multi_thread")] async fn http_contract() -> anyhow::Result<()> { let harness = ContractHarness::from_repo_root(env!("CARGO_MANIFEST_DIR")); let (mut server, base_url) = harness.spawn_http_server(&[]).await?; let result = async { let client = harness.http_client(format!("{base_url}/mcp")).await?; assert_explore_core_contract(&client).await?; client.cancel().await?; Ok::<(), anyhow::Error>(()) } .await; server.kill().await.ok(); result } ``` -------------------------------- ### Display Top-Level CLI Help Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/cli.md Shows the top-level help output for the CLI, verifying the presence of key commands and documentation for cache paths. ```bash out=\"$(../../tools/biomcp-ci --help)\"\nmustmatch like \"leading public biomedical data sources\" <<<\"$out\"\nmustmatch like \"serve-http\" <<<\"$out\"\nmustmatch '/suggest\s+Suggest .*biomedical question/' <<<\"$out\"\nmustmatch like \"cache path, which stays plain text\" <<<\"$out\" ``` -------------------------------- ### Article search results for BRAF V600E Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/variant-structure-in-commands.md This is an example of the output from the 'biomcp variant articles' command, showing a table of relevant scientific publications. Use 'get article ' for more details on a specific paper. ```text # Articles: variant=BRAF V600E Found 10 articles > PubTator variant annotation recall Semantic Scholar: enabled Ranking: calibrated PubMed rescue + lexical directness (top-ranked weak PubMed unique/led rows with at least one anchor hit > title coverage > title+abstract coverage > study/review cue > citation support > source-local position) | PMID | Title | Source(s) | Date | Why | Cit. | |---|---|---|---|---|---| |35647194|Risk and Prognostic Factors for BRAFV600E Mutations in Papil…|PubTator3|2022-05-18|-|61| |34851044|BRAFV600E mutation test on fine-needle aspiration specimens…|PubTator3|2022-01-01|-|28| |36276003|Novel thiazole derivatives incorporating phenyl sulphonyl mo…|PubTator3|2022-09-27|-|16| |38607456|Genetic alterations and allele frequency of BRAF V600E and T…|PubTator3|2024-04-12|-|13| |35053476|Nuclear Localization of BRAFV600E Is Associated with HMOX-1…|PubTator3|2022-01-09|-|11| |35047385|Diagnostic Efficacy of Ultrasound, Cytology, and BRAFV600E M…|PubTator3|2022-01-03|-|8| |33980169|BRAFnon-V600E more frequently co-occurs with IDH1/2 mutation…|PubTator3|2021-05-12|-|7| |38282867|Retrospective study of BRAFV600E mutation and CT features of…|PubTator3|2024-01-24|-|4| |39979881|Extracellular vesicle-mediated gene therapy targets BRAFV600…|PubTator3|2025-02-20|-|4| |40703409|Up-regulation of NGEF via the BRAFV600E /ERK/AP1 pathway enh…|PubTator3|2025-07-17|-|0| Use `get article ` for details. ``` -------------------------------- ### Manage BioMCP Skills Source: https://github.com/genomoncology/biomcp/blob/main/README.md Use 'biomcp skill' to read the embedded BioMCP guide or install local copies of workflow references into your agent directory. The --force flag can be used to overwrite existing files. ```bash biomcp skill ``` ```bash biomcp skill install ~/.claude --force ``` -------------------------------- ### Serve HTTP with Typed Tools Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/mcp.md Starts an HTTP server for MCP with typed tools and verifies its readiness. This is useful for interacting with MCP services using structured schemas. ```bash port=39091 ../../tools/biomcp-ci serve-http --host 127.0.0.1 --port "$port" >/tmp/biomcp-mcp-typed-tools.log 2>&1 & pid=$! trap 'kill "$pid" 2>/dev/null || true' EXIT for _ in $(seq 1 40); do if curl -fsS "http://127.0.0.1:$port/readyz" >/dev/null || curl -fsS "http://127.0.0.1:$port/health" >/dev/null; then break fi sleep 0.25 done curl -fsS "http://127.0.0.1:$port/readyz" >/dev/null || curl -fsS "http://127.0.0.1:$port/health" >/dev/null cargo run --quiet --example rmcp_streamable_http_contract -- typed-tools "$port" | mustmatch like 'MCP typed tools: biomcp, search, get search schema includes entity enum and bounded limit get schema includes entity and sections enum' ``` -------------------------------- ### Parse CLI Sections and Get Report Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/25-gene-all-latency/harden.md This example shows how to parse CLI-compatible section names into a usable format and then retrieve a report with timing information. It's useful for integrating CLI-like section parsing with library calls. ```rust use biomcp_cli::gene::{self, GeneGetOptions}; let raw_sections = vec!["all".to_string()]; let sections = gene::parse_sections("CFTR", &raw_sections)?; let result = gene::get_with_report( "CFTR", &GeneGetOptions::default().with_sections(sections), ).await?; ``` -------------------------------- ### Biomcp CLI: Basic Get Commands Source: https://github.com/genomoncology/biomcp/blob/main/architecture/ux/cli-reference.md Demonstrates basic 'get' commands for genes, including retrieving only a summary card or adding specific sections like pathways or interactions. Also shows how to retrieve all available information. ```bash biomcp get gene BRAF # summary card only biomcp get gene BRAF pathways # + pathway section biomcp get gene BRAF civic interactions # + multiple sections biomcp get gene BRAF all # everything ``` -------------------------------- ### Biomcp CLI: Get Variant and Article Commands Source: https://github.com/genomoncology/biomcp/blob/main/architecture/ux/cli-reference.md Examples of retrieving variant information by name or identifier, and article details including a 'tldr' summary or JSON assets. Also shows how to stream raw article asset bytes. ```bash biomcp get variant "BRAF V600E" clinvar population conservation biomcp get variant NM_004333.6:c.1799T>A biomcp get article 22663011 tldr biomcp --json get article assets biomcp get article asset ``` -------------------------------- ### Verify User Guide for Condition Expansion Controls Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/request-plan-ratchets.md This snippet verifies that the user guide documentation for trials includes information on no-condition-expand, matched_condition_label, and Matched Condition. It ensures that user-facing documentation accurately reflects the search behavior. ```bash grep -h "no-condition-expand\|matched_condition_label\|Matched Condition" ../../docs/user-guide/trial.md | mustmatch like "--no-condition-expand matched_condition_label Matched Condition" ``` -------------------------------- ### Run Remote BioMCP HTTP Demo Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/mcp.md This script starts a local BioMCP HTTP server and then runs a remote workflow contract test against it. It includes setup for port binding, background process management, health checks, and captures the output of the workflow execution. ```bash port=39088 ../../tools/biomcp-ci serve-http --host 127.0.0.1 --port "$port" >/tmp/biomcp-mcp-demo.log 2>&1 & pid=$! trap 'kill "$pid" 2>/dev/null || true' EXIT for _ in $(seq 1 40); do if curl -fsS "http://127.0.0.1:$port/readyz" >/dev/null || curl -fsS "http://127.0.0.1:$port/health" >/dev/null; then break fi sleep 0.25 done curl -fsS "http://127.0.0.1:$port/readyz" >/dev/null || curl -fsS "http://127.0.0.1:$port/health" >/dev/null cargo run --quiet --example rmcp_streamable_http_contract -- remote-workflow "$port" | mustmatch like 'Command: biomcp study query --study msk_impact_2017 --gene TP53 --type mutations # Study Mutation Frequency: TP53 (msk_impact_2017)' ``` -------------------------------- ### Run Biomcp Demos Source: https://github.com/genomoncology/biomcp/blob/main/RUN.md Execute demonstration scripts for genegpt and geneagent using the Biomcp binary. These are useful for quick functional checks. ```bash BIOMCP_BIN=./target/release/biomcp ./scripts/genegpt-demo.sh BIOMCP_BIN=./target/release/biomcp ./scripts/geneagent-demo.sh ``` -------------------------------- ### Verify BioMCP Installation Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/installation.md After installation, run this command to confirm that the `biomcp` executable is accessible and to check its installed version. ```bash biomcp --version ``` -------------------------------- ### Install BioMCP CLI Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/skillbench-biomcp-skills.md Installs the BioMCP command-line interface. This command automatically detects your agent environment and installs the necessary skills. ```bash curl -fsSL https://biomcp.org/install.sh | bash ``` ```bash uv tool install biomcp-cli ``` ```bash pip install biomcp-cli ``` ```bash biomcp skill install ``` -------------------------------- ### Install BioMCP CLI Source: https://github.com/genomoncology/biomcp/blob/main/docs/blog/daraxonrasib-six-commands.md Installs the BioMCP command-line interface. Use either the curl script, uv tool, or pip for installation. ```bash # Install BioMCP if you haven't already: curl -fsSL https://biomcp.org/install.sh | bash ``` ```bash # or: uv tool install biomcp-cli ``` ```bash # or: pip install biomcp-cli ``` -------------------------------- ### List Trial Command Help for Action Summary Source: https://github.com/genomoncology/biomcp/blob/main/spec/surface/trial-action-summary.md Displays the help information for the list trial command, indicating support for the --action-summary flag and related concepts such as listed CTGov sites, trial_type, access_caveats, and ranked_sites. ```bash ../../tools/biomcp-ci list trial | mustmatch like '--action-summary listed CTGov sites trial_type access_caveats ranked_sites' ``` -------------------------------- ### Python Library Import Example Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/reset-biomcp-test-strategy-around-request-contracts/harden.md Demonstrates how to import and use the BioMCP test strategy library from a downstream project. Ensure the library's path is added to sys.path. ```python from pathlib import Path import sys repo = Path.cwd() sys.path.insert( 0, str(repo / "architecture/experiments/reset-biomcp-test-strategy-around-request-contracts/lib"), ) from biomcp_test_strategy import build_inventory, default_config, source_contract_inventory config = default_config() payload = build_inventory(config) source_rows = source_contract_inventory(config) assert payload["summary"]["source_contract_totals"]["mock_given"] >= 40 assert len(source_rows) == 6 ``` -------------------------------- ### Installing Skills into Agent Directory Source: https://github.com/genomoncology/biomcp/blob/main/docs/getting-started/skills.md Installs the embedded skills tree into a specified agent directory. Use '--force' to overwrite existing installations. ```bash biomcp skill install ~/.claude ``` ```bash biomcp skill install ~/.claude --force ``` -------------------------------- ### Install Python Package with pip Source: https://github.com/genomoncology/biomcp/blob/main/architecture/experiments/245-biomedical-news-discovery-and-personalized-briefing/harden.md Installs the Python package using `pip`, verifying that it can be built and installed successfully. This command also checks the build artifacts. ```bash python3 -m pip install --no-deps --target /tmp/biomcp_news_spike_pkg_test architecture/experiments/245-biomedical-news-discovery-and-personalized-briefing/scripts ```