MCP server for Refua Boltz2 folding/affinity and BoltzGen design workflows.
Project description
Refua MCP Server
MCP server exposing Refua's unified Complex API for Boltz2 folding/affinity and BoltzGen design workflows.
Install
pip install refua[cuda] # remove [cuda] if you don't need gpu support
pip install refua-mcp
Boltz2 and BoltzGen require model/molecule assets. If you don't have them, refua can download them for you automatically:
python -c "from refua import download_assets; download_assets()"
- Boltz2: uses
~/.boltzby default. Override via toolboltz.cache_dirif needed. - BoltzGen: uses the bundled HF artifact by default. Override via tool
boltzgen.mol_dirif needed.
MCP Clients
Claude Code
Add the server to your Claude Code MCP config (macOS: ~/Library/Application Support/Claude/claude_code_config.json, Linux: ~/.config/claude/claude_code_config.json). This uses the default assets (~/.boltz for Boltz2 and the bundled BoltzGen artifact). Merge with any existing mcpServers entries:
{
"mcpServers": {
"refua-mcp": {
"command": "python3",
"args": ["-m", "refua_mcp.server"]
}
}
}
Codex
Register the server with the Codex CLI (uses default asset locations):
codex mcp add refua-mcp -- python3 -m refua_mcp.server
List configured servers with:
codex mcp list
Tools
refua_complex: run a unified Complex spec withaction="fold"(default) oraction="affinity".refua_job: check status for background jobs and optionally return results.
Example (fold a protein + ligand with optional affinity):
{
"tool": "refua_complex",
"args": {
"name": "protein_ligand",
"entities": [
{"type": "protein", "id": "A", "sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ"},
{"type": "ligand", "id": "lig", "smiles": "CCO"}
],
"constraints": [
{"type": "pocket", "binder": "lig", "contacts": [["A", 5], ["A", 8]]}
],
"affinity": {"binder": "lig"}
}
}
Note: DNA/RNA entities are supported for Boltz2 folding only (BoltzGen does not accept DNA/RNA entities).
Long-Running Jobs
For runs that exceed the tool-call timeout, set async_mode=true and poll the job.
Folding (action="fold") can take minutes depending on inputs and hardware, so poll
sparingly (for example, every 10-30 seconds with backoff) or follow
recommended_poll_seconds from refua_job.
{
"tool": "refua_complex",
"args": {
"async_mode": true,
"entities": [...]
}
}
Then poll with:
{
"tool": "refua_job",
"args": {
"job_id": "..."
}
}
For queued/running jobs, the response includes recommended_poll_seconds plus queue
and estimate metadata (queue_position = jobs ahead, queue_depth = queued jobs,
average_runtime_seconds, estimated_start_seconds, estimated_remaining_seconds)
to help clients back off.
Set include_result=true once the job is complete to fetch the output.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file refua_mcp-0.3.0.tar.gz.
File metadata
- Download URL: refua_mcp-0.3.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.14.2 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa96b83b681c297485b74489d6e7408be6ab7c2c774681c4507d225243e2589a
|
|
| MD5 |
a265ab3773168ece2fec96f466b7a422
|
|
| BLAKE2b-256 |
5443c467d7cf8122dd5ac4ec977bfb97e7e48174379acf06776d94762cf7a1e8
|
File details
Details for the file refua_mcp-0.3.0-py3-none-any.whl.
File metadata
- Download URL: refua_mcp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.14.2 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aca762f267b823d41cec295ba3ccd16bd96e55ab4249bbfd559d9b4a331f640
|
|
| MD5 |
20bc5ec8081d958e6fd31e48eca6303e
|
|
| BLAKE2b-256 |
10141441ff593fc199193ab0dd5b52ff885c6b68d604dc08bf5eae6d9e6941b6
|