Codex CLI computer use: let Codex operate Mac apps through an MCP server
OpenAI documents no built-in computer use for the Codex CLI. What the desktop app's computer use covers, how MCP servers work in the CLI, and how to let Codex test Mac apps from the terminal.
Short answer: OpenAI documents no built-in computer use for the Codex CLI: its computer use is described only in the ChatGPT desktop app, as a plugin. The CLI does support MCP servers (
codex mcp add,/mcp), so a computer use MCP server gives Codex in the terminal tools to see a Mac app window, click, type and choose menu items. ShadowCursor is such a server; it connects to Codex with one click, and because the CLI, the IDE extension and the desktop app share one MCP configuration, all three get it.
What the desktop app's computer use covers
OpenAI's computer use lives in the ChatGPT desktop app on macOS and Windows: you select Codex, or switch ChatGPT to Work, and install the Computer Use plugin (source). Outside that app, OpenAI does not document it.
| Question | Codex computer use in the ChatGPT desktop app |
|---|---|
| Codex CLI | Not documented on the computer use page (the CLI has a plugin browser, but the Computer Use plugin is not described there) |
| IDE extension | No: the extension does not support plugins (source) |
| macOS | Yes, and a scoped task can run in the background |
| Windows | Yes, but on the active desktop, taking over the pointer and keyboard |
| Linux | Not yet in the Linux preview of the desktop app |
| App approval | Asks before using each app; "Always allow" is optional |
| Terminal apps and ChatGPT itself | Cannot be automated |
| macOS security prompts, admin login | Cannot approve or authenticate |
| Several tasks at once | Not documented; OpenAI advises one target app or flow at a time |
| Region | "Supported regions"; the EEA, UK and Switzerland came later, from June 2026 |
If you already work in the ChatGPT desktop app, use its computer use; it is included. If it is missing or fails there, see Codex computer use not working. The rest of this guide is for the terminal.
Why the CLI needs an MCP server
The Codex CLI reads files, edits code and runs commands in your shell. That covers most coding work, but not the moment a task needs a graphical interface: clicking through the settings window of the Mac app Codex just built, checking a dialog, filling a form in a desktop app, reading a value that only appears on screen.
MCP (Model Context Protocol) is how Codex reaches tools beyond its own. A computer use MCP server exposes the Mac's interface as tools. Codex asks for the state of a window and gets a screenshot plus the window's accessibility elements (buttons, fields, menus, each with a label and an index), then calls an action such as a click or typing, and gets the new state back. The model decides; the server carries it out. Computer use MCP servers for the Mac explains what separates good servers from weak ones.
How MCP servers work in the Codex CLI
OpenAI documents the CLI's MCP support on its MCP page. The points that matter for a computer use server:
- Local servers over stdio. Codex starts the server as a local process. Streamable HTTP servers are supported too.
- One configuration for all Codex clients. MCP servers live in
~/.codex/config.toml. The ChatGPT desktop app, the Codex CLI and the IDE extension share it, so a server you add once is available in all three. Project-scoped servers in.codex/config.tomlload only in trusted projects. - Commands.
codex mcp listshows configured servers,codex mcp --helplists the rest, and/mcpinside a session shows which servers are active. - Approvals per server or per tool.
default_tools_approval_modesets whether a server's tools run automatically or ask first (auto,prompt,writesorapprove), andtools.<tool>.approval_modeoverrides it for one tool. - Timeouts. A tool call times out after 60 seconds by default (
tool_timeout_sec), which is plenty for single GUI actions. - Server instructions. Codex reads the instructions an MCP server sends when it connects and uses them as guidance for that server's tools.
ShadowCursor: computer use for Codex in the terminal
ShadowCursor is a Mac app and MCP server that gives an agent a full set of its own:
- Its own cursor, drawn on screen in the agent's color with a name tag, so you see where Codex is working.
- Its own keyboard. Keys arrive only in the agent's window, in one app.
- Its own clipboard. Copy and paste never touch your clipboard or another agent's.
- Its own windows. Codex works in background windows, even when yours cover them, and screenshots capture only the window it works in.
Every action returns the window's new state, so Codex sees the result of each step without asking again. Several agents can work at once, each with its own cursor: two Codex sessions in separate worktrees, or Codex next to Claude Code, can each test their own build. Input moves like a person, with curved pointer paths and typing at about 200 words per minute, which matters for hover menus in Safari, sliders and date pickers. ShadowCursor runs locally and needs macOS 15 Sequoia or later.
Setup for the Codex CLI
- Open ShadowCursor and allow Accessibility and Screen Recording when your Mac asks.
- Connect Codex with one click. The app finds Codex on your Mac and registers itself as an MCP server. There is no configuration file to edit, and the same entry serves the CLI, the IDE extension and the desktop app.
- Start a new Codex session and run
/mcp. ShadowCursor should be listed with its tools. - Ask for a task in an app. Name the app and what counts as done.
If you want Codex to ask before each action in an app, set default_tools_approval_mode to prompt for the ShadowCursor server in Codex's MCP settings.
A typical workflow from the terminal
A Codex CLI session that builds and tests a Mac app might run like this:
Build the app with the existing script, launch the build, open
Settings > General and check that the new "Launch at login" toggle
saves its state after you close and reopen the window. Fix the code
if it does not, then test again.
Codex runs the build in its shell, launches the app through ShadowCursor in its own window, clicks through the settings with its own cursor and reads the result from the returned screenshot and elements. Its keys arrive only in its own window, so nothing it types lands in your editor. For more parallel setups with worktrees, see running several AI agents at once.
Other tasks that fit the CLI well:
- Open an exported CSV in Numbers and check the totals against the test data.
- Reproduce a bug report step by step in the app, then confirm the fix.
- Fill a staging form in a Safari window of the agent's own and check the confirmation page.
Which one to use
| Situation | Better choice |
|---|---|
| You work in the ChatGPT desktop app, one task at a time | Built-in computer use |
| You work in the Codex CLI or the IDE extension on a Mac | A computer use MCP server |
| You run several Codex or Claude agents that each need apps | A server with a cursor per agent, such as ShadowCursor |
| You are on Windows | The desktop app's computer use (foreground); ShadowCursor for Windows is in beta |
| You are on Linux | Neither: the desktop app preview lacks it, and ShadowCursor runs on macOS, with Windows in beta |
Limits to know
- Minimized and hidden windows cannot be seen or operated. Covered windows can.
- System drag and drop of files, tabs or text follows the real mouse, so ShadowCursor cancels such drags instead of dropping.
- Hover without a pressed button works in Safari, not in Chrome or Electron apps.
- An agent cannot use a background tab of your browser window; it opens its own window.
- Code editors such as VS Code do not expose their text through accessibility, so agents read them from the screenshot.
- ShadowCursor is a separate subscription: a 7-day free trial without a card, then $12.99 per month or $69.99 per year.
FAQ
Does the Codex CLI have computer use?
Not as a documented feature. OpenAI documents computer use for the ChatGPT desktop app only. The CLI supports MCP servers, and a computer use MCP server gives it the same kind of tools.
Can I use the desktop app's Computer Use plugin from the CLI?
OpenAI does not document that. The computer use page describes setup and use only in the ChatGPT desktop app. A separate MCP server is the documented route for the CLI.
Do I need to configure ShadowCursor separately for the CLI and the desktop app?
No. ShadowCursor connects Codex with one click, and Codex shares its MCP configuration between the CLI, the IDE extension and the ChatGPT desktop app.
Can two Codex sessions use computer use at the same time?
With ShadowCursor, yes. Each session connects on its own and gets its own cursor, keyboard and clipboard. Give each one its own app window or document.
Which Codex plan do I need?
Any plan that lets you use the Codex CLI. MCP servers are part of the CLI, and ShadowCursor does not depend on your ChatGPT plan; it has its own subscription.