Cua Driver

Operate native desktop apps and browsers in the background on macOS, Windows or Linux

By Cua Rust Browser automation

54 popularity score ★ 32k

What it does

Cua Driver is the MCP server in the trycua/cua repository, which also holds the Cua Spaces app and several other projects. It is a native Rust program. You start it as `cua-driver mcp` and it talks MCP over stdio, letting an agent inspect and operate desktop apps and browsers on all three major desktop systems. It reads each window through the platform's accessibility API plus a screenshot. From there it can click and type, and it also handles shortcuts, menu items, field values, drags and the clipboard.

Input goes to the target app in the background by default, so your own pointer and front window are left alone. If an app ignores background input, a call can ask for foreground delivery instead. There is also a Chromium side: the driver binds to a browser over CDP and handles page clicks and typing as well as select boxes, dialogs, uploads and downloads. Sessions can be recorded and replayed later. Several actions, or a whole JavaScript script, can run as one call. The driver calls no model of its own, since your agent client brings the model and the loop.

What the driver may do is fixed at startup by a permission mode. `standard` is the default and sends input to any app without prompting. `bounded` permits only what a capability manifest lists (tools, apps, files, browser origins), and `unrestricted` skips Cua's approval checks altogether.

The tools reference lists 67 tools, far more than the README mentions. Two details only show up in the source of release 0.38.0. An idle session expires after 300 seconds unless `CUA_DRIVER_RS_SESSION_IDLE_TTL_SECS` sets another value (runtime.rs). And an admin can set `CUA_DRIVER_DISABLE_UNRESTRICTED` so the driver refuses to start in unrestricted mode (authorization.rs).

What it needs

RuntimeA prebuilt binary
Also
  • A logged-in graphical desktop session
  • macOS 14+, Windows 10/11, or x86_64 Linux with X11 or XWayland and AT-SPI 2
  • macOS: Accessibility and Screen Recording granted to CuaDriver.app

Install the `cua-driver` binary with its own script: `/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"` on macOS and Linux, or `irm https://cua.ai/driver/install.ps1 | iex` in PowerShell. The general Cua installer (cua.ai/install.sh) leaves the driver unticked by default. Add it there with `sh -s -- --select cua-driver`, which also installs the `cua` CLI. On macOS, run `cua-driver permissions grant` to start CuaDriver.app and switch on both permissions in System Settings. `cua-driver mcp` then proxies to that daemon. Any MCP client works, such as Claude Code or Codex.

Limits

  • Platform Linux builds are x86_64 only. Native Wayland is experimental and stays off unless CUA_DRIVER_RS_ENABLE_WAYLAND=1 is set.
  • Early release KDE/KWin and Hyprland support is marked experimental, and generic GNOME or KDE Wayland is read-only for browsers.
  • Platform On macOS a raw `cua-driver serve` started outside CuaDriver.app is unsupported, as grants follow the app's identity.
  • Not covered Background input lands only where the app and toolkit accept it. Others refuse, and a call must ask for foreground delivery.
  • Not covered Apps that expose no accessibility elements (canvas, video) need a vision-capable model to target.
  • Limit The permission mode is fixed at launch. A running daemon must be restarted to change it.
  • Limit Sessions idle for 300 seconds expire by default (CUA_DRIVER_RS_SESSION_IDLE_TTL_SECS changes it).
  • Limit Attaching to a logged-in Chromium profile needs `--grant existing-profile` or approval from the host app.
  • Early release The history_status and history_query tools exist only in nightly macOS preview builds.
  • Limit The optional cua-perception extension used by parse_visual_regions is AGPL-3.0-only, not MIT.

Platform coverage varies: macOS needs Accessibility and Screen Recording and some background scroll and drag shapes refuse; on Linux, toolkits that reject synthetic background events refuse, native Wayland is opt-in with CUA_DRIVER_RS_ENABLE_WAYLAND=1, and KDE and Hyprland support is experimental. Apps that show no accessibility elements (canvas, video) need a vision-capable model. Attaching to a logged-in Chromium profile needs `--grant existing-profile`. The permission mode cannot be changed without restarting the daemon. The `history_status` and `history_query` tools exist only in nightly macOS preview builds. The optional perception extension is AGPL-3.0, not MIT.

Who it suits

Suits a developer who wants an agent to work real desktop apps on their own machine without taking over the screen, and who can grant the OS accessibility permissions. For unattended runs, start it in `bounded` mode with a reviewed manifest. If you only need web pages, a browser-only server covers less ground and asks for fewer grants. It is not an official server of Apple, Microsoft or any app it operates.

Tools 60 of 67

19 only read, 39 change things, 2 can delete or overwrite.

list_apps
List running and installed apps with their state
list_windows
List top-level windows, including minimised and hidden ones
launch_app changes
Start an app without bringing it to the front
kill_app deletes
Force-terminate a process by pid
bring_to_front changes
Activate an app and leave it in the foreground
set_window_frame changes
Move or resize one window and check the result
invoke_menu changes
Open an app menu path and pick its final item
get_window_state
Return a window's accessibility tree and, by default, a screenshot
get_accessibility_tree
Summarise running apps and visible windows with bounds and order
verify_state
Check stated conditions against one window
parse_visual_regions
Turn a stored capture into text and icon regions (needs the perception extension)
get_desktop_state
Capture the whole display
zoom
Return a padded, cropped JPEG of part of a window
click changes
Click an element or a point in a target app
double_click changes
Double-click an element or a point
right_click changes
Right-click an element or a point
drag changes
Press, move and release between two window points
scroll changes
Scroll inside a target app
move_cursor changes
Move the pointer to a point
mouse_button_down changes
Hold a mouse button down (Linux)
mouse_button_up changes
Release a held mouse button (Linux)
mouse_drag changes
Move a held mouse button to a new point (Linux)
parallel_mouse_drag changes
Run several drags at once on separate pointers (Linux)
type_text changes
Enter text into an element or the focused field
press_key changes
Press and release one key
hotkey changes
Press a key combination
set_value changes
Set an element's value directly
clipboard_read
List clipboard types and optionally return its text
clipboard_write deletes
Replace the clipboard with text, an image or a file
run_steps changes
Run several actions in order in one call, stopping at the first failure (formerly run_actions)
run_script changes
Run a JavaScript program that drives apps through the driver
page changes
Older browser tool kept for compatibility
get_browser_state
Inspect a bound browser without changing it
browser_prepare changes
Attach the browser tools to a browser
browser_navigate changes
Send a bound tab to an http, https or about URL
browser_click changes
Click a page element or point in a bound tab
browser_type changes
Type into a bound tab
browser_select changes
Choose an option in a page's select box without opening its popup
browser_pointer changes
Hover, scroll, drag or double/right-click in a bound tab
browser_dialog changes
Read or answer a page's alert, confirm or prompt dialog
browser_set_input_files changes
Attach local files to a page's file input
browser_download changes
Download a file from a page into an approved folder
start_session changes
Create or return a named session before acting
get_session
Read one session's status
list_sessions
List the sessions on this connection
end_session changes
End a session and run its cleanup
set_agent_cursor_enabled changes
Show or hide the on-screen agent cursor
get_agent_cursor_state
Report the agent cursor's theme, position and visibility
start_recording changes
Start recording the session's actions
stop_recording changes
Stop recording
get_recording_state
Report whether recording is on and where it writes
replay_trajectory changes
Replay the tool calls of a saved recording
install_ffmpeg changes
Install ffmpeg for video recording on Linux and Windows
install_extension changes
Preview or install an optional driver extension
check_permissions
Report macOS Accessibility and Screen Recording grant status
health_report
Run driver diagnostics in one call
check_for_update
Look on GitHub for a newer release on the saved channel
get_guide
Return usage guidance from the guide bundled with the driver
get_config
Show the driver's configuration
set_config changes
Change the driver's saved configuration

Similar servers