Windows-first Webots developer toolkit with CLI, MCP server, controller SDK, and bundled benchmarks.
Project description
webots-mcp-kit
webots-mcp-kit is a Windows-first developer toolkit for connecting LLM agents to Webots.
It combines:
- a pip-installable CLI
- an MCP server with Webots session tools
- a controller-side SDK for structured telemetry and manual overrides
- bundled example scenarios and benchmarks
The bundled line follower is not the product itself. It is the first reference example. The toolkit is meant to be reusable across other Webots robots, controllers, and worlds.
Current release
v0.9.0
Current focus:
- Windows-first local development
- Webots
R2025a - direct Webots integration without ROS2
- stable controller-side integration through
ControllerAgent - bundled scenarios plus registry-backed benchmark thresholds
- hosted-safe CI with separate self-hosted runtime smoke
- release pipeline for GitHub Release, TestPyPI, and PyPI
- public-contract regression coverage and external-user onboarding
Bundled scenarios
line-follower- camera-based line tracking
- example world:
examples/line-follower
obstacle-avoidance- proximity-sensor obstacle avoidance
- example world:
examples/obstacle-avoidance
waypoint-nav- fixed-waypoint navigation in an open arena
- example world:
examples/waypoint-nav
Install
Use an isolated virtual environment. The toolkit depends on mcp, which may pull shared web stack packages into your global Python install.
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install webots-mcp-kit
Development install:
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -e .[dev]
Optional CI or slow-machine tuning:
$env:WEBOTS_KIT_SESSION_START_TIMEOUT='90'
Quick start
webots-kit doctor
webots-kit benchmark list
webots-kit benchmark run line-follower --controller example --output .\report.json --duration-s 3
webots-kit benchmark report .\report.json
For an interactive session:
webots-kit session start --scenario line-follower --controller example --mode fast --render off
webots-kit session inspect --session <session-id>
webots-kit session logs --session <session-id>
webots-kit session stop --session <session-id>
For a custom controller scaffold:
webots-kit controller scaffold .\controllers\my_agent.py --scenario line-follower
webots-kit controller validate .\controllers\my_agent.py --scenario line-follower --strict --json
To expose the toolkit as an MCP server:
webots-kit mcp serve
CLI surface
webots-kit doctor [--json]webots-kit session start --scenario <name> --world <path> --controller <path-or-id> [--robot-name <name>] [--robot-def <def>] [--mode fast|realtime|pause] [--render on|off]webots-kit session inspect --session <id>webots-kit session logs --session <id> [--name <file>] [--tail <n>]webots-kit session stop --session <id>webots-kit benchmark listwebots-kit benchmark run <scenario> --controller <path-or-id> --output <report.json> [--duration-s <seconds>]webots-kit benchmark report <report.json>webots-kit controller validate <path> [--scenario <name>] [--strict] [--json]webots-kit controller scaffold <path> [--scenario <name>] [--force]webots-kit mcp serve
Controller integration
There are two supported usage paths:
- bundled example controllers under
examples/ - user-supplied Python controllers that integrate with
ControllerAgent
The public controller-side entrypoint is ControllerAgent.
The stable public contract is:
ControllerAgent.from_robot(...)begin_step()report_step(...)
Minimal integration shape:
from controller import Robot
from webots_mcp_kit.agent import ControllerAgent
robot = Robot()
agent = ControllerAgent.from_robot(robot, default_camera="camera")
while robot.step(int(robot.getBasicTimeStep())) != -1:
override = agent.begin_step()
# apply your control logic, optionally overriding wheel commands
agent.report_step(
sensors={},
metrics={},
actuators={},
camera_frames=None,
)
Use webots-kit controller validate <path> to check whether a controller follows the expected integration pattern.
Use webots-kit controller scaffold when you want a working starter file based on a bundled scenario.
MCP tools
webots_session_startwebots_session_stopwebots_list_robotswebots_list_deviceswebots_get_statewebots_get_sensorswebots_capture_camerawebots_set_motor_velocitywebots_stepwebots_pause_resumewebots_resetwebots_run_benchmark
Stable payload shapes:
webots_list_devices -> { robot, scenario, devices }webots_get_sensors -> { robot, scenario, state, sensors, metrics, actuators, meta }
Reference docs:
- First hour guide
- MCP contracts
- Self-hosted runtime smoke
- Custom controller integration
- Add a new scenario
- Failed runtime smoke triage
- PyPI install and upgrade
- Release checklist
- Runner maintenance
- Packaging verification
Testing
Unit tests:
python -m pytest -q
Hosted-safe smoke tests:
$env:WEBOTS_KIT_RUN_SMOKE='1'
python -m pytest -q -k mcp_tool_list_smoke
Full runtime smoke tests with real Webots execution:
$env:WEBOTS_KIT_RUN_RUNTIME_SMOKE='1'
python -m pytest -q -k "session_start_inspect_stop_smoke or benchmark_smoke"
The self-hosted GitHub workflow for runtime smoke expects a Windows runner labeled webots.
The self-hosted runtime workflow also auto-triggers for runtime-affecting changes and still supports manual dispatch.
Packaging and release verification are handled by GitHub workflows:
Packaging CIRelease
Troubleshooting
- If
doctorfails, ensureWEBOTS_HOMEis set or Webots is installed inC:\Program Files\Webots. - If MCP or session startup closes immediately, inspect
session logsfor the session artifacts. - If package installation changes global Python web dependencies, recreate a dedicated virtual environment and reinstall there.
- GitHub-hosted
windows-latestrunners are only used for unit tests,doctor, and MCP handshake smoke. Real Webots runtime smoke is exposed as a separate manual workflow for self-hosted Windows runners with Webots installed. - Runtime-affecting changes now also path-trigger the self-hosted runtime workflow when the
webotsrunner is available. examples/contains runnable demo assets; benchmark thresholds and pass/fail logic live in the benchmark registry inside the toolkit code.- Wheel installs use bundled package-local scenario assets; source checkouts continue to use repo-local
examples/.
Project details
Release history Release notifications | RSS feed
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 webots_mcp_kit-0.9.8.tar.gz.
File metadata
- Download URL: webots_mcp_kit-0.9.8.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa68deec9534eb2898d204ec8a1c9f0d474c488e4803bb20dcd4c9d2171f2820
|
|
| MD5 |
f968cf7f71e6d1ee2fbf4d55c40ee834
|
|
| BLAKE2b-256 |
7f854727b9ae04a8c87fd7682b8de7cbb6ad75f154e48778a497bc68d869dce4
|
Provenance
The following attestation bundles were made for webots_mcp_kit-0.9.8.tar.gz:
Publisher:
release.yml on RdaKA12/webots-mcp-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webots_mcp_kit-0.9.8.tar.gz -
Subject digest:
fa68deec9534eb2898d204ec8a1c9f0d474c488e4803bb20dcd4c9d2171f2820 - Sigstore transparency entry: 1214749416
- Sigstore integration time:
-
Permalink:
RdaKA12/webots-mcp-kit@a18c2fe20cad99c5f6d7ef00f92ffe52a5e8c116 -
Branch / Tag:
refs/tags/v0.9.8 - Owner: https://github.com/RdaKA12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a18c2fe20cad99c5f6d7ef00f92ffe52a5e8c116 -
Trigger Event:
push
-
Statement type:
File details
Details for the file webots_mcp_kit-0.9.8-py3-none-any.whl.
File metadata
- Download URL: webots_mcp_kit-0.9.8-py3-none-any.whl
- Upload date:
- Size: 42.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f51584702057287516ba5c3cf67013d6dd9e54aafa13eb0227013871979aef68
|
|
| MD5 |
c804aa55362dd7bc2d1d2d16fa3b4952
|
|
| BLAKE2b-256 |
c99ee8bb01194e01f5f9c9b33b1629d9e32845fbd99bdb4f3611a21250020291
|
Provenance
The following attestation bundles were made for webots_mcp_kit-0.9.8-py3-none-any.whl:
Publisher:
release.yml on RdaKA12/webots-mcp-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webots_mcp_kit-0.9.8-py3-none-any.whl -
Subject digest:
f51584702057287516ba5c3cf67013d6dd9e54aafa13eb0227013871979aef68 - Sigstore transparency entry: 1214749472
- Sigstore integration time:
-
Permalink:
RdaKA12/webots-mcp-kit@a18c2fe20cad99c5f6d7ef00f92ffe52a5e8c116 -
Branch / Tag:
refs/tags/v0.9.8 - Owner: https://github.com/RdaKA12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a18c2fe20cad99c5f6d7ef00f92ffe52a5e8c116 -
Trigger Event:
push
-
Statement type: