Rosetta MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Rosetta MCP Server relax my protein using FastRelax"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Rosetta MCP Server
Author: Ariel J. Ben-Sasson
A Model Context Protocol (MCP) server that lets Cursor (or any MCP client) work with Rosetta, PyRosetta, and Biotite: run RosettaScripts, validate XML protocols, translate between Rosetta and Biotite, score structures, and query documentation -- all from your AI coding assistant.
What's new in v1.3.0 (vs v1.1.8 on npm)
New: Biotite integration
rosetta_to_biotite-- Find the Biotite equivalent of any Rosetta function with working example code (21 mappings covering structure I/O, SASA, RMSD, superimposition, secondary structure, contacts, hydrogen bonds, B-factors, angles, and more)biotite_to_rosetta-- Reverse lookup: find the Rosetta equivalent of a Biotite functiontranslate_rosetta_script_to_biotite-- Translate entire RosettaScripts XML or PyRosetta code to Biotite Python. Design/optimization operations are flagged as Rosetta-only.Fuzzy search with keyword aliases ("contacts", "binding energy", "surface area", "align", etc.)
Improved: XML to PyRosetta translator
37 element types supported (was 6): 11 movers, 9 filters, 10 selectors, 7 task operations
Full attribute handling:
repeats,disable_design,cartesian,tolerance,threshold,distance, and moreChild element support:
MoveMap(withSpan),Reweight,ScoreFunctionReports unrecognized elements so you know what needs manual work
Improved: Help and documentation
get_rosetta_helpnow accepts any topic: movers by name ("FastRelax"), concepts ("constraints", "docking"), or score functions ("ref2015") -- auto-fetches live docs from rosettacommons.orgsearch_rosetta_web_docsfallback: when DuckDuckGo is rate-limited, probes direct Rosetta docs URLsget_cached_docsauto-caches: no need to callcache_cli_docsfirstExpanded static help for score_functions, movers, filters, xml, and parameters
Improved: Scoring
pyrosetta_score: newper_residueoption returns per-residue energy breakdownscorefxnparameter now works (was ignored in v1.1.8)Proper error messages for missing files instead of silent
{}
Improved: Validation
validate_xml: newvalidate_against_schemaoption checks element names against the Rosetta XSD schema (catches typos likeFastRleax)
MCP spec compliance fixes
tools/callresponses now use correct{ content: [{ type: "text", text }] }formatTool errors return
isError: true(not JSON-RPC errors)Standard JSON-RPC error codes (-32601, -32700, -32603)
Removed false
resourcescapability advertisement
Security fixes
User input no longer interpolated into Python code (uses env vars / stdin)
Temp files written to
os.tmpdir()(not module directory)
Cleanup
Removed 3 redundant tools:
list_functions(merged intoget_rosetta_info),search_pyrosetta_wheels,cache_cli_docs(auto-cache inget_cached_docs)Removed hardcoded personal paths
Fixed shadowed variables, async anti-patterns, dead code
18 tools (was 21), all with improved agent-oriented descriptions
Related MCP server: gget-mcp
Example: asking a naive question
This is what makes the MCP server powerful -- an AI agent can answer domain questions by calling the right tools automatically:
User asks in Cursor: "How do I relax my protein and what's the Biotite equivalent?"
The agent calls two MCP tools behind the scenes:
1. get_rosetta_help("FastRelax") returns 6000+ chars of live documentation:
FastRelax performs all-atom relaxation using the FastRelax protocol. Parameters include
scorefxn,repeats,cartesian,disable_design,MoveMapconfiguration...
2. rosetta_to_biotite("FastRelax") returns:
{
"found": true,
"results": [{
"rosetta": { "name": "FastRelax", "example": ["relax = FastRelax()", "relax.set_scorefxn(get_score_function('ref2015'))", "relax.apply(pose)"] },
"biotite": null,
"equivalence": "none_from_biotite",
"notes": "Biotite does NOT perform structure optimization. These are Rosetta-specific capabilities."
}]
}The agent synthesizes: "FastRelax is Rosetta's all-atom relaxation protocol. Here's how to use it... Note: Biotite is analysis-only and has no equivalent -- you need PyRosetta for structure optimization."
Without the MCP, the agent would guess from training data and likely get parameter names or API signatures wrong.
What you get (18 tools)
Discovery & Help
Tool | Description |
| All available score functions, movers, filters, selectors, parameters |
| Help for any topic -- accepts mover names, concepts, or score functions |
| Live PyRosetta API search with docs and signatures |
Documentation
Tool | Description |
| Search rosettacommons.org documentation |
| Fetch and read a specific docs page |
| Search cached CLI help (auto-caches on first use) |
Execution & Scoring
Tool | Description |
| Run a RosettaScripts XML protocol on a PDB |
| Score a PDB with optional per-residue breakdown |
Translation
Tool | Description |
| XML to PyRosetta Python (37 element types) |
| Find Biotite equivalent of a Rosetta function |
| Find Rosetta equivalent of a Biotite function |
| Translate full scripts from Rosetta to Biotite |
Validation & Schema
Tool | Description |
| Check XML syntax + optional schema validation |
| Generate XSD schema and extract element names |
Environment
Tool | Description |
| Python version and installed packages |
| Verify PyRosetta is available |
| Auto-install PyRosetta (10-30 min) |
| Locate the rosetta_scripts binary |
Quick start
1. Install from npm
npm install -g rosetta-mcp-server2. Set up Python environment
# Create a venv with PyRosetta and Biotite
uv venv ~/.venvs/rosetta-mcp
~/.venvs/rosetta-mcp/bin/pip install pyrosetta-installer biotite
~/.venvs/rosetta-mcp/bin/python -c "import pyrosetta_installer as I; I.install_pyrosetta()"Or skip this step -- PyRosetta auto-installs on first use (takes 10-30 min).
3. Configure your MCP client
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"rosetta": {
"command": "rosetta-mcp-server",
"args": [],
"env": {
"ROSETTA_BIN": "/path/to/rosetta_scripts.default.macosclangrelease",
"PYTHON_BIN": "/path/to/.venvs/rosetta-mcp/bin/python"
}
}
}
}Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"rosetta": {
"command": "rosetta-mcp-server",
"env": {
"ROSETTA_BIN": "/path/to/rosetta_scripts.default.macosclangrelease",
"PYTHON_BIN": "/path/to/.venvs/rosetta-mcp/bin/python"
}
}
}
}Environment variables:
Variable | Required | Description |
| No | Path to |
| No | Python interpreter with PyRosetta/Biotite. Defaults to |
| No | Set to |
4. Restart your editor
Open Settings -> MCP. The "rosetta" server should appear green with 18 tools.
XML to PyRosetta translation example
Input XML:
<ROSETTASCRIPTS>
<SCOREFXNS>
<ScoreFunction name="ref" weights="ref2015"/>
</SCOREFXNS>
<RESIDUE_SELECTORS>
<Chain name="chainA" chains="A"/>
</RESIDUE_SELECTORS>
<MOVERS>
<FastRelax name="relax" scorefxn="ref" repeats="5" cartesian="true"/>
</MOVERS>
<PROTOCOLS>
<Add mover="relax"/>
</PROTOCOLS>
</ROSETTASCRIPTS>Generated PyRosetta code:
import pyrosetta
from pyrosetta import pose_from_pdb
from pyrosetta.rosetta.core.scoring import get_score_function
from pyrosetta.rosetta.core.select.residue_selector import *
from pyrosetta.rosetta.protocols.relax import *
pyrosetta.init("-mute all")
pose = pose_from_pdb("your_protein.pdb")
# Residue Selectors
chainSelector = ChainSelector()
chainSelector.set_chain_strings("A")
# Movers
fastRelax = FastRelax()
fastRelax.set_scorefxn(get_score_function("ref"))
fastRelax.set_default_repeats(5)
fastRelax.cartesian(True)
sfxn = get_score_function("ref2015")
# Apply movers
fastRelax.apply(pose)
pose.dump_pdb("output.pdb")
score = pose.energies().total_energy()
print(f"Final score: {score}")Rosetta <-> Biotite mapping coverage
Category | Rosetta | Biotite | Equivalence |
Structure I/O |
|
| Full |
Structure I/O |
|
| Full |
Structure I/O |
|
| Full |
Surface Analysis |
|
| Full |
Alignment |
|
| Full |
RMSD |
|
| Full |
Secondary Structure |
|
| Partial |
Sequence |
|
| Full |
Distance |
|
| Full |
Angles |
|
| Full |
Interface |
|
| Partial |
Database |
|
| Full |
Selection |
| numpy boolean indexing | Full |
Contacts | distance matrices |
| Partial |
Ramachandran |
|
| Partial |
H-bonds |
|
| Partial |
B-factors |
|
| Full |
Center of Mass |
|
| Full |
Scoring |
| None | Rosetta only |
Optimization |
| None | Rosetta only |
Design |
| None | Rosetta only |
Troubleshooting
Server shows red in Cursor: Restart Cursor. Use absolute path in config (e.g.,
/opt/homebrew/bin/rosetta-mcp-server). Ensure Node 14+ and Python 3.8+.run_rosetta_scriptsfails: VerifyROSETTA_BINpoints to a valid binary. Try"$ROSETTA_BIN" -help.PyRosetta tools say "not available": Install via
pip install pyrosetta-installerthen run the installer, or let the MCP server auto-install on first use.Biotite tools return no results: Install Biotite in the same Python env:
pip install biotiteget_rosetta_helpreturns "No detailed help": Try the exact Rosetta class name (e.g., "FastRelax" not "relax"). The tool resolves common aliases but may miss unusual names.
Verify from the command line
# Check version
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05"}}' | rosetta-mcp-server 2>/dev/null | python3 -c "import sys,json; print(json.loads(sys.stdin.readline())['result']['serverInfo'])"
# List all tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | rosetta-mcp-server 2>/dev/null | python3 -c "import sys,json; [print(t['name']) for t in json.loads(sys.stdin.readline())['result']['tools']]"Development
rosetta-mcp-server/
├── rosetta_mcp_wrapper.js # Node MCP server (protocol + all 18 tools)
├── rosetta_mcp_server.py # Python helper (static Rosetta data)
├── install_pyrosetta.js # Standalone PyRosetta installer
├── package.json # npm package config
└── README.mdLicense and attribution
MIT for this repository
Rosetta/PyRosetta: see RosettaCommons licenses; commercial use requires the appropriate license
Biotite: BSD 3-Clause license
Available Tools
19 toolsbiotite_to_rosettaARead-only
ALWAYS use this tool when asked about Biotite vs Rosetta equivalents. Returns the Rosetta/PyRosetta equivalent of a Biotite function with working example code. Covers: structure I/O, SASA, RMSD, superimposition, secondary structure, distances, angles, contacts, hydrogen bonds, B-factors, and residue selection.
Inputs: query (required), category.
check_pyrosettaARead-only
Check if PyRosetta is importable in the current environment. Use before PyRosetta-dependent tools to verify availability. Requires local installation.
Inputs: no named parameters.
find_rosetta_scriptsARead-only
Resolve the rosetta_scripts executable path by checking exe_path, ROSETTA_BIN env, common directories, and PATH. Use to verify Rosetta is installed. Requires local installation.
Inputs: exe_path.
get_cached_docsARead-only
Search locally cached Rosetta CLI docs for a keyword. Auto-caches on first use. Use to look up command-line flags or parser info. Requires local installation.
Inputs: cache_dir, query, max_lines.
get_local_setupARead-only
Get instructions for installing the full Rosetta MCP server locally with PyRosetta support. Use when a user needs scoring, structure optimization, introspection, or running RosettaScripts protocols -- these require a local installation.
Inputs: no named parameters.
get_rosetta_helpARead-only
Get help for any Rosetta topic, mover, filter, or concept. Accepts general topics (score_functions, movers, filters, xml, parameters) or specific names (FastRelax, Ddg, ChainSelector). Auto-fetches live documentation when available.
Inputs: topic.
get_rosetta_infoARead-only
Get comprehensive Rosetta installation info including available score functions, movers, filters, selectors, task operations, parameters, and command-line options. Use this first to understand what Rosetta components are available. For live PyRosetta API details, use pyrosetta_introspect.
Inputs: no named parameters.
get_rosetta_web_docARead-only
Fetch and extract text from a specific Rosetta docs URL. Use after search_rosetta_web_docs to read a documentation page.
Inputs: url (required), max_chars.
install_pyrosetta_installerA
Install PyRosetta using the pyrosetta-installer package. Takes 10-30 minutes. Use when PyRosetta is not available and needed for scoring or design. Requires local installation.
Inputs: silent.
pyrosetta_introspectARead-only
Search PyRosetta API classes (movers, filters, selectors, task operations) and return docs and signatures. Use to discover available PyRosetta classes or get constructor details. Requires local installation.
Inputs: query, kind, max_results.
pyrosetta_scoreARead-only
Score a PDB file using PyRosetta. Returns total energy in REU. Use to evaluate structure quality or compare designs. Optionally returns per-residue energy breakdown. Requires local installation.
Inputs: pdb_path (required), scorefxn, per_residue.
python_env_infoARead-only
Get Python executable path, version, and pip package list. Use to diagnose environment issues or verify package installations. Requires local installation.
Inputs: no named parameters.
rosetta_scripts_schemaA
Generate and cache the RosettaScripts XML schema (XSD). Optionally extract element names. Use to get the authoritative list of valid XML elements. Requires local installation.
Inputs: exe_path, cache_dir, extract_elements.
rosetta_to_biotiteARead-only
ALWAYS use this tool when asked about Rosetta vs Biotite equivalents. Returns the Biotite equivalent of a Rosetta/PyRosetta function with working example code. Covers: structure I/O, SASA, RMSD, superimposition, secondary structure, distances, angles, contacts, hydrogen bonds, B-factors, interface analysis, database access, and residue selection.
Inputs: query (required), category.
run_rosetta_scriptsA
Run a RosettaScripts XML protocol on an input PDB file. Use when executing Rosetta protocols. Requires local installation with rosetta_scripts binary.
Inputs: xml_path (required), input_pdb (required), out_dir (required), exe_path, +1 more.
search_rosetta_web_docsARead-only
Search online Rosetta documentation at rosettacommons.org. Use when you need docs for a specific Rosetta feature.
Inputs: query (required), max_results.
translate_rosetta_script_to_biotiteARead-only
ALWAYS use this tool when asked to convert or translate Rosetta code to Biotite. Translates RosettaScripts XML or PyRosetta code to Biotite Python code. Analysis operations are translated; design/optimization are flagged as Rosetta-only.
Inputs: code (required), input_format, include_comments.
validate_xmlARead-only
Validate a RosettaScripts XML protocol. Checks XML syntax and optionally validates element names against the Rosetta XSD schema. Use before run_rosetta_scripts to catch errors early.
Inputs: xml_content (required), validate_against_schema.
xml_to_pyrosettaARead-only
Translate RosettaScripts XML to equivalent PyRosetta Python code. Supports 37 element types including movers, filters, selectors, and task operations. Use when converting XML protocols to Python.
Inputs: xml_content (required), include_comments, output_format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool has a clearly distinct purpose. Tools with similar themes (e.g., documentation, translation) are differentiated by specific actions (help vs info vs search) or direction (biotite_to_rosetta vs rosetta_to_biotite). Descriptions include 'ALWAYS use this tool' cues that reduce ambiguity.
All tool names use snake_case and follow a predictable verb_noun pattern (e.g., check_pyrosetta, run_rosetta_scripts). Even longer names like translate_rosetta_script_to_biotite are consistent in style. The only slight deviation is biotite_to_rosetta which uses source_target format, but it's still clear and matches rosetta_to_biotite.
19 tools is appropriate for the complex Rosetta domain, covering installation, documentation, translation, scripting, scoring, and validation. Each tool serves a specific need without unnecessary overlap. The count allows comprehensive functionality while remaining manageable.
The tool set covers core workflows: setup, documentation, translation between Biotite and Rosetta, XML validation, and running RosettaScripts. Minor gaps exist: no direct PDB I/O tool (though PyRosetta can handle it) and no general Rosetta executable runner beyond rosetta_scripts. Overall, it is well-equipped for common tasks.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to generate, score, and analyze DNA sequences using the evo2 genomic foundation model. It supports multiple execution modes including local GPU, SLURM clusters, and the Nvidia NIM cloud API for tasks like variant effect prediction and sequence embedding.1MIT- AlicenseNot gradedqualityDmaintenanceAn MCP server for the gget bioinformatics library that enables AI assistants to perform complex genomics queries, including gene sequence retrieval, BLAST alignments, and protein structure predictions.33MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that gives LLM agents access to computational protein design tools.19Apache 2.0
- AlicenseAqualityAmaintenanceAn MCP server that gives AI assistants access to biological and biomedical RDF databases via SPARQL at the RDF Portal, as well as selected REST APIs (NCBI E-utilities, UniProt, ChEMBL, PDB, Reactome, Rhea, MeSH, and more).22921MIT