A Model Context Protocol (MCP) server for the Bacterial-Viral Bioinformatics resource Center:
- Data Tools: Query BV-BRC Solr collections for genome, feature, and other biological data
- Service Tools: Submit and manage BV-BRC analysis jobs (assembly, annotation, BLAST, etc.)
- Workspace Tools: Manage BV-BRC workspace files, folders, and groups
query_collection: Query any BV-BRC Solr collection with flexible filteringsolr_collection_parameters: Get schema information for collectionssolr_query_instructions: Get help on query syntaxsolr_collections: List all available collections
list_service_apps: List all available BV-BRC analysis servicesget_job_details: Query the status of submitted jobs- Submit jobs for various analyses:
- Genome Assembly
- Genome Annotation
- Comprehensive Genome Analysis
- BLAST
- Primer Design
- Variation Analysis
- TnSeq
- Phylogenetic Trees (Bacterial Genome Tree, Gene Tree)
- SNP Analysis (Whole Genome, MSA)
- Metagenomics (Taxonomic Classification, Binning, Read Mapping)
- RNA-Seq
- Viral Services (SARS-CoV-2 Analysis, Sequence Submission)
- And many more...
workspace_ls_tool: List workspace contentsworkspace_search_tool: Search workspace for filesworkspace_get_file_metadata_tool: Get file metadataworkspace_download_file_tool: Download workspace filesworkspace_upload: Upload files to workspacecreate_genome_group: Create genome groupscreate_feature_group: Create feature groupsget_genome_group_ids: Get genome IDs from a groupget_feature_group_ids: Get feature IDs from a group
- Click the plus next to "Ask me anything"
- Click "Add sources"
- You should now see "Sources" and "Add" below your chat box
- Click the down arrow next to "Add"
- Click "Connect more"
- Scroll down to Advanced Settings
- Click the toggle next to Developer Mode (must be "on")
- Click Back
- In the upper right-hand corner, click "Create"
- Fill in the following:
- Icon: Optional
- Name: BV-BRC MCP
- Description: ''
- MCP Server URL: https://dev-7.bv-brc.org/mcp
- Authentication:
- Leave authentication on OAuth
- Check the box if you Trust this application
- Click "Create"
- You should now see 'BV-BRC MCP' under "Enabled apps & connectors"
- Click the 'X' in the top left to go back to the chat screen
- In a New Chat, click the '+' button and hover over More
- You should see BV-BRC MCP as an option under Canvas
- Select BV-BRC MCP
-
Click account in bottom left and go to settings
-
Click 'Connectors'
-
Click 'Add custom connector'
-
Fill in the following:
- Name: BV-BRC MCP
- Remote MCP server URL: https://dev-7.bv-brc.org/mcp
-
Click 'Add'
-
Then click 'Connect'
-
Log into BV-BRC
-
It's now available to use in a new chat
Open your terminal
-
Clone Github Repository
git clone https://github.com/cucinellclark/bvbrc-mcp-server cd bvbrc-mcp-server -
Install the requirements:
./install.sh
-
Activate the environment:
source mcp_env/bin/activate -
Install the MCP Builder CLI:
npm install -g @anthropic-ai/mcpb
-
Generate the MCP configuration file (if you haven't already):
python3 bvbrc_login_and_setup.py
-
Pack the extension:
mcpb pack
-
In Claude, Go to Settings, then Extensions
-
Click Advanced settings, then Install Extension
-
Select the file 'bvbrc-mcp-server.mcpb' then click Preview
-
It should pull up a preview page, then click Install
Local server development is recommended for working on MCP tools
Run the installation script, which will create the virtual python environment and install a data api and remaining requirements
# clone the repository and enter it
./install.shGenerate mcp config file:
python3 bvbrc_login_and_setup.pyCreates mcp_config.json
Paste its contents into your chatbots mcp config file
Configure the server (for remote servers):
Edit config.json to set:
- API URLs (workspace, service, data)
- Server host and port
- Authentication URL
The config.json file contains:
{
"base_url": "https://www.bv-brc.org/api-bulk",
"workspace_url": "https://p3.theseed.org/services/Workspace",
"service_api_url": "https://p3.theseed.org/services/app_service",
"similar_genome_finder_api_url": "https://p3.theseed.org/services/minhash_service",
"authentication_url": "https://user.patricbrc.org/authenticate",
"mcp_url": "127.0.0.1",
"port": 12010
}Start the HTTP server:
./start_http_server.shThe server will start on the configured host and port (default: 127.0.0.1:12010).
Start the STDIO server: Set it up in your MCP client configuration (e.g., Claude Desktop): See installation section
{
"mcpServers": {
"bvbrc": {
"command": "python",
"args": ["/path/to/bvbrc-mcp/stdio_server.py"],
"env": {
"KB_AUTH_TOKEN": "your_token_here"
}
}
}
}bvbrc-mcp-server/
├── __init__.py # Package initialization
├── __main__.py # Entry point for module execution
├── http_server.py # HTTP server (for web clients, ChatGPT)
├── install.sh # Installation script
├── mcp_config.json # Generated MCP configuration
├── mcp_example.json # Example MCP configuration
├── mcp.pm2.config.js # PM2 process manager configuration
├── README.md # This file
├── requirements.txt # Python dependencies
├── start_server.sh # Server startup script
├── stdio_server.py # STDIO server (for Claude Desktop, etc.)
├── bvbrc_login_and_setup.py # Script to login and generate MCP config file
├── common/ # Common utility modules
│ ├── __init__.py
│ ├── auth.py # OAuth2 authentication endpoints (HTTP only)
│ ├── json_rpc.py # JSON-RPC client for API calls
│ └── token_provider.py # Unified authentication token handling
├── config/ # Configuration files
│ ├── config.json # Main configuration file
│ └── ...
├── bvbrc-python-api/ # BV-BRC Python API dependency
│ ├── bvbrc_solr_api/ # Solr API implementation
│ ├── pyproject.toml
│ └── README.md
├── functions/ # Function implementation modules
│ ├── __init__.py
│ ├── data_functions.py # Data query implementations
│ ├── service_functions.py # Service job implementations
│ └── workspace_functions.py # Workspace implementations
├── images/ # Image assets
│ └── bvbrc_logo_base64.txt
├── prompts/ # Collection schema documentation
│ ├── antibiotics.txt
│ ├── bacterial_genome_tree.txt
│ ├── bioset.txt
│ ├── bioset_result.txt
│ ├── blast.txt
│ ...
└── tools/ # Tool registration modules
├── __init__.py
├── data_tools.py # Data query tools registration
├── service_tools.py # Service job tools registration
└── workspace_tools.py # Workspace management tools registration
Integrate this into the current BV-BRC MCP Server so we do not need to re-invent the wheel for SRA searching. Requires NCBI account with API key. Follow instructions on GitHub repo to install and run locally. Tested on Cursor and working.