Running Codex Computer Use Inside Claude Code via Model Context Protocol
Codex's background computer-use automation engine runs as an unbundled local Model Context Protocol server on macOS. Claude Code can directly call this server headless to click and drag without stealing the user's cursor.

Why it matters
You can now run desktop automation through Claude Code while continuing to use your mouse and keyboard on other tasks.
TL;DR
- 01Codex's computer use runtime runs as a standard local MCP server located in the macOS cache directory.
- 02Claude Code can invoke this engine headless with claude -p to perform clicks and drags in the background without stealing your cursor.
- 03Opus 5.5 matched Codex at 6/8 task completions while avoiding the 4x token cost of legacy CUA drivers.
Key facts
- Opus 5.5 Success Rate
- 6/8 tasks on Codex engine
- Native Codex Success Rate
- 6/8 tasks
- CUA Driver Success Rate
- 3-4/8 tasks (at 4x token cost)
- Cursor State
- Background execution without cursor hijacking
Background Desktop Automation Without Cursor Lock
Codex's computer-use automation engine is packaged as a local Model Context Protocol (MCP) server inside the macOS desktop application bundle rather than being locked to proprietary interfaces. Because it exposes standard MCP endpoints, external command-line agents such as Claude Code can directly drive it, including in headless workflows using the claude -p execution flag. Unlike standard Computer Use Agent (CUA) drivers that rely strictly on macOS accessibility APIs, the Codex engine transmits native clicks and drag events directly to target application windows without taking over the physical mouse pointer.
Benchmark Accuracy and Implementation Path
In comparative testing across eight desktop automation tasks, Claude Opus 5.5 operating over the Codex engine completed 6 out of 8 tasks, matching native Codex execution (6/8). By contrast, generic CUA drivers achieved only 3 to 4 completed tasks while incurring four times the token cost due to visual canvas and drag event failures.
To configure the server, locate the bundled executable configuration: 1. Navigate to ~/.codex/plugins/cache/openai-bundled/unified-computer-use/<version>/.mcp.json. 2. Extract the cua_repl command, arguments, and environment variables. 3. Register the definition as a user MCP server named codex-cu.
Note that hover events are currently unsupported, and because this integration depends on an internal bundle structure, future client updates may modify the binary layout.
Try it in 2 minutes
claude -p 'Set up Codex computer use as an MCP server for you on my Mac. Find the cua_repl entry in ~/.codex/plugins/cache/openai-bundled/unified-computer-use/*/.mcp.json and register it as a user MCP server called codex-cu with the same command, args and env. Then test it by using Calculator in the background to work out 12 * 12.'bash
✓ When to use
- Delegating GUI interactions to Claude Code while actively typing and browsing on the same machine.
- Running multi-step canvas drag-and-drop tasks that fail under standard Accessibility API drivers.
✕ When NOT to use
- Automating interfaces that strictly require cursor hover state triggers.
- Production environments that prohibit relying on undocumented internal application cache paths.
What to do today
- Locate ~/.codex/plugins/cache/openai-bundled/unified-computer-use/ to inspect the latest cua_repl MCP configuration.
- Register codex-cu as a user-level MCP server in your local Claude Code configuration.
- Test background GUI delegation by prompting Claude Code to run background calculations or window manipulations.