qwen-code/packages/cua-driver
2026-07-21 09:49:04 +00:00
..
docs chore(cua-driver): update version refs to 0.7.1 + add fix doc (#6616) 2026-07-09 14:43:58 +00:00
python feat(cua-driver): sync vendored cua-driver 0.6.8 → 0.7.0 (#6212) 2026-07-03 06:27:00 +00:00
rust fix(mcp): add opt-in model payload filtering (#7413) 2026-07-21 09:49:04 +00:00
scripts fix(mcp): add opt-in model payload filtering (#7413) 2026-07-21 09:49:04 +00:00
swift/App/CuaDriver feat(cua-driver): sync vendored cua-driver 0.6.8 → 0.7.0 (#6212) 2026-07-03 06:27:00 +00:00
test-harness fix(cua-driver): harden MCP tool reliability (#6968) 2026-07-15 15:40:31 +00:00
wayland-helper feat(cua-driver): sync vendored cua-driver 0.6.8 → 0.7.0 (#6212) 2026-07-03 06:27:00 +00:00
.gitignore feat(cua-driver): vendor qwen-cua-driver with opt-in 0–1000 relative coordinates (#5896) 2026-06-26 13:06:43 +00:00
.vendored-from feat(cua-driver): sync vendored cua-driver 0.6.8 → 0.7.0 (#6212) 2026-07-03 06:27:00 +00:00
.vendored-patches.md feat(cua-driver): sync vendored cua-driver 0.6.8 → 0.7.0 (#6212) 2026-07-03 06:27:00 +00:00
README.md fix(mcp): add opt-in model payload filtering (#7413) 2026-07-21 09:49:04 +00:00

Qwen Cua Driver

Cross-platform background computer-use driver for AI agents. Speaks MCP over stdio; drives native apps without stealing focus.

Based on trycua/cua with Qwen-specific extensions: relative-coordinate normalization (01000 space for Qwen-VL models), vendored patches, and qwen-code integration.

Installation

macOS / Linux

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/QwenLM/qwen-code/main/packages/cua-driver/scripts/install.sh)"

Windows (PowerShell)

irm https://raw.githubusercontent.com/QwenLM/qwen-code/main/packages/cua-driver/scripts/install.ps1 | iex

Pin a specific version

# macOS / Linux
CUA_DRIVER_RS_VERSION=0.7.3 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/QwenLM/qwen-code/main/packages/cua-driver/scripts/install.sh)"
# Windows
$env:CUA_DRIVER_RS_VERSION = "0.7.3"
irm https://raw.githubusercontent.com/QwenLM/qwen-code/main/packages/cua-driver/scripts/install.ps1 | iex

Note: After installation, restart your terminal or IDE for PATH changes to take effect.

Verify installation

qwen-cua-driver --version
# Expected: cua-driver 0.7.3

macOS permissions

macOS requires Accessibility and Screen Recording permissions:

# Grant permissions (launches the driver so the dialog attributes correctly)
qwen-cua-driver permissions grant

# Check status
qwen-cua-driver permissions status

Quick functional test

# List running apps
qwen-cua-driver call list_apps '{}'

# List available tools
qwen-cua-driver list-tools

MCP Configuration

Qwen Code

qwen mcp add --transport stdio cua-driver -- qwen-cua-driver mcp

With relative-coordinate normalization (recommended for Qwen-VL models):

qwen mcp add-json --scope user cua-computer-use '{"command":"qwen-cua-driver","args":["mcp"],"env":{"CUA_DRIVER_RS_COORDINATE_SPACE":"1"}}'

Or add to .qwen/settings.json:

{
  "mcpServers": {
    "cua-computer-use": {
      "command": "qwen-cua-driver",
      "args": ["mcp"],
      "env": {
        "CUA_DRIVER_RS_COORDINATE_SPACE": "1"
      }
    }
  }
}

Note: If you enable the MCP server manually, disable the built-in computer-use to avoid conflicts:

{
  "tools": {
    "computerUse": {
      "enabled": false
    }
  }
}

Claude Code

Standard registration:

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

Computer-use compatibility mode (grounds Claude Code's vision flow on cua-driver screenshots):

claude mcp add --transport stdio cua-computer-use -- qwen-cua-driver mcp --claude-code-computer-use-compat

Or via JSON (recommended for Windows where arg parsing can lose flags):

claude mcp add-json --scope user cua-computer-use '{"command":"qwen-cua-driver","args":["mcp","--claude-code-computer-use-compat"]}'

Codex (OpenAI)

codex mcp add cua-driver -- qwen-cua-driver mcp

Other clients (Cursor, OpenCode, Hermes, etc.)

Generate a client-specific config snippet:

qwen-cua-driver mcp-config --client cursor
qwen-cua-driver mcp-config --client opencode
qwen-cua-driver mcp-config --client hermes

Or get the generic mcpServers JSON shape:

qwen-cua-driver mcp-config

Model API payload filtering

Some model API routes reject requests whose textual conversation history contains known vendor names. To filter those names at the cua-driver MCP boundary, set MCP_MODEL_PAYLOAD_FILTER=1 in the server environment:

{
  "mcpServers": {
    "cua-computer-use": {
      "command": "qwen-cua-driver",
      "args": ["mcp"],
      "env": {
        "MCP_MODEL_PAYLOAD_FILTER": "1"
      }
    }
  }
}

The filter is disabled by default. When enabled, it rewrites matching text in MCP responses to reversible aliases and decodes those aliases when they are passed back to cua-driver. An alias passed to a shell or another MCP server is not decoded there.

Relative-coordinate mode

For models that output normalized 01000 coordinates (e.g. Qwen-VL computer_use), enable coordinate normalization:

# Via environment variable (set before starting the MCP server)
export CUA_DRIVER_RS_COORDINATE_SPACE=1

# Optional: change full-scale (default 1000, some models use 999)
export CUA_DRIVER_RS_COORDINATE_SCALE=999

When enabled:

  • get_window_state / get_desktop_state report screenshot_width/height as 1000
  • click / drag / scroll x/y accept 01000 values (auto-converted to pixels)
  • move_cursor uses 01000 in screen space
  • Tool descriptions are rewritten to mention the normalized coordinate system

Uninstall

macOS / Linux

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/QwenLM/qwen-code/main/packages/cua-driver/scripts/uninstall.sh)"

Windows

irm https://raw.githubusercontent.com/QwenLM/qwen-code/main/packages/cua-driver/scripts/uninstall.ps1 | iex

Platform support

Platform Status Notes
macOS (Apple Silicon) Stable Full AX tree + screenshot + input
macOS (Intel) Stable Same as above
Windows x86_64 Stable UIA + screenshot + input
Windows ARM64 Stable Same as x86_64
Linux x86_64 Pre-release X11 + AT-SPI; Wayland partial
Linux ARM64 Pre-release Same limitations as x86_64

Documentation