lerobot-mcp
The server exposes MCP tools for managing LeRobot checkouts, discovering and running LeRobot commands/examples, handling background jobs, inspecting/searching datasets and HF repos, and converting datasets/Forge formats.
Configure/show server and LeRobot checkout paths.
Install or update a LeRobot checkout.
List commands, capabilities, examples, and public symbols; get command help.
Build/preview and run LeRobot commands or example scripts.
Start, list, inspect logs/status, and cancel background jobs.
Inspect LeRobot dataset metadata from local paths or HF repos.
Search HF datasets by robot, format, task, size, tags, etc.
Get HF account and repo info.
Preview/run official LeRobot v2.1→v3.0 dataset conversion.
Preview/run pinned Forge dataset inspection and conversion to/from LeRobot-compatible formats.
Allows searching and inspecting datasets from the Hugging Face Hub, including metadata, robot types, formats, and conversion hints.
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., "@lerobot-mcp Install LeRobot and list available commands"
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.
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.
Validated against LeRobot v0.6.1 and current main source contracts. Dataset metadata tools
require LeRobot 0.6.1 or newer. The MCP stays lightweight; LeRobot runs in its own environment.
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.
Inspect current policy pre/postprocessor pipelines, normalization mappings, and referenced state files.
Pass nested camera configs, episode lists, and feature mappings directly as JSON options.
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.
Related MCP server: Hugging Face MCP Server
Install
From PyPI:
uv tool install lerobot-mcpFrom a checkout:
git clone https://github.com/noah-wardlow/lerobot-mcp.git
cd lerobot-mcp
uv sync --extra devWith Docker:
docker build -t lerobot-mcp .
docker run -i --rm lerobot-mcpThe 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.
Training requires the training extra, hardware workflows require core_scripts, and evaluation
requires evaluation plus the chosen policy/environment extras. Use lerobot_capabilities to inspect
the extras declared by your selected checkout; command discovery does not imply its extras are installed.
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-mcpManual fallback:
[mcp_servers.lerobot_mcp]
command = "lerobot-mcp"
startup_timeout_sec = 20
tool_timeout_sec = 3600Restart Codex, run /mcp, then ask: "List LeRobot commands."
Claude Code
claude mcp add lerobot-mcp -- lerobot-mcpFrom a checkout:
claude mcp add lerobot-mcp -- /path/to/lerobot-mcp/.venv/bin/lerobot-mcpRestart 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=actLists and objects are JSON-encoded as a single argument, without shell quoting:
{
"command": "record",
"options": {
"robot.type": "so101_follower",
"robot.cameras": {"front": {"type": "opencv", "index_or_path": 0, "fps": 30}},
"dataset.repo_id": "username/demo"
}
}This is an argument-format example; hardware workflows also need your robot port and calibration.
A top-level JSON null retains the existing bare-flag behavior (--flag). Use the string "null"
to pass an explicit draccus null (--key=null). Nulls inside lists and objects remain JSON nulls.
lerobot_command_help also accepts options, such as {"policy.type": "act"}, to request the
scoped help introduced by current LeRobot versions.
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. Includes package version, Python requirement, dataset format version, and checkout commit.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. Acceptsrepo_type: "bucket"for HF Storage Buckets; returns total frames and camera/depth keys.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_*.parquetaggregate
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.
Current checkpoints use policy_preprocessor.json and policy_postprocessor.json, with optional
per-step safetensors state. Inspection returns both pipeline configs, referenced state files, missing
processor artifacts, normalization mappings, and declared action/chunk settings. Processor tensors
are excluded from model weights, and policy features take precedence over saved training configs.
All config downloads use the commit from the repo listing; download/JSON errors are returned in
config_errors instead of silently producing an incomplete contract.
Load and apply both processors for inference, and reset the policy and processors at episode boundaries. Missing pipelines may indicate a legacy checkpoint requiring upstream normalization migration, or custom filenames requiring explicit inspection. These checks inspect declarations; they do not establish joint order, action units, successful model loading, or physical robot compatibility.
Development
uv sync --extra dev
uv run ruff check .
uv run mypy
uv run pytest -vvCI also checks source contracts against v0.6.1 and main, without installing ML dependencies.
To exercise the real dataset/CLI runtime locally after installing LeRobot's dataset extra:
LEROBOT_CONTRACT_ROOT=/path/to/lerobot LEROBOT_CONTRACT_RUNTIME=1 \
uv run pytest tests/test_upstream_contract.py -vvThis creates a tiny local v3 dataset, finalizes it, inspects metadata, and checks CLI help. It does not access hardware or upload data.
Version 0.2.0 uses the official MCP Python SDK 2.2 (MCPServer), with matching mcp-types resolved by
the SDK. Stdio tests cover the 2026-07-28 discovery protocol and the 2025-11-25 initialization
protocol. Tool names and argument/result payloads are preserved, with additive contract fields.
Synchronous tools run on worker threads; checkout setup/selection and background job state are
protected for concurrent calls. Expected validation/setup errors remain visible to clients, and
server discovery reports the lerobot-mcp package version.
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-mcpBuild the package:
uv buildThis repository is Apache-2.0 licensed.
Available Tools
25 toolslerobot_build_commandB
Preview a known LeRobot entry point command without running it.
Inputs: command (required), options, extra_args, cwd, +1 more. Returns: object
lerobot_build_dataset_latest_format_convertB
Preview LeRobot's official v2.1 -> current v3.0 parquet dataset conversion command.
Inputs: repo_id (required), root, branch, data_file_size_in_mb, +4 more. Returns: object
lerobot_build_exampleB
Preview a LeRobot example script command without running it.
Inputs: example_path (required), options, extra_args, use_uv. Returns: object
lerobot_build_forge_convertC
Preview pinned Forge dataset conversion to or from LeRobot-compatible formats.
Inputs: source (required), output (required), target_format, source_format, +8 more. Returns: object
lerobot_build_forge_inspectD
Preview pinned Forge dataset inspection.
Inputs: path (required), format, output, quick, +2 more. Returns: object
lerobot_cancel_jobC
Terminate a background job.
Inputs: job_id (required). Returns: object
lerobot_capabilitiesA
List LeRobot scripts, extras, examples, and registered components from the current checkout.
Inputs: no named parameters. Returns: object
lerobot_command_helpB
Run --help for any discovered LeRobot console command.
Inputs: command (required), timeout_seconds, use_uv. Returns: object
lerobot_convert_dataset_to_latest_formatA
Convert a LeRobot v2.1 dataset to the current v3.0 parquet layout.
Defaults to local/no-push behavior. Set force_conversion=true to convert from v2.1 even when a
v3.0 tag already exists. Older Hub branches such as v1.x/v2.0 must first be migrated to v2.1.
Inputs: repo_id (required), root, branch, data_file_size_in_mb, +7 more. Returns: object
lerobot_forge_convertC
Run pinned Forge dataset conversion. Uses Forge main at the pinned bug-fix commit.
Inputs: source (required), output (required), target_format, source_format, +11 more. Returns: object
lerobot_forge_inspectC
Inspect a dataset with pinned Forge, useful before conversion.
Inputs: path (required), format, output, quick, +5 more. Returns: object
lerobot_hf_repo_infoC
Return basic Hugging Face Hub repository information.
Inputs: repo_id (required), repo_type, revision. Returns: object
lerobot_hf_search_datasetsB
Search robotics datasets by robot, format, scale, size, task, and compatibility hints.
Inputs: query, robot, format, min_episodes, +12 more. Returns: result
lerobot_hf_whoamiA
Return the Hugging Face account visible to huggingface_hub.
Inputs: no named parameters. Returns: object
lerobot_inspect_dataset_metadataC
Summarize LeRobot dataset metadata from a local path or Hugging Face dataset repo.
Inputs: repo_id (required), root, revision, force_cache_sync, +2 more. Returns: object
lerobot_install_or_update_lerobotB
Clone or fast-forward update a LeRobot checkout, then refresh this MCP server's config.
Inputs: root, ref, timeout_seconds. Returns: object
lerobot_job_logsC
Return stdout and stderr tails for a background job.
Inputs: job_id (required). Returns: object
lerobot_job_statusA
Return state, return code, and output tails for a background job.
Inputs: job_id (required). Returns: object
lerobot_list_commandsB
List supported command names and discovered LeRobot console scripts.
Inputs: no named parameters. Returns: object
lerobot_list_examplesC
List Python example scripts under the configured LeRobot checkout.
Inputs: category. Returns: result
lerobot_list_jobsA
List background jobs started during this MCP server process.
Inputs: no named parameters. Returns: result
lerobot_public_symbolsA
List public classes/functions below a LeRobot module prefix by static source inspection.
Inputs: module_prefix, limit. Returns: result
lerobot_run_commandC
Run a known LeRobot entry point as a foreground call or managed background job.
Inputs: command (required), options, extra_args, cwd, +4 more. Returns: object
lerobot_run_exampleC
Run a Python script from LeRobot's examples directory.
Inputs: example_path (required), options, extra_args, timeout_seconds, +3 more. Returns: object
lerobot_server_configA
Return resolved server configuration and LeRobot checkout paths.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
Each tool has a distinct purpose, with clear differentiation between preview (build_*) and execution (run_*) commands, as well as separate utilities for Hugging Face, job management, and configuration. Overlapping verbs like 'build' and 'run' are disambiguated by their noun suffixes.
All tools share the 'lerobot_' prefix, and most follow a 'verb_noun' pattern (e.g., build_command, run_example). Minor deviations exist (lerobot_capabilities, lerobot_public_symbols) but the overall pattern is consistent and predictable.
25 tools cover a wide range of LeRobot functionalities—installation, execution, dataset conversion, Hugging Face interaction, job management—without feeling excessive. The count is appropriate for the server's scope, though slightly higher than ideal.
The tool surface addresses core LeRobot workflows: running commands and examples, converting datasets, inspecting metadata, and managing background jobs. Missing upload or training tools are likely outside the intended scope, so the set feels reasonably complete.
Maintenance
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn unofficial MCP server that provides semantic search capabilities for Hugging Face models and datasets, enabling Claude and other MCP-compatible clients to search, discover, and explore the Hugging Face ecosystem using natural language queries.20MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that provides Hugging Face Hub API and Search endpoints through multiple transport protocols (STDIO, SSE, StreamableHTTP, and StreamableHTTPJson), enabling integration with AI model capabilities.325MIT
- AlicenseAqualityDmaintenanceAn MCP server for the Hugging Face Dataset Viewer API that enables searching, fetching, and filtering datasets on the Hugging Face Hub. It allows users to explore schemas, perform full-text searches, and analyze dataset statistics through natural language.10MIT
- FlicenseNot gradedqualityBmaintenanceMCP server for AI DevTool workflow, exposing tools and resources for code review, repository chat, and repository operations.1-