mcp
connect to https://botblocks.dev/mcp and complete browser consent, or use http://localhost:6675/mcp with a local host. the workspace agent uses these same tools.
the examples below are tool arguments, not python calls. use your mcp client's tool discovery to see their schemas and the available docs topics. for example, call docs with {"topic":"dashboard/robot json"} for the robot format, or {"topic":"capabilities/overview"} for the interface comparison.
processes and scripts
proc_create runs an optional python script, with size set to small, medium, or gpu. without a script it starts an empty mujoco environment. proc_connect connects to an existing process. both return process/environment handles and a workspace url.
use script_show, script_overwrite, script_use_boilerplate, and script_deploy to edit and run. proc_poll_state includes output, metrics, and live environments; env_poll_state includes scene objects, current task, and the latest physics frame. proc_stop stops the process and its environments.
pass proc and env explicitly when multiple candidates exist. env_select resolves an environment handle; it does not change a remembered selection. clients may supply x-botblocks-proc and x-botblocks-env headers as request defaults.
imports
robot_import accepts either url or files, plus a destination save. file uploads contain actual base64 bytes and relative paths, with entry identifying the definition:
{
"save": "my-project/robot",
"entry": "urdf/robot.urdf",
"files": [
{"path": "urdf/robot.urdf", "data": "<base64 definition bytes>"},
{"path": "meshes/body.stl", "data": "<base64 mesh bytes>"}
]
}replace the placeholders with base64-encoded file contents. the remote server cannot read local filesystem paths. the client must read and upload every required file. the cli bundles local directories automatically. robot definitions can be json, urdf, xacro, or mjcf; see projects for the shared subsystem format. mjcf url imports currently require github.
create the destination project first with project_create and {"name":"my-project"}. imports need write access and replace an existing robot at the same save path. importing saves a reusable definition; to simulate it, run a script containing Robot('my-project/robot') in an environment.
asset_put accepts project, name, and exactly one of url or data (base64 bytes). pass the returned uploadedAge as expectedAge on the next save to detect stale edits. glb uploads generate collision meshes. asset_list and asset_delete manage them.
cameras and recording
world_snap returns a png image through the regular camera renderer. it accepts proc, env, and optional pos, target, fov (degrees), w, and h:
{"proc":"...","env":"...","pos":[1,-1,1],"target":[0,0,0.1],"w":640,"h":480}defaults match the workspace view: position [1.43,-0.78,0.55], target [0.05,0,0.1], fov 40, resolution 480×360. no robot camera or visible workspace is required. a local host needs chrome/chromium; hosted containers already include it.
replay_record takes proc, env, and action: start, status, or stop. start replaces the current recording; status reports recording state and event/snapshot counts; stop saves a compressed replay and returns its download url and host-local path.
recording uses the existing viewer recorder. it captures scene motion, metrics, and requested camera snapshots, including world snapshots. it does not continuously capture camera video. stop recording before stopping the process, then download the result while the host is available. open the file at /replay to scrub motion, cameras, and metrics. robot and asset geometry is loaded from its project paths during playback.
a typical sequence is proc_create → replay_record(action="start") → robot control and snapshots → replay_record(action="stop") → download → proc_stop. pass the returned proc and env to each applicable call. the download url is a saved file on that host, not a permanent project asset.
live robot tools
subsystem_list discovers exact names, signatures, and descriptions. subsystem_call invokes one with keyword args. built-in tools cover servo target/read/velocity, encoder read/velocity, motor power, differential drive, arm move/goto/lineto/describe, and camera images. custom subsystem methods whose docstrings begin with [tool] are exposed too.
use python scripts for reset, exact stepping, imu observations, training, and evaluation. configure physics with MujocoEnv(..., timestep=...) or GymEnv(..., timestep=...).
projects and catalog
project_list, project_create, project_delete, and project_share manage projects. robot_list, fetch_robot, robot_copy, robot_rename, and robot_delete manage robots. fetch_gallery lists menagerie robots. docs reads sections from these same documentation pages.