myosuite-mcp
by M-Colley
README.md
# myosuite-agentic-tools
Model Context Protocol (MCP) server, CLI, and vetted operational `SKILL.md` library for agentic [MyoSuite](https://github.com/MyoHub/myosuite) workflows — inspired by CARLA 1.0's [`carla-agentic-tools`](https://github.com/carla-simulator/carla-agentic-tools).
Rather than placing an LLM inside the high-frequency MuJoCo control loop, `myosuite-agentic-tools` gives coding agents deterministic introspection and vetted procedures around the simulator so they do not hallucinate joint/tendon names, violate CPU/`mjlab` physics parity, or mix incompatible virtual environments.
## Features
- **Zero runtime dependencies for the MCP server (`myosuite-mcp`):** starts immediately over stdio (newline JSON-RPC and `Content-Length` framing) and dispatches runtime probes either in-process or to a configured `MYOSUITE_PYTHON` interpreter.
- **9 MCP tools (mirrored in the `myosuite-agentic` CLI):**
- `get_config` / `set_config` — manage paths across separate environments (`myosuite_root`, `myosuite_python`, `instanthmr_python`, `blender_bin`).
- `check_environment` — verify CPU (`MyoSuite`, `mujoco`, `myo-sim`), biomechanics (`osqp`, `mink`), GPU (`mjlab`, `mujoco-warp`, CUDA), `tools/instanthmr`, and Blender, plus per-skill readiness.
- `list_skills` / `read_skill` — browse and render vetted `SKILL.md` procedures with local path placeholders resolved.
- `inspect_model_anatomy` — inspect exact bodies, joints (`exact_regex` and equality/coupling joint flags), sites, muscles, resolved peak isometric forces (`force="-1"` handled), and functional muscle groups on any `env_id` or `ModelBuilder` recipe.
- `search_envs_and_terms` — query registered `env_id`s, `ModelBuilder` recipes, parity-baseline coverage, and `myosuite.terms.catalog` (`obs`, `reward`, `action`, `event`, `termination`, `track`, `multiplayer`, `feature`).
- `validate_env_contract` — check the CPU env contract (`float32` unbounded observations, 5-tuple `step()`, seeded `reset(seed=...)` bit-reproducibility, `rwd_dict` keys, optional frozen parity baseline replay, and optional `mjlab` timestep parity).
- `summarize_rollout_biomechanics` — run seeded CPU rollouts (with `--feature` conditions or subject scaling) and compute solve rate, `squared_activation`, `muscle_saturation`, `wasted_torque`, and per-DOF `cocontraction_index` via `myosuite.biomechanics.effort`.
- **7 vetted `SKILL.md` procedures:**
1. `environment-setup`
2. `anatomy-and-pathology`
3. `author-paired-task`
4. `video-to-mimic-retargeting`
5. `biomechanical-analysis`
6. `train-eval-and-parity`
7. `blender-muscle-rendering`
## Quick Start
### Install
```bash
pip install git+https://github.com/M-Colley/myosuite-agentic-tools.git
```
Point the tool at your MyoSuite checkout and Python environment (or set `MYOSUITE_ROOT` and `MYOSUITE_PYTHON`):
```bash
myosuite-agentic config \
--myosuite-root /path/to/myosuite \
--myosuite-python /path/to/venv/bin/python
myosuite-agentic check-env
```
### MCP Client Configuration (Claude Code, Cursor, VS Code, Windsurf, Antigravity)
```json
{
"mcpServers": {
"myosuite": {
"command": "myosuite-mcp",
"env": {
"MYOSUITE_ROOT": "/path/to/myosuite",
"MYOSUITE_PYTHON": "/path/to/venv/bin/python"
}
}
}
}
```
Or with `uvx` without pre-installing:
```json
{
"mcpServers": {
"myosuite": {
"command": "uvx",
"args": ["--from", "git+https://github.com/M-Colley/myosuite-agentic-tools.git", "myosuite-mcp"],
"env": {
"MYOSUITE_ROOT": "/path/to/myosuite",
"MYOSUITE_PYTHON": "/path/to/venv/bin/python"
}
}
}
}
```
### CLI Usage
```bash
myosuite-agentic list-skills
myosuite-agentic read-skill anatomy-and-pathology
myosuite-agentic inspect-anatomy --recipe elbow_standard
myosuite-agentic search pose --kind reward
myosuite-agentic validate-env myoElbowPose1D6MRandom-v0
myosuite-agentic rollout-biomechanics myoElbowPose1D6MRandom-v0 --policy random --feature sarcopenia
```
## License
Apache-2.0.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues