GenomOncology, LLC/biomcp
Built by Metorial, the integration platform for agentic AI.
GenomOncology, LLC/biomcp
Server Summary
Access biomedical databases
Perform structured queries
Retrieve information from PubMed
Gather data from ClinicalTrials.gov
Consult genomic variant details from MyVariant.info
BioMCP is an open source (MIT License) toolkit that empowers AI assistants and agents with specialized biomedical knowledge. Built following the Model Context Protocol (MCP), it connects AI systems to authoritative biomedical data sources, enabling them to answer questions about clinical trials, scientific literature, and genomic variants with precision and depth.
BioMCP is certified by MCPHub. This certification ensures that BioMCP follows best practices for Model Context Protocol implementation and provides reliable biomedical data access.
While Large Language Models have broad general knowledge, they often lack specialized domain-specific information or access to up-to-date resources. BioMCP bridges this gap for biomedicine by:
BioMCP integrates with multiple biomedical data sources:
BioMCP provides 24 specialized tools for biomedical research:
CRITICAL: The think
tool MUST be your first step for ANY biomedical research task.
# Start analysis with sequential thinking
think(
thought="Breaking down the query about BRAF mutations in melanoma...",
thoughtNumber=1,
totalThoughts=3,
nextThoughtNeeded=True
)
The sequential thinking tool helps:
The search tool supports two modes:
Use the query
parameter with structured field syntax for powerful cross-domain searches:
# Simple natural language
search(query="BRAF melanoma")
# Field-specific search
search(query="gene:BRAF AND trials.condition:melanoma")
# Complex queries
search(query="gene:BRAF AND variants.significance:pathogenic AND articles.date:>2023")
# Get searchable fields schema
search(get_schema=True)
# Explain how a query is parsed
search(query="gene:BRAF", explain_query=True)
Supported Fields:
gene:
, variant:
, disease:
trials.condition:
, trials.phase:
, trials.status:
, trials.intervention:
articles.author:
, articles.journal:
, articles.date:
variants.significance:
, variants.rsid:
, variants.frequency:
Use the domain
parameter with specific filters:
# Search articles (includes automatic cBioPortal integration)
search(domain="article", genes=["BRAF"], diseases=["melanoma"])
# Search with mutation-specific cBioPortal data
search(domain="article", genes=["BRAF"], keywords=["V600E"])
search(domain="article", genes=["SRSF2"], keywords=["F57*"]) # Wildcard patterns
# Search trials
search(domain="trial", conditions=["lung cancer"], phase="3")
# Search variants
search(domain="variant", gene="TP53", significance="pathogenic")
Note: When searching articles with a gene parameter, cBioPortal data is automatically included:
Retrieve full details for a single article, trial, or variant:
# Fetch article details (supports both PMID and DOI)
fetch(domain="article", id="34567890") # PMID
fetch(domain="article", id="10.1101/2024.01.20.23288905") # DOI
# Fetch trial with all sections
fetch(domain="trial", id="NCT04280705", detail="all")
# Fetch variant details
fetch(domain="variant", id="rs113488022")
Domain-specific options:
detail="full"
retrieves full text if availabledetail
can be "protocol", "locations", "outcomes", "references", or "all"For users who prefer direct access to specific functionality, BioMCP also provides 21 individual tools:
Note: All individual tools that search by gene automatically include cBioPortal summaries when the include_cbioportal
parameter is True (default). Trial searches can expand disease conditions with synonyms when expand_synonyms
is True (default).
Install uv
if you don't have it (recommended):
# MacOS
brew install uv
# Windows/Linux
pip install uv
Configure Claude Desktop:
{
"mcpServers": {
"biomcp": {
"command": "uv",
"args": ["run", "--with", "biomcp-python", "biomcp", "run"]
}
}
}
# Using pip
pip install biomcp-python
# Using uv (recommended for faster installation)
uv pip install biomcp-python
# Run directly without installation
uv run --with biomcp-python biomcp trial search --condition "lung cancer"
BioMCP supports optional environment variables for enhanced functionality:
# cBioPortal API authentication (optional)
export CBIO_TOKEN="your-api-token" # For authenticated access
export CBIO_BASE_URL="https://www.cbioportal.org/api" # Custom API endpoint
# Performance tuning
export BIOMCP_USE_CONNECTION_POOL="true" # Enable HTTP connection pooling (default: true)
export BIOMCP_METRICS_ENABLED="false" # Enable performance metrics (default: false)
BioMCP supports multiple transport protocols to suit different deployment scenarios:
For direct integration with Claude Desktop or local MCP clients:
# Default STDIO mode for local development
biomcp run
# Or explicitly specify STDIO
biomcp run --mode stdio
BioMCP supports multiple HTTP transport protocols:
For backward compatibility with existing SSE clients:
biomcp run --mode worker
# Server available at http://localhost:8000/sse
The new MCP-compliant Streamable HTTP transport provides optimal performance and standards compliance:
biomcp run --mode streamable_http
# Custom host and port
biomcp run --mode streamable_http --host 127.0.0.1 --port 8080
Features of Streamable HTTP transport:
/mcp
endpoint for all operations# Build the Docker image locally
docker build -t biomcp:latest .
# Run the container
docker run -p 8000:8000 biomcp:latest biomcp run --mode streamable_http
The worker mode can be deployed to Cloudflare Workers for global edge deployment.
Note: All APIs work without authentication, but tokens may provide higher rate limits.
BioMCP provides a comprehensive CLI for direct database interaction:
# Get help
biomcp --help
# Run the MCP server
biomcp run
# Article search examples
biomcp article search --gene BRAF --disease Melanoma # Includes preprints by default
biomcp article search --gene BRAF --no-preprints # Exclude preprints
biomcp article get 21717063 --full
# Clinical trial examples
biomcp trial search --condition "Lung Cancer" --phase PHASE3
biomcp trial search --condition melanoma --source nci --api-key YOUR_KEY # Use NCI API
biomcp trial get NCT04280705 Protocol
biomcp trial get NCT04280705 --source nci --api-key YOUR_KEY # Get from NCI
# Variant examples with external annotations
biomcp variant search --gene TP53 --significance pathogenic
biomcp variant get rs113488022 # Includes TCGA, 1000 Genomes, and cBioPortal data by default
biomcp variant get rs113488022 --no-external # Core annotations only
# NCI-specific examples (requires NCI API key)
biomcp organization search "MD Anderson" --api-key YOUR_KEY
biomcp organization get ORG123456 --api-key YOUR_KEY
biomcp intervention search pembrolizumab --api-key YOUR_KEY
biomcp intervention search --type Device --api-key YOUR_KEY
biomcp biomarker search "PD-L1" --api-key YOUR_KEY
biomcp disease search melanoma --source nci --api-key YOUR_KEY
Test your BioMCP setup with the MCP Inspector:
npx @modelcontextprotocol/inspector uv run --with biomcp-python biomcp run
This opens a web interface where you can explore and test all available tools.
OncoMCP extends BioMCP with GenomOncology's enterprise-grade precision oncology platform (POP), providing:
Learn more: GenomOncology
# Get comprehensive gene information
gene_getter(gene_id_or_symbol="TP53")
# Returns: Official name, summary, aliases, links to databases
# Get disease information with synonyms
disease_getter(disease_id_or_name="GIST")
# Returns: "gastrointestinal stromal tumor" and other synonyms
# Search trials with automatic synonym expansion
trial_searcher(conditions=["GIST"], expand_synonyms=True)
# Searches for: GIST OR "gastrointestinal stromal tumor" OR "GI stromal tumor"
# 1. Always start with thinking
think(thought="Analyzing BRAF V600E in melanoma treatment", thoughtNumber=1)
# 2. Get gene context
gene_getter("BRAF")
# 3. Search for pathogenic variants
variant_searcher(gene="BRAF", hgvsp="V600E", significance="pathogenic")
# 4. Find relevant clinical trials with disease expansion
trial_searcher(conditions=["melanoma"], interventions=["BRAF inhibitor"])
For comprehensive documentation, visit https://biomcp.org
# Run all tests (including integration tests)
make test
# Run only unit tests (excluding integration tests)
uv run python -m pytest tests -m "not integration"
# Run only integration tests
uv run python -m pytest tests -m "integration"
Note: Integration tests make real API calls and may fail due to network issues or rate limiting. In CI/CD, integration tests are run separately and allowed to fail without blocking the build.
Looking to see BioMCP in action?
Check out the companion repository: 👉 biomcp-examples
It contains real prompts, AI-generated research briefs, and evaluation runs across different models. Use it to explore capabilities, compare outputs, or benchmark your own setup.
Have a cool example of your own? We’d love for you to contribute! Just fork the repo and submit a PR with your experiment.
This project is licensed under the MIT License.