Cua Docs

Connect your agent to Cua Driver

Register Cua Driver as an MCP server so an agent can drive the host desktop.

cua-driver mcp runs Cua Driver as a stdio MCP server. Register it when you want an MCP-capable agent to drive the host desktop: installed apps, signed-in browser sessions, local files opened in apps, and the current OS user session.

This connects an agent to Cua Driver on the current machine. To create disposable cloud desktops, use Cua Sandbox instead.

Before you start#

Install Cua Driver and verify it can see the host desktop:

cua-driver --version
cua-driver call list_apps

On macOS, grant Accessibility and Screen Recording before connecting an agent:

cua-driver permissions status

See Install Cua Driver and macOS permissions for setup details.

Generate the client config#

Use mcp-config to print the registration command or JSON for a supported client:

cua-driver mcp-config --client <client>

The generated reference is the source of truth for the complete roster and exact command shapes: cua-driver mcp-config.

Claude Code#

Register the plain stdio server:

claude mcp add --transport stdio cua-driver -- cua-driver mcp
claude mcp list

Claude Code can also use Cua Driver's computer-use compatibility profile. Generate the current command:

cua-driver mcp-config --client claude

That profile exposes the same driver tools under the compatibility server name. It still runs Cua Driver over MCP; Anthropic's native computer-use API is separate.

Codex#

Print the Codex command:

cua-driver mcp-config --client codex

It emits a registration using the absolute installed binary path, which avoids PATH issues in app-launched Codex sessions:

codex mcp add cua-driver -- /Users/you/.local/bin/cua-driver mcp
codex mcp list

Restart Codex or open a fresh session after adding the server. For richer agent guidance, install the Cua Driver skill:

cua-driver skills install
cua-driver skills status

See Install the Cua Driver agent skill for the ClawHub and direct-install paths.

Cursor#

Generate the Cursor snippet:

cua-driver mcp-config --client cursor

Paste the JSON into ~/.cursor/mcp.json, or .cursor/mcp.json for project scope:

{
  "mcpServers": {
    "cua-driver": {
      "command": "cua-driver",
      "args": ["mcp"],
      "type": "stdio"
    }
  }
}

Restart Cursor and confirm cua-driver appears in the MCP server list.

Other supported clients#

mcp-config also prints the right shape for clients that use a config file or a different add command.

ClientGenerate withNotes
Antigravitycua-driver mcp-config --client antigravityPaste into ~/.gemini/config/mcp_config.json; --client gemini is a legacy alias.
OpenClawcua-driver mcp-config --client openclawNormal gateway-spawned MCP does not inherit OpenClaw.app's macOS permission grants; embedded hosts should use Embedding.
OpenCodecua-driver mcp-config --client opencodeConfigure a real MCP server so screenshots are preserved in image blocks.
Hermescua-driver mcp-config --client hermesPaste under mcp_servers and reload MCP servers in Hermes.
Picua-driver mcp-config --client piPi does not support MCP natively; use one-shot cua-driver call … commands from its shell.
Qwen Codecua-driver mcp-config --client qwenSupports both a CLI add command and ~/.qwen/settings.json.
Factory Droidcua-driver mcp-config --client droidSupports CLI and JSON config forms.
ZCodecua-driver mcp-config --client zcodeConfigure MCP in the GUI, or use zai mcp add for Z.ai's separate CLI.

Generic MCP JSON#

For any client that accepts the standard mcpServers shape, print the generic config:

cua-driver mcp-config

It returns:

{
  "mcpServers": {
    "cua-driver": {
      "command": "cua-driver",
      "args": ["mcp"]
    }
  }
}

After saving the config, restart the client and confirm the cua-driver server is connected.

Next steps#