Skip to main content

Biomedical MCP CLI - query genes, variants, trials, articles, drugs, diseases

Project description

BioMCP

BioMCP gives researchers, clinicians, and agents one command grammar across biomedical APIs that usually require separate search habits, identifiers, and output formats. It keeps results compact and evidence-oriented so you can move from discovery to detail without rewriting the workflow for each source. One command grammar, compact markdown output, 12 remote entities across 15+ data sources, plus local study analytics.

Install

PyPI tool install

uv tool install biomcp-cli
# or: pip install biomcp-cli

This installs the biomcp binary on your PATH.

Binary install

curl -fsSL https://biomcp.org/install.sh | bash

Install skills

Install guided investigation workflows into your agent directory:

biomcp skill install ~/.claude --force

MCP clients

{
  "mcpServers": {
    "biomcp": {
      "command": "biomcp",
      "args": ["serve"]
    }
  }
}

Remote HTTP server

For shared or remote deployments:

biomcp serve-http --host 127.0.0.1 --port 8080

Remote clients connect to http://127.0.0.1:8080/mcp. Probe routes are GET /health, GET /readyz, and GET /.

Runnable demo:

uv run --script demo/streamable_http_client.py

See Remote HTTP Server for the newcomer guide.

From source

cargo build --release --locked

Quick start

First useful query in under 30 seconds:

uv tool install biomcp-cli
biomcp health --apis-only
biomcp list gene
biomcp search all --gene BRAF --disease melanoma  # unified cross-entity discovery
biomcp get gene BRAF pathways druggability

Command grammar

search <entity> [filters]    → discovery
get <entity> <id> [sections] → focused detail
<entity> <helper> <id>       → cross-entity pivots
enrich <GENE1,GENE2,...>     → gene-set enrichment
batch <entity> <id1,id2,...> → parallel gets
search all [slot filters]    → counts-first cross-entity orientation

Feature highlights

  • Federated article search: search article fans out across PubTator3 and Europe PMC, deduplicates by PMID, and can add Semantic Scholar follow-ups when S2_API_KEY is set.
  • Cross-entity pivots: move directly from a gene, variant, drug, disease, pathway, protein, or article into the next built-in view.
  • Study analytics and charting: downloaded studies support query, cohort, survival, compare, and co-occurrence workflows with native terminal or SVG charts.
  • Citation graphs and article helpers: article citations, article references, article recommendations, and article entities support literature navigation from a known paper.
  • Gene-set enrichment and batch retrieval: use biomcp enrich for top-level g:Profiler enrichment and biomcp batch for up to 10 focused get calls in one command.

Entities and sources

Entity Upstream providers used by BioMCP Example
gene MyGene.info, UniProt, Reactome, QuickGO, STRING, GTEx, DGIdb, ClinGen biomcp get gene BRAF pathways
variant MyVariant.info, ClinVar, gnomAD fields via MyVariant, CIViC, Cancer Genome Interpreter, OncoKB, cBioPortal, GWAS Catalog, AlphaGenome biomcp get variant "BRAF V600E" clinvar
article PubMed, PubTator3, Europe PMC, PMC OA, NCBI ID Converter, Semantic Scholar (optional with S2_API_KEY) biomcp search article -g BRAF --limit 5
trial ClinicalTrials.gov API v2, NCI CTS API biomcp search trial -c melanoma -s recruiting
drug MyChem.info, ChEMBL, OpenTargets, Drugs@FDA, OpenFDA, CIViC biomcp get drug pembrolizumab targets
disease MyDisease.info, Monarch Initiative, MONDO, OpenTargets, Reactome, CIViC biomcp get disease "Lynch syndrome" genes
pathway Reactome, g:Profiler, Enrichr-backed enrichment sections biomcp get pathway R-HSA-5673001 genes
protein UniProt, InterPro, STRING, PDB, AlphaFold biomcp get protein P15056 domains
adverse-event OpenFDA FAERS, MAUDE, Recalls biomcp search adverse-event --drug pembrolizumab
pgx CPIC, PharmGKB biomcp get pgx CYP2D6 recommendations
gwas GWAS Catalog biomcp search gwas --trait "type 2 diabetes"
phenotype Monarch Initiative (HPO semantic similarity) biomcp search phenotype "HP:0001250"

Cross-entity helpers

Pivot between related entities without rebuilding filters.

See the cross-entity pivot guide for when to use a helper versus a fresh search.

biomcp variant trials "BRAF V600E" --limit 5
biomcp variant articles "BRAF V600E"
biomcp drug adverse-events pembrolizumab
biomcp drug trials pembrolizumab
biomcp disease trials melanoma
biomcp disease drugs melanoma
biomcp disease articles "Lynch syndrome"
biomcp gene trials BRAF
biomcp gene drugs BRAF
biomcp gene articles BRCA1
biomcp gene pathways BRAF
biomcp pathway drugs R-HSA-5673001
biomcp pathway articles R-HSA-5673001
biomcp pathway trials R-HSA-5673001
biomcp protein structures P15056
biomcp article entities 22663011
biomcp article citations 22663011 --limit 3
biomcp article references 22663011 --limit 3
biomcp article recommendations 22663011 --limit 3

Gene-set enrichment

biomcp enrich BRAF,KRAS,NRAS --limit 10

Top-level biomcp enrich uses g:Profiler. Gene enrichment sections inside other entity views still reference Enrichr where that is the backing source.

Sections and progressive disclosure

Every get command supports selectable sections for focused output:

biomcp get gene BRAF                    # summary card
biomcp get gene BRAF pathways           # add pathway section
biomcp get gene BRAF civic interactions # multiple sections
biomcp get gene BRAF all                # everything

biomcp get variant "BRAF V600E" clinvar population conservation
biomcp get article 22663011 tldr
biomcp get drug pembrolizumab label targets civic approvals
biomcp get disease "Lynch syndrome" genes phenotypes variants
biomcp get trial NCT02576665 eligibility locations outcomes

In JSON mode, get responses expose _meta.next_commands for the next likely follow-ups, and batch ... --json returns per-entity objects with the same metadata shape.

API keys

Most commands work without credentials. Optional keys improve rate limits or unlock optional enrichments:

export NCBI_API_KEY="..."        # PubTator, PMC OA, NCBI ID converter
export S2_API_KEY="..."          # Semantic Scholar TLDR, citations, references, recommendations
export OPENFDA_API_KEY="..."     # OpenFDA rate limits
export NCI_API_KEY="..."         # NCI CTS trial search (--source nci)
export ONCOKB_TOKEN="..."        # OncoKB variant helper
export ALPHAGENOME_API_KEY="..." # AlphaGenome variant effect prediction

search article still uses PubTator3 + Europe PMC. S2_API_KEY only unlocks optional article enrichment and explicit Semantic Scholar helper commands. References and recommendations can be empty for paywalled papers because of publisher elision in Semantic Scholar upstream coverage.

Multi-worker deployment

BioMCP rate limiting is process-local. For many concurrent workers, run one shared Streamable HTTP biomcp serve-http endpoint so all workers share a single limiter budget:

biomcp serve-http --host 0.0.0.0 --port 8080

Remote clients should connect to http://<host>:8080/mcp. Lightweight process probes are available at GET /health, GET /readyz, and GET /.

Skills

BioMCP ships an embedded agent guide instead of a browsable in-binary catalog. Use biomcp skill to read the embedded BioMCP guide, then install it into your agent directory when you want local copies of the workflow references:

biomcp skill
biomcp skill install ~/.claude --force

See Skills for supported install targets, installed files, and legacy compatibility notes.

Local study analytics

study is BioMCP's local analysis family for downloaded cBioPortal-style datasets. The 12 remote entity commands query upstream APIs for discovery and detail; study commands work on local datasets when you need per-study query, cohort, survival, comparison, or co-occurrence workflows.

Use study download to fetch a dataset into your local study root. Set BIOMCP_STUDY_DIR when you want an explicit dataset location for reproducible scripts and demos; if it is unset, BioMCP falls back to its default study root.

export BIOMCP_STUDY_DIR="$HOME/.local/share/biomcp/studies"
biomcp study download msk_impact_2017
biomcp study query --study msk_impact_2017 --gene TP53 --type mutations --chart bar --theme dark --palette wong -o docs/blog/images/tp53-mutation-bar.svg

See the CLI reference for the full study command family and dataset prerequisites.

Ops

biomcp version          # show version and build info
biomcp health           # check all API connectivity
biomcp update           # self-update to latest release
biomcp update --check   # check for updates without installing
biomcp uninstall        # remove biomcp from ~/.local/bin

Documentation

Full documentation at biomcp.org.

Citation

If you use BioMCP in research, cite it via CITATION.cff. GitHub also exposes Cite this repository in the repository sidebar when that file is present.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

biomcp_cli-0.8.16-py3-none-win_amd64.whl (15.4 MB view details)

Uploaded Python 3Windows x86-64

biomcp_cli-0.8.16-py3-none-manylinux_2_34_x86_64.whl (16.8 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

biomcp_cli-0.8.16-py3-none-macosx_11_0_arm64.whl (14.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

biomcp_cli-0.8.16-py3-none-macosx_10_12_x86_64.whl (16.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file biomcp_cli-0.8.16-py3-none-win_amd64.whl.

File metadata

  • Download URL: biomcp_cli-0.8.16-py3-none-win_amd64.whl
  • Upload date:
  • Size: 15.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for biomcp_cli-0.8.16-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 854e492ed413e76bf951507ecbceae74f890337362ecf0a5f5baa2e87567e054
MD5 0333ddf2282799a85a717dcedc502aa8
BLAKE2b-256 e278cba26588e5e48effb99d2aa5722ae378c9d595e8d58eafaa969dd3460d62

See more details on using hashes here.

Provenance

The following attestation bundles were made for biomcp_cli-0.8.16-py3-none-win_amd64.whl:

Publisher: release.yml on genomoncology/biomcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biomcp_cli-0.8.16-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for biomcp_cli-0.8.16-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1ba1241c77e22bfeac7731c5f97994c18fe3a52e8c784cf7e2cea4d6ea4cc6e6
MD5 0b179b926874530ea659b9cc4417866e
BLAKE2b-256 670a169690d07538da9e18b29f514bd3a25dc99006ec158b20947a0395a7ffb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for biomcp_cli-0.8.16-py3-none-manylinux_2_34_x86_64.whl:

Publisher: release.yml on genomoncology/biomcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biomcp_cli-0.8.16-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biomcp_cli-0.8.16-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 67d3fd647aaa9609a649edf21258682a9dce016fb71364e4466fc6a730e5ef5d
MD5 2743768f998cf729a86a73820be3c48f
BLAKE2b-256 35a1c859a747be70f59918d9e3a379a2ef0de23f153f27cf3eff342c4b2906e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for biomcp_cli-0.8.16-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on genomoncology/biomcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biomcp_cli-0.8.16-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for biomcp_cli-0.8.16-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6b578cb489b9f468a5bcd8c72d0ff324fe8863e9cf4ba43d348927124208148f
MD5 76f2b8607eb3210559b1e4ba623c86d7
BLAKE2b-256 2c817b830692db9e82b77ec81db10e37c99a7077d120e4ad75a3aac068435aef

See more details on using hashes here.

Provenance

The following attestation bundles were made for biomcp_cli-0.8.16-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on genomoncology/biomcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page