BioMCP is a toolkit that connects AI assistants to authoritative biomedical data sources, enabling them to answer questions about clinical trials, scientific literature, and genomic variants with precision. It follows the Model Context Protocol (MCP) to provide structured access to specialized biomedical knowledge.
uv
if you don't have it (recommended):# MacOS
brew install uv
# Windows/Linux
pip install uv
{
"mcpServers": {
"biomcp": {
"command": "uv",
"args": ["run", "--with", "biomcp-python", "biomcp", "run"]
}
}
}
You can install BioMCP using pip or uv:
# 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 provides a comprehensive CLI for direct database interaction:
# Get help on available commands
biomcp --help
# Run the MCP server
biomcp run
Access PubMed and PubTator3 data with these commands:
# Search for articles by genes, diseases, or keywords
biomcp article search --gene BRAF --disease Melanoma
# Get detailed article information including abstract
biomcp article get 21717063
# Get full article text when available
biomcp article get 21717063 --full
Query the ClinicalTrials.gov database:
# Search for trials with various filters
biomcp trial search --condition "Lung Cancer" --phase PHASE3
# Get detailed trial protocol information
biomcp trial get NCT04280705 Protocol
# Other available commands for trials:
# biomcp trial get [ID] Locations - For site locations and contacts
# biomcp trial get [ID] Outcomes - For results and outcome measures
# biomcp trial get [ID] References - For related publications
Access MyVariant.info data:
# Search for genetic variants
biomcp trial search --gene TP53 --significance pathogenic
# Get comprehensive annotations for a specific variant
biomcp variant get rs113488022
Verify your BioMCP installation works correctly:
npx @modelcontextprotocol/inspector uv run --with biomcp-python biomcp run
This opens a web interface where you can explore and test all available tools in the BioMCP toolkit.
For more comprehensive documentation, visit https://biomcp.org
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.