MCP server for running and inspecting LeRobot workflows
Project description
lerobot-mcp
MCP server for LeRobot workflows.
lerobot-mcp gives MCP clients a structured, auditable interface over the current LeRobot CLI,
examples, source registries, datasets, and dataset conversion workflows.
Features
- Discover available
lerobot-*entry points from a managed, local, or installed LeRobot checkout. - List and run scripts under LeRobot's
examples/tree with path traversal protection. - Audit registered policies, rewards, robots, teleoperators, cameras, envs, processors, rollout strategies, optimizers, schedulers, and RL algorithms by static source inspection.
- Build dry-run LeRobot commands from structured MCP arguments.
- Run LeRobot commands as foreground calls or managed background jobs.
- Inspect LeRobot dataset metadata without importing heavy robotics dependencies at MCP startup.
- Inspect policy/model repo metadata for observation, image, state, and action contract hints.
- Optionally use Hub auth from your existing environment.
- Convert robotics datasets into LeRobot-compatible formats.
- Search datasets by robot, format, task, size, episode count, and compatibility hints.
Install
From PyPI:
uv tool install lerobot-mcp
From a checkout:
git clone https://github.com/noah-wardlow/lerobot-mcp.git
cd lerobot-mcp
uv sync --extra dev
With Docker:
docker build -t lerobot-mcp .
docker run -i --rm lerobot-mcp
The image runs the MCP server over stdio, so any MCP client can launch it with
docker run -i --rm lerobot-mcp as the command.
MCP Quick Start
Most users should use the LeRobot checkout they already have. Start your MCP client from inside that
checkout, set LEROBOT_ROOT=/path/to/lerobot in the MCP server environment, or ask the agent to find
and select a checkout with lerobot_find_lerobot_roots and lerobot_use_lerobot_root.
If no checkout is found, LeRobot-backed tools lazily prepare a managed fallback at
~/.cache/lerobot-mcp/lerobot with Python 3.12 and LeRobot's dataset extra. That fallback covers
dataset metadata, format conversion, and common command help without requiring a separate setup step.
Advanced install controls:
- Set
LEROBOT_ROOT=/path/to/lerobotto use a specific checkout. - Set
LEROBOT_MCP_LEROBOT_PYTHON=3.13to use a different Python when preparing the managed fallback. - Set
LEROBOT_MCP_LEROBOT_EXTRAS=dataset,core_scriptsto install more LeRobot extras by default. - Set
LEROBOT_MCP_AUTO_SETUP=0to disable the managed fallback.
Codex
Recommended:
codex mcp add lerobot-mcp -- lerobot-mcp
Manual fallback:
[mcp_servers.lerobot_mcp]
command = "lerobot-mcp"
startup_timeout_sec = 20
tool_timeout_sec = 3600
Restart Codex, run /mcp, then ask: "List LeRobot commands."
Claude Code
claude mcp add lerobot-mcp -- lerobot-mcp
From a checkout:
claude mcp add lerobot-mcp -- /path/to/lerobot-mcp/.venv/bin/lerobot-mcp
Restart Claude Code, run /mcp, then ask: "Show lerobot_capabilities."
Resolution order is: LEROBOT_ROOT, current project ancestors, managed checkout
~/.cache/lerobot-mcp/lerobot, ~/hrl/lerobot, then an installed lerobot package.
Tool Model
The server does not expose arbitrary shell execution. It only runs:
- LeRobot entry points discovered from the configured checkout or installed distribution, such as
lerobot-train,lerobot-eval,lerobot-record,lerobot-replay,lerobot-annotate,lerobot-rollout, and hardware setup utilities. - Python scripts inside the configured LeRobot checkout's
examples/directory. - Dataset conversion helpers exposed by this MCP server.
Options are passed as structured key/value pairs and serialized to draccus-compatible arguments:
{
"command": "train",
"options": {
"policy.type": "act",
"dataset.repo_id": "lerobot/aloha_mobile_cabinet"
}
}
That becomes:
uv run lerobot-train --dataset.repo_id=lerobot/aloha_mobile_cabinet --policy.type=act
Main MCP Tools
lerobot_server_config: show resolved LeRobot root, uv usage, and managed Python/extras.lerobot_find_lerobot_roots,lerobot_use_lerobot_root: find an existing LeRobot checkout and use it for the current MCP session.lerobot_install_or_update_lerobot: clone or update LeRobotmaininto the managed checkout and prepare itsuvenvironment.lerobot_list_commands: list discovered LeRobot console scripts.lerobot_capabilities: audit current LeRobot commands, extras, examples, and registered components.lerobot_command_help: run--helpfor a discovered LeRobot command.lerobot_list_examples: list runnable examples in the checkout.lerobot_build_command: dry-run a command from structured options.lerobot_run_command: run a known LeRobot entry point.lerobot_run_example: run an example script underexamples/.lerobot_list_jobs,lerobot_job_status,lerobot_job_logs,lerobot_cancel_job: manage background jobs.lerobot_inspect_dataset_metadata: summarize metadata for a local or Hub dataset.lerobot_hf_search_datasets: search datasets by robot, format, size, task, tags, and demo fit.lerobot_inspect_policy_repo: inspect a Hugging Face policy/model repo for config files, weights, policy type, dataset/robot hints, FPS, and declared observation/action features.lerobot_convert_dataset_to_latest_format: convert LeRobot v2.1 datasets to the current v3.0 parquet layout.
LeRobot Dataset Format Migration
Latest LeRobot main currently uses the v3.0 parquet layout. The upstream converter supports v2.1
datasets and rewrites them to:
data/chunk-*/file_*.parquetvideos/<camera>/chunk-*/file_*.mp4meta/tasks.parquetmeta/episodes/chunk-*/file_*.parquet- aggregate
meta/stats.json, with per-episode stats flattened into the episode parquet metadata
Preview a conversion:
{
"repo_id": "lerobot/berkeley_autolab_ur5",
"root": "/tmp/berkeley_autolab_ur5",
"force_conversion": true
}
Run it as a background job:
{
"repo_id": "lerobot/berkeley_autolab_ur5",
"root": "/tmp/berkeley_autolab_ur5",
"force_conversion": true,
"background": true,
"push_to_hub": false
}
push_to_hub defaults to false. For Hub datasets that already have a v3.0 tag, omit
force_conversion to let the upstream script reuse the latest compatible version. Older branches such
as v1.x or v2.0 need to be brought to v2.1 before using this converter.
Dataset Search
Search is intended to help a user find datasets that fit their robot, computer, and target format. It can combine Hub results with locally configured registry metadata.
Example MCP arguments:
{
"query": "pusht",
"robot": "aloha",
"format": "lerobot",
"max_size_gb": 10,
"demo_suitable": true,
"sort": "lastModified",
"limit": 5
}
Results include source, repo id, detected format, robot hints, tags, scale when known, popularity signals, and conversion hints.
For offline or deterministic tests, set FORGE_REGISTRY_PATH to a local datasets.json registry.
Policy Repo Inspection
Use policy inspection before wiring a real browser or simulator rollout. It does not import LeRobot or run inference; it reads Hub repo metadata and lightweight JSON config files.
Example MCP arguments:
{
"repo_id": "username/my-policy",
"include_raw_configs": false
}
The result includes config/weight file presence, policy type, dataset and robot hints, FPS, declared
input/output features, and classified image_keys, state_keys, and action_keys. Clients can use
that to map camera captures and state vectors before starting an inference server.
Development
uv sync --extra dev
uv run ruff check .
uv run mypy
uv run pytest -vv
Run against latest LeRobot main:
cd /path/to/lerobot
git checkout main
git pull --ff-only origin main
cd /path/to/lerobot-mcp
LEROBOT_ROOT=/path/to/lerobot uv run lerobot-mcp
Build the package:
uv build
This repository is Apache-2.0 licensed.
Project details
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 lerobot_mcp-0.1.7.tar.gz.
File metadata
- Download URL: lerobot_mcp-0.1.7.tar.gz
- Upload date:
- Size: 96.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a256501655b8e5cd8bd56e1e26c8bcb7bf70505c2c8ba5f73e7d58b488aac05
|
|
| MD5 |
d186d16daa96d330e4f50f4dfc7e6f2f
|
|
| BLAKE2b-256 |
77fe4c90cbe6fa151975978e1afa1c41167df12c38a43124f649211a5a7d715d
|
Provenance
The following attestation bundles were made for lerobot_mcp-0.1.7.tar.gz:
Publisher:
publish.yml on noah-wardlow/lerobot-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lerobot_mcp-0.1.7.tar.gz -
Subject digest:
3a256501655b8e5cd8bd56e1e26c8bcb7bf70505c2c8ba5f73e7d58b488aac05 - Sigstore transparency entry: 2018257891
- Sigstore integration time:
-
Permalink:
noah-wardlow/lerobot-mcp@8e33cb1072d98893694bab039dbfb571b37fc0b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/noah-wardlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8e33cb1072d98893694bab039dbfb571b37fc0b1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lerobot_mcp-0.1.7-py3-none-any.whl.
File metadata
- Download URL: lerobot_mcp-0.1.7-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb745de8a04415aee4a96aa86a7becbfbc5bd4724d0bfd1a70860d0187539516
|
|
| MD5 |
2e4e636d5b7f38c6dd4ea023f7eff0cc
|
|
| BLAKE2b-256 |
53ec33c110833e8bcb074979813d0f07f9e26a7e51a80e805326e9d32cd53aee
|
Provenance
The following attestation bundles were made for lerobot_mcp-0.1.7-py3-none-any.whl:
Publisher:
publish.yml on noah-wardlow/lerobot-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lerobot_mcp-0.1.7-py3-none-any.whl -
Subject digest:
bb745de8a04415aee4a96aa86a7becbfbc5bd4724d0bfd1a70860d0187539516 - Sigstore transparency entry: 2018257964
- Sigstore integration time:
-
Permalink:
noah-wardlow/lerobot-mcp@8e33cb1072d98893694bab039dbfb571b37fc0b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/noah-wardlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8e33cb1072d98893694bab039dbfb571b37fc0b1 -
Trigger Event:
push
-
Statement type: