Content
# Codex CUA MCP
[中文版](README_CN.md)
💬 [LINUX DO Discussion](https://linux.do/t/topic/2490658)
MCP server that wraps Codex's Computer Use capability, enabling AI agents to control Windows desktop applications.
## Features
- List and control Windows desktop applications
- Capture screenshots and accessibility trees
- Click, type, press keys, scroll, drag
- Launch apps and activate windows
- **Ready to use** - exe bundled, no extra setup needed
## Quick Start (Claude Code)
```powershell
git clone <repo-url>
cd codex-cua-mcp
.\setup.ps1
```
Restart Claude Code to use.
## Other Agents
Works with any MCP-compatible agent (Cursor, Windsurf, Cline, etc.):
```json
{
"mcpServers": {
"codex-cua": {
"command": "node",
"args": ["PATH/codex-cua-mcp/bin/codex-cua-mcp.js"]
}
}
}
```
Check your agent's documentation for config file location.
## How It Works
```
AI Agent (Claude Code, Cursor, etc.)
↓ MCP protocol (stdio)
MCP Server (codex-cua-mcp)
↓ JSON-RPC (stdin/stdout)
codex-computer-use.exe
↓ Windows APIs
Desktop Applications
```
The MCP server communicates with `codex-computer-use.exe` via JSON-RPC over stdin/stdout. The exe uses Windows APIs (SendInput, UI Automation, Windows.Graphics.Capture) to interact with desktop applications.
Each action requires an approval flow on first use per app. The server auto-approves by default for seamless operation.
> 📖 Want to understand the design in depth? Read the [Architecture Deep Dive](docs/ARCHITECTURE.md). ([中文版](docs/ARCHITECTURE_CN.md))
## Available Tools
| Tool | Description |
|------|-------------|
| `list_windows` | List all controllable windows |
| `list_apps` | List installed apps |
| `get_window` | Rehydrate a window object |
| `launch_app` | Launch an application |
| `activate_window` | Bring window to foreground |
| `get_window_state` | Capture screenshot + accessibility tree |
| `click` | Click at coordinates or element |
| `type_text` | Type text |
| `press_key` | Press keyboard key |
| `scroll` | Scroll |
| `drag` | Drag |
| `set_value` | Set editable element value |
| `perform_secondary_action` | Secondary action (right-click menu, etc.) |
## Disclaimer
The core functionality comes from `codex-computer-use.exe`. Actual results depend on the AI agent and model being used — no guarantee of usability.
## Requirements
- Windows 10/11
- Node.js 18+
## License
MIT