reachy-mini-body-mcp
by RobinBeraud
README.md
# reachy-mini-body-mcp
An [MCP](https://modelcontextprotocol.io) server that gives an AI agent a safe, bounded **body** in a
[Reachy Mini](https://github.com/pollen-robotics/reachy_mini) robot: the MuJoCo simulator or a Reachy Mini Wireless.
> **Unofficial.** This is a community project, not affiliated with Pollen Robotics or Hugging Face.
> **Status: early.** Tested only on the **MuJoCo simulator**, with `reachy-mini` 1.15.1, on **Windows**.
> **Not yet tested on a real robot, nor on Linux or macOS** (the POSIX code paths exist but have never been run).
## Features
- 13 tools: look, turn the body, move the antennas, play emotions and dances, speak, take one camera picture, sleep/wake, stop/resume.
- Bounds are enforced **server side**; every result says what was requested and what was actually done.
- One motion loop (60 Hz) is the only place that sends targets to the robot, with breathing, smooth easing and recovery from a lost link.
- A global `stop` that cuts motion and voice and blocks everything until `resume`.
- Several processes can share one robot: the first becomes the *pilot*, the others forward their calls to it (authenticated channel).
- Optional local speech with [Piper](https://github.com/OHF-Voice/piper1-gpl); the rest works without it.
- The camera is read only on explicit request; nothing is stored. Spoken text is never written to the log.
## Install from source
```bash
git clone https://github.com/RobinBeraud/reachy-mini-body-mcp
cd reachy-mini-body-mcp
python -m venv .venv
# Windows: .venv\Scripts\activate Linux/macOS: source .venv/bin/activate
pip install -e . # server + reachy-mini + numpy
pip install -e ".[voice]" # optional: adds piper-tts (GPL-3.0) for `speak`
```
Start the simulator (or power the robot) as described in the Reachy Mini documentation, then configure your MCP client.
Emotions and dances are downloaded from Hugging Face on first use, so the first `express`, `dance` or `list_expressions` needs network access.
### Claude Code
```bash
claude mcp add reachy -e REACHY_BODY_CONNECTION=localhost_only -- /path/to/reachy-mini-body-mcp/.venv/bin/reachy-mini-body-mcp
```
### Claude Desktop (`claude_desktop_config.json`)
```json
{
"mcpServers": {
"reachy": {
"command": "/path/to/reachy-mini-body-mcp/.venv/bin/reachy-mini-body-mcp",
"env": {
"REACHY_BODY_CONNECTION": "localhost_only",
"REACHY_BODY_VOICE": "/path/to/voices/my-voice.onnx"
}
}
}
}
```
On Windows the executable is `...\.venv\Scripts\reachy-mini-body-mcp.exe`. For a Wireless robot use
`REACHY_BODY_CONNECTION=network` and `REACHY_BODY_HOST=<robot address>`.
## Tools
| Tool | What it does |
|---|---|
| `status` | Connection, head pose, body yaw, antennas, stopped/asleep flags, limits. |
| `list_expressions` | English aliases, official emotions and dances, directions. |
| `look` | Head to a `direction` (`front, left, right, up, down, up_left, up_right, down_left, down_right`) or to `yaw` / `pitch` / `roll` degrees (+yaw = left, +pitch = down). |
| `turn_body` | Rotate the whole body (+ = left). |
| `antennas` | Set both antennas (degrees). |
| `express` | Play an official emotion by alias (`yes`, `curious`, `sad`...) or official name; optional sound. Non-blocking. |
| `dance` | Play an official dance. Non-blocking. |
| `speak` | Say text aloud with a local Piper voice (needs setup, see below). |
| `see` | One JPEG picture from the camera; for explicit requests only. |
| `sleep` / `wake` | Sleep pose / wake-up sequence. |
| `stop` | Immediate stop: cancels motion, cuts voice, blocks everything. |
| `resume` | Re-enable motion after `stop`. |
## Safety model
| Limit | Value |
|---|---|
| Head yaw / pitch / roll | +-60 / +-30 / +-25 degrees |
| Body yaw | +-150 degrees |
| Antennas | +-80 degrees |
| Movement duration | 0.2 to 4 s |
| Speech length | 600 characters |
Values outside the bounds are clamped, and the result carries `requested`, `done` and `clamped`, so the agent
should read `done`. After `stop`, every movement or speech request is refused until `resume`. The robot has no wheels.
This is a convenience layer, **not a certified safety system**: keep the power switch within reach, and do not rely on
`stop` alone around children, pets or fragile objects. Data (pilot key, `actions.jsonl` log of every action) lives in a per-user folder: `REACHY_BODY_HOME`, default `~/.reachy_mini_body_mcp`
(created on demand; mode 0700 and key file 0600 on POSIX).
## Environment variables
| Variable | Meaning |
|---|---|
| `REACHY_BODY_CONNECTION` | Passed to the SDK as `connection_mode`: `auto` (default), `localhost_only` (simulator), `network`. Defaults to `network` when `REACHY_BODY_HOST` is set. |
| `REACHY_BODY_HOST` | Address of a Wireless robot. |
| `REACHY_BODY_VOICE` | Path to a Piper `.onnx` voice (its `.onnx.json` next to it). Without it, `speak` returns a clear error and everything else works. |
| `REACHY_BODY_SPEAKER` | Optional speaker name or number for multi-speaker Piper voices. |
| `REACHY_BODY_VOLUME` | Speech gain, default `0.8`. |
| `REACHY_BODY_PILOT_NAME` | Name of the pilot channel (default: derived from the data folder). Use a unique one to isolate a test run. |
| `REACHY_BODY_HOME` | Data folder (default `~/.reachy_mini_body_mcp`). |
Voice files: see <https://huggingface.co/rhasspy/piper-voices>. **`piper-tts` is GPL-3.0**; it is an optional extra,
imported only when `speak` is first used, and not needed for anything else.
## Network note
The robot's own API (daemon, port 8000) has **no password**. Anyone who can reach it can control the robot.
Use it on a trusted network only; this server adds bounds and a stop, not authentication towards the robot.
## Tests
```bash
pip install -e ".[dev]"
pytest # unit tests, no robot or simulator needed
# end-to-end: needs a running Reachy Mini simulator on localhost (and network for the emotion library)
python tests/sim_smoke.py
```
`tests/sim_smoke.py` forces `localhost_only`, uses its own pilot name and a temporary data folder, and never calls `see`.
## License
Apache-2.0 (see `LICENSE` and `NOTICE`).
---
**Résumé en français**
Serveur MCP qui donne à un agent IA un corps borné et sûr dans un robot Reachy Mini (simulateur ou Wireless).
Les limites (angles, durées) sont appliquées côté serveur ; `stop` coupe tout jusqu'à `resume`.
La voix est optionnelle (Piper, GPL-3.0) : sans voix configurée, seul `speak` est indisponible.
Testé uniquement sur le simulateur MuJoCo (reachy-mini 1.15.1, Windows) : pas encore sur un vrai robot, ni sous Linux/macOS.
Projet non officiel, sans lien avec Pollen Robotics ni Hugging Face ; l'API du robot n'a pas de mot de passe.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues