Structure and affinity prediction using Boltz2 via Docker
An MCP (Model Context Protocol) server for Boltz2 protein modeling with 13 tools:
- Predict protein 3D structures from sequences or YAML configs
- Predict protein-ligand binding affinity
- Submit long-running jobs with async monitoring
- Track and retrieve job results
- Validate protein sequences and ligand SMILES
- Batch process multiple sequences
- Pre-computed MSA support for fast ligand screening
# Pull the latest image
docker pull ghcr.io/macromnex/boltz_mcp:latest
# Register with Claude Code
claude mcp add boltz -- docker run -i --rm \
--user `id -u`:`id -g` --gpus all --ipc=host \
-v ~/.boltz:/opt/boltz_cache:ro \
-v `pwd`:`pwd` \
ghcr.io/macromnex/boltz_mcp:latestgit clone https://github.com/MacromNex/boltz_mcp.git
cd boltz_mcp
docker build -t boltz_mcp:latest .
claude mcp add boltz -- docker run -i --rm \
--user `id -u`:`id -g` --gpus all --ipc=host \
-v ~/.boltz:/opt/boltz_cache:ro \
-v `pwd`:`pwd` \
boltz_mcp:latestRequirements:
- Docker with GPU support (
nvidia-dockeror Docker with NVIDIA runtime) - Boltz2 model checkpoints at
~/.boltz(auto-downloaded on first local run) - Claude Code installed
| Flag | Purpose |
|---|---|
-i |
Interactive mode for MCP stdio |
--rm |
Remove container after exit |
--user `id -u`:`id -g` |
Run as current user (output files owned by you) |
--gpus all |
Access all GPUs |
--ipc=host |
Host IPC namespace for PyTorch performance |
-v ~/.boltz:/opt/boltz_cache:ro |
Mount cached model checkpoints (read-only) |
-v path:path |
Mount working directory for input/output access |
When screening multiple ligands against the same protein, mount a pre-computed MSA directory to skip the slow MSA server query (~5 min saved per run):
claude mcp add boltz -- docker run -i --rm \
--user `id -u`:`id -g` --gpus all --ipc=host \
-v ~/.boltz:/opt/boltz_cache:ro \
-v /path/to/msa_files:/opt/msa:ro \
-v `pwd`:`pwd` \
boltz_mcp:latestThen pass msa_path="/opt/msa/protein.a3m" to any prediction tool. The MSA .a3m file is generated automatically on the first run with --use_msa_server and can be found in the output directory under msa/.
claude mcp list
# You should see 'boltz' in the outputAvailable tools (13 total):
simple_structure_prediction/simple_affinity_prediction— sync predictionssubmit_structure_prediction/submit_affinity_prediction/submit_batch_structure_prediction— async jobsget_job_status/get_job_result/get_job_log/cancel_job/list_jobs— job managementvalidate_protein_sequence/validate_ligand_smiles— input validationlist_example_data— list bundled examples
Predict the structure of this protein: MVLSEGEWQLVLHVWAKVEADVAGHGQDILIRLFKSHPETLEKFDRFKHLKTEREQESRKEAAG. Save to /path/to/results/.
Predict binding affinity between protein MVLSE... and aspirin (SMILES: CC(=O)Oc1ccccc1C(=O)O). Use simple_affinity_prediction.
Screen these 10 ligands against KRAS using simple_affinity_prediction with msa_path="/opt/msa/kras.a3m" for each.
Submit a structure prediction with use_potentials=True for the sequence in /path/to/protein.fasta. Monitor until complete.
# Structure prediction
./env/bin/python scripts/structure_prediction.py --sequence "MVLSE..." --output results/out
# Affinity prediction
./env/bin/python scripts/affinity_prediction.py \
--protein-seq "MVLSE..." --ligand-smiles "CC(=O)O" --output results/out
# With pre-computed MSA (skips MSA server, much faster)
./env/bin/python scripts/affinity_prediction.py \
--protein-seq "MVLSE..." --ligand-smiles "CC(=O)O" \
--msa-path /path/to/protein.a3m --output results/outDocker not found?
docker --version # Install Docker if missingGPU not accessible?
- Ensure NVIDIA Docker runtime is installed
- Check with
docker run --gpus all ubuntu nvidia-smi
Model checkpoints missing?
- Run a local prediction first to auto-download to
~/.boltz - Or set
BOLTZ_CACHE=/path/to/cachebefore running
Claude Code not found?
npm install -g @anthropic-ai/claude-codeSee detail.md for comprehensive guides on available tools, YAML config format, local setup, and performance optimization.
MIT