Claude Code can launch Cua Driver as a local stdio MCP server, giving Claude direct access to the 54 computer-use tools that Cua Driver exposes. This page covers the one-command registration path, the computer-use compatibility profile for Claude’s built-in computer-use tool format, and how to use the Claude Agent SDK for programmatic agent loops.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/trycua/cua/llms.txt
Use this file to discover all available pages before exploring further.
Register Cua Driver with Claude Code
After installing Cua Driver, register it as an MCP server with a single command:CuaDriver.app daemon that owns Accessibility and Screen Recording permission must be running before you start the session.
To generate an absolute-path command that matches your installed Cua Driver version exactly, run:
claude mcp add invocation with the resolved executable path, which is useful when cua-driver is not on the default shell PATH that Claude Code inherits.
On macOS, bare
cua-driver mcp proxies to the installed CuaDriver.app daemon so Accessibility and Screen Recording grants retain the app-bundle identity. On Windows and Linux, the MCP process owns its runtime directly and shuts it down when stdin closes.Computer-use compatibility mode
Claude Code also supports Claude’s built-in computer-use tool format. Register the compatibility profile under a separate server name:screenshot: in compatibility mode screenshot requires pid and window_id and captures that specific window only. The mcp__cua-computer-use__screenshot tool name is the image-grounding cue that Claude Code uses for its vision/computer-use-style flow.
Claude Agent SDK integration
The Claude Agent SDK supports Cua Driver through two routes: same-process native callbacks and the external MCP boundary. The native route is best for applications that own the driver lifecycle; the MCP route is best when Claude is an external agent.Prerequisites
Fromlibs/cua-driver/examples/agent-sdks:
- Python
- TypeScript
ANTHROPIC_API_KEY environment variable.
Native callbacks route
The native route runs the driver in the same process as your application. The SDK’s in-process MCP server adapter callsCuaDriver.create() directly — no subprocess or socket involved.
- Python
- TypeScript
observe_desktop, click_desktop, type_text, and press_key. Every mutation returns a fresh desktop observation. If a call times out, the handler labels its outcome unknown and instructs the model to inspect before retrying.
MCP route
The MCP route runscua-driver mcp as an external subprocess. Claude discovers the full live tool catalog at runtime.
- Python
- TypeScript
Practical example: drive Calculator
Once registered, ask Claude Code to perform a desktop task using natural language:launch_app to open Calculator, get_window_state to read the accessibility tree, click to press the digit and operator keys, and get_window_state again to verify the displayed result.