MCP tools

The two MCP servers ALE exposes over the sandbox, tool by tool. Both are thin wrappers over the cua computer-server: vm_mcp_server is the CLI / system surface, cua_mcp_server is the GUI / desktop surface. An out-of-sandbox agent drives the machine through both; an in-sandbox agent has a native shell and takes only the GUI one. (See Agents & executor for how they're consumed.)

vm_mcp_server: CLI & system

One-shot shell, file I/O, clipboard, and persistent PTY sessions. A thin set of primitives: agents build their own higher-level tools on top.

ToolParametersReturns
run_commandcommand; timeout? (s){exit_code, stdout, stderr} (text + structured). Blocking; no shell state persists between calls.
read_textpathThe file's full UTF-8 contents.
write_textpath, content"Wrote N bytes to {path}" (overwrites).
read_bytespath; offset?=0, length?Base64 of the bytes (range-readable).
write_bytespath, content_b64; append?=false"Wrote bytes to {path}".
read_clipboard(none)The clipboard's text.
write_clipboardtext"Set clipboard (N bytes)".
pty_startcommand? (default bash), cwd?, env?, cols?=80, rows?=24"pid: N …", opens a persistent PTY that buffers output.
pty_inputpid, data (incl. \n, ctrl chars)"Sent N bytes to pid {pid}".
pty_readpid; timeout_ms?=2000Buffered raw output since last read, tagged [running] or [exited, code N].
pty_resizepid, cols, rows"Resized pid {pid} to {cols}x{rows}".
pty_killpid"Killed pid {pid}".

cua_mcp_server: GUI & desktop

Mouse, keyboard, scroll, and screen capture. Coordinates are normalized to [0, 1000] on both axes (the server scales to real pixels). Every action returns a one-line confirmation: take a screenshot to observe the result.

ToolParametersReturns
keykeys[] (e.g. ["ctrl","c"])"Pressed: ctrl+c", press & release.
key_downkeys[]"Key down: …", hold (pair with key_up).
key_upkeys[]"Key up: …".
hold_keykeys[], duration (s)"Held … for Ns".
typetext"Typed: \"…\"", into the focused field.
mouse_movecoordinate [x,y]"Moved cursor to [x, y]".
clickcoordinate?; button?=left, clicks?=1 (1–3)"Clicked (left, 1x) at [x, y]".
dragcoordinate (end); start_coordinate?, button?=left"Dragged (left) from … to [x, y]".
mouse_downbutton?=left"Mouse down: left".
mouse_upbutton?=left"Mouse up: left".
scrolldirection, amount; coordinate?"Scrolled down 3 at [x, y]".
waitduration (s)"Waited Ns".
screenshotsave_path?Text + an image content block (PNG base64); optionally also saved to save_path on the VM.
cursor_position(none)"Cursor at [x, y]" (normalized).
get_screen_size(none){width, height} in real pixels (text + structured).
No MCP? Plugins
OpenClaw can't load MCP servers, so it receives the same two action spaces as a native plugin instead: same tools, different packaging.