Quickstart: BioMCP CLI¶
Get started with BioMCP in under 5 minutes! This guide walks you through installation and your first biomedical search.
Prerequisites¶
- Python 3.10 or higher
- uv package manager (recommended) or pip
Installation¶
Option 1: Using uv (Recommended)¶
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install BioMCP
uv tool install biomcp
Option 2: Using pip¶
Your First Search¶
Let's search for recent articles about BRAF mutations in melanoma:
This command:
- Searches PubMed/PubTator3 for articles
- Filters by BRAF gene and melanoma disease
- Returns the 5 most recent results
- Automatically includes cBioPortal cancer genomics data
- Includes preprints from bioRxiv/medRxiv by default
Understanding the Output¶
The search returns:
- cBioPortal Summary (if gene specified): Cancer genomics data showing mutation frequencies and hotspots
- Article Results: Each result includes:
- Title and authors
- Journal and publication date
- PubMed ID and direct link
- Abstract snippet
- Annotated entities (genes, diseases, chemicals)
Essential Commands¶
Search Clinical Trials¶
Find active trials for lung cancer:
Get Gene Information¶
Retrieve details about the TP53 tumor suppressor:
Look Up Drug Information¶
Get details about imatinib (Gleevec):
Search for Genetic Variants¶
Find pathogenic variants in the BRCA1 gene:
Next Steps¶
Set Up API Keys (Optional but Recommended)¶
Some features require API keys for enhanced functionality:
# For NCI clinical trials database
export NCI_API_KEY="your-key-here"
# For AlphaGenome variant predictions
export ALPHAGENOME_API_KEY="your-key-here"
# For additional cBioPortal features
export CBIO_TOKEN="your-token-here"
See Authentication and API Keys for detailed setup.
Explore Advanced Features¶
- Combine Multiple Filters:
- Use OR Logic in Keywords:
- Exclude Preprints:
Get Help¶
View all available commands:
Get help for a specific command:
Common Use Cases¶
1. Research a Specific Mutation¶
# Find articles about EGFR T790M resistance mutation
biomcp article search --gene EGFR \
--keyword "T790M|p.T790M" \
--disease "lung cancer"
2. Find Trials for a Patient¶
# Active trials for HER2-positive breast cancer
biomcp trial search \
--condition "breast cancer" \
--keyword "HER2 positive" \
--status RECRUITING
3. Investigate Drug Mechanisms¶
# Get information about pembrolizumab
biomcp drug get pembrolizumab
# Find articles about its use in melanoma
biomcp article search --chemical pembrolizumab --disease melanoma
Troubleshooting¶
Command Not Found¶
If biomcp
is not recognized:
- Ensure your PATH includes the installation directory
- Try running with full path:
~/.local/bin/biomcp
- Restart your terminal after installation
No Results Found¶
If searches return no results:
- Check spelling of gene names (use official symbols)
- Try broader search terms
- Remove filters one by one to identify the constraint
API Rate Limits¶
If you encounter rate limit errors:
- Add delays between requests
- Consider setting up API keys for higher limits
- Use the
--limit
parameter to reduce result count
Next Steps¶
Now that you've run your first searches, explore these resources:
- Complete CLI Reference - Comprehensive documentation for all commands and options
- Claude Desktop Integration - Use BioMCP with AI assistants
- Set up API Keys - Enable advanced features with NCI, AlphaGenome, and cBioPortal
- How-to Guides - Step-by-step tutorials for complex research workflows
- Deep Researcher Persona - Learn about BioMCP's philosophy and methodology
Happy researching! 🧬🔬