CUPComputer Use Protocol
Getting Started

Installation

Install the CUP SDK for Python or TypeScript.

Install

pip install computeruseprotocol
npm install computeruseprotocol

Optional extras (Python)

# Linux AT-SPI2 support
sudo apt install python3-gi gir1.2-atspi-2.0

# Web adapter (Chrome DevTools Protocol)
pip install computeruseprotocol[web]

# Screenshot support
pip install computeruseprotocol[screenshot]

# MCP server
pip install computeruseprotocol[mcp]

Platform requirements

CUP auto-detects your operating system and loads the appropriate platform adapter.

PlatformAdapterRequirements
WindowsUIA via COMWindows 10+
macOSAXUIElementmacOS 12+, accessibility permission
LinuxAT-SPI2python3-gi + gir1.2-atspi-2.0
WebChrome DevTools ProtocolChrome running with --remote-debugging-port

On macOS, you'll need to grant accessibility permissions to your terminal or IDE in System Settings > Privacy & Security > Accessibility.

Verify installation

python -m cup
npx cup

This captures the foreground window's UI tree and prints it in compact format. You should see output like:

# CUP 0.1.0 | windows | 2560x1440
# app: Terminal
# 12 nodes (45 before pruning)

[e0] win "Terminal" 100,50 1200x800
  [e1] doc "Terminal" 100,50 1200x800
    [e2] tbx "Command input" 110,720 1180x32 {foc,edt} [clk,typ]

On this page