ai-setup 5 min read

Cua – Computer-Use Agents in Docker

Open-source drivers, MCP server, sandbox, and benchmark for building computer-use AI agents across macOS, Windows, and Linux.

By
Share: X in
Cua open-source Docker container for computer-use agents

TL;DR

TL;DR: Cua is an open-source project that packages cross-OS drivers, an MCP server, a sandbox runtime, and a benchmark suite into Docker-ready images so you can give any AI coding agent control of a real desktop — without stealing cursor focus.

Source and Accuracy Notes

⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.

What Is Cua?

Cua (stylized as Cua) is an open-source toolkit for running computer-use agents — AI systems that drive real desktop applications by clicking, typing, and reading screen state. The project emerged from Y Combinator’s X25 batch and is maintained by Cua AI, Inc.

The core problem it solves: most computer-use demos run on a single macOS machine with screen-sharing permissions. Cua abstracts this into a portable, reproducible setup that works identically across macOS, Windows, and Linux — and deploys to a server or Docker cluster.

Cua groups its tools into four pillars:

  • Cua Drivers — background input injection for macOS, Windows, and Linux. Agents interact with real apps without stealing the user’s cursor or window focus.
  • Cua MCP Server — a Model Context Protocol server compatible with Claude Code, Cursor, Codex, OpenClaw, and any other MCP client.
  • Cua Sandbox — containerized environments pre-configured for agentic computer use.
  • Cua Bench — evaluation harnesses and RL training environments for measuring agent performance on desktop tasks.

Setup Workflow

Prerequisites

  • macOS, Windows 10/11, or Linux (X11 or Wayland)
  • Docker (for sandboxed deployments)
  • An MCP-compatible agent client (Claude Code, Cursor, etc.)

Install Cua Drivers

macOS / Linux:

/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"

Windows (PowerShell):

irm https://cua.ai/driver/install.ps1 | iex

After installation, follow the post-install instructions at cua.ai/docs/tutorials/drive-your-first-app.

Connect via MCP

Once drivers are installed, point your MCP-compatible client to the Cua MCP server endpoint. The CLI reference is at cua.ai/docs/reference/cua-driver/cli-reference.

Run a Pre-built Sandbox

docker pull cuaai/cua-sandbox:latest
docker run -it cuaai/cua-sandbox:latest

Deeper Analysis

Architecture

Cua Drivers use OS-level input injection APIs:

  • macOS: CGEventTap or AXUIElement APIs for background input
  • Windows: SendInput / SetWindowsHookEx
  • Linux: X11 XTest extension or Wayland input emulation with compositor-specific handling

The MCP server acts as a bridge — it surfaces Cua’s driver capabilities as MCP tools (click, type, screenshot, verify) that any compatible agent can call over the standard MCP protocol. No proprietary agent lock-in.

Cua Bench

Cua Bench provides standardized tasks for evaluating how well an agent controls a desktop interface. It includes:

  • Grounded screen state extraction
  • Structured task completion scoring
  • RL environment wrappers for training data generation

This is the component that makes Cua useful beyond just “run an agent on your machine” — you can generate reproducible evaluation datasets and compare agent versions.

Comparison to Alternatives

| Feature | Cua | Anthropic Computer Use | BrowserOS | |---|---|---|---| | Cross-OS | ✅ macOS, Windows, Linux | macOS only | Chromium-based | | MCP native | ✅ | ❌ | ❌ | | Docker-ready | ✅ | ❌ | ❌ | | Open-source | ✅ | ❌ | Partial | | Bench suite | ✅ | ❌ | ❌ |

Cua’s cross-OS coverage and MCP integration are its standout differentiators. BrowserOS runs in a browser tab; Cua drives real native apps in the host OS.

Practical Evaluation Checklist

  • [ ] Install Drivers on target OS
  • [ ] Connect MCP client to Cua server
  • [ ] Drive a simple app (open browser, fill form, verify)
  • [ ] Evaluate with Cua Bench task suite
  • [ ] Test cross-OS parity (same script on two different OSes)

Security Notes

Cua Drivers require elevated permissions to inject input events — installation scripts invoke sudo where needed. Review the install scripts before running them on any machine. The sandbox images run without privileged mode by default, but nesting input injection inside containers depends on your container runtime configuration.

FAQ

Q: Does Cua work with any MCP client? A: Cua implements the standard MCP protocol. Clients that support external MCP servers — Claude Code, Cursor, Codex, OpenClaw — are compatible out of the box.

Q: How does this differ from Anthropic’s Computer Use demo? A: Anthropic’s demo runs on a single macOS machine with screen-sharing. Cua abstracts the input layer across three OSes, ships an MCP server, and includes evaluation tooling.

Q: Is Cua free for commercial use? A: Yes — MIT License, per the LICENSE.md in the repository.

Q: Can I run Cua inside Docker without a display server? A: Yes, using Xvfb (virtual framebuffer) on Linux or Cua’s sandbox images which include a pre-configured headless display stack.

Conclusion

Cua is the most complete open-source stack for running computer-use agents in a cross-platform, reproducible way. If you’re building or evaluating agents that need to drive real desktop applications, the combination of Cua Drivers, the MCP server, and Cua Bench gives you a full pipeline from development to evaluation. MIT licensed, actively maintained, and already powering agents in production workflows.

Project: cua.ai · GitHub: github.com/trycua/cua (21.8K stars) · License: MIT