Skip to main content
Glama
codex-computer-use-mcp

codex-computer-use-mcp

by prometheorhq

codex-computer-use-mcp

Use Codex's Computer Use from Claude Code, Cursor or any other MCP client on macOS.

Codex has very good Computer Use: it sees and operates any Mac app through screenshots, the accessibility tree, clicks and typing. But only Codex can reach it. This small MCP server hands it to your other agents as a normal tool, computer_use, so for example Claude can drive it directly in its own session instead of starting a separate Codex thread for every UI step.

Claude drives, Codex clicks.

How it works

Codex runs its own Computer Use service; it only runs under a program OpenAI signed. This server copies or ships none of it. It starts the Codex you already have installed as codex app-server and uses its app-server methods:

  1. initialize, then thread/start with ephemeral: true. No model turn is started, so no OpenAI model runs. Your agent decides every step.

  2. mcpServerStatus/list to find Codex's Computer Use MCP server (cua_repl, plugin unified-computer-use).

  3. mcpServer/tool/call for each call your agent makes.

After a minute without calls it reports the turn as ended to Computer Use and closes the app-server, so the "using your Mac" indicator goes away.

Claude Code / Cursor ──MCP──▶ codex-computer-use-mcp ──app-server──▶ Codex ──▶ Computer Use ──▶ your Mac apps

Related MCP server: computer-use

Requirements

  • macOS

  • Node.js 22.18 or newer

  • The Codex app (or the ChatGPT desktop app with Codex), signed in, with the Computer Use plugin installed and its macOS permissions (Screen Recording, Accessibility) granted

The server uses the Codex CLI bundled with the ChatGPT or Codex app if present, otherwise codex on your PATH. Set CODEX_COMPUTER_USE_CODEX_PATH to choose another one.

Install

git clone https://github.com/prometheorhq/codex-computer-use-mcp.git
cd codex-computer-use-mcp

There are no runtime dependencies and no build step: Node runs the TypeScript directly.

Claude Code

claude mcp add -s user codex-computer-use -- "$PWD/bin/codex-computer-use-mcp"

Start a new Claude Code session. The tools appear as computer_use and computer_use_reset. Claude threads in T3 Code use the same Claude Code configuration, so they get the tool as well.

Cursor and other MCP clients

{
  "mcpServers": {
    "codex-computer-use": {
      "command": "/absolute/path/to/codex-computer-use-mcp/bin/codex-computer-use-mcp"
    }
  }
}

Using it

computer_use takes JavaScript for Codex's cua_repl runtime. The tool description carries Codex's own API documentation, so the agent can read it. A first call is usually:

await cua.getState();

which lists the apps it can operate.

Browsers: Codex's browser-tab API (createBrowserTab, getBrowser, getTab) only works inside the Codex or ChatGPT app. Through this server it fails with "The browser access host is unavailable" or "Cannot verify browser access without the current turn". Operate the browser as a normal app instead:

let app = await cua.getApp("Google Chrome");

Screenshots, clicks and typing work as in any other app.

Safety

  • It never approves anything on your behalf. When Codex asks to allow an app, the server declines and tells the agent to ask you to allow it once in the Codex app.

  • Codex's own Computer Use confirmation rules still apply. For example, it stops and asks before creating accounts or keys.

  • Codex gets only a minimal environment (HOME, PATH, locale and similar). No other provider's API keys reach it.

  • Codex's Computer Use answers one client at a time. A lock file makes calls from several chats wait for each other.

Limits

  • macOS only, and local: it operates the Mac it runs on.

  • It relies on Codex's app-server API with experimentalApi: true, which may change between Codex releases.

  • One Computer Use call at a time across all clients.

  • Not affiliated with OpenAI or Anthropic. "Codex" and "Claude" are their respective owners' trademarks.

Configuration

Variable

Default

Purpose

CODEX_COMPUTER_USE_CODEX_PATH

app-bundled Codex CLI, then codex

Which Codex binary to start

CODEX_COMPUTER_USE_STATE_DIR

~/.cache/codex-computer-use-mcp

Tool-list cache and the call lock

Development

npm install      # dev tools only (TypeScript, Node types)
npm run typecheck
npm test

License

MIT. Built by Prometheor, which connects the AI apps you already have.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP clients to control macOS via accessibility and screen recording, providing tools to list apps, observe UI, click, type, press keys, and scroll.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a JSON-RPC computer use runtime for macOS, exposing 7 MCP tools (observe/act/inspect/session/cancel/trace) as image content blocks so external agents like Claude Code, Pi, OpenCode, or Codex CLI can capture screenshots and drive the desktop with clicks, keys, and typing while enforcing session locking, stale-frame protection, and trace redaction server-side.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes MCP tools that let agents inspect and control any Mac application through accessibility trees and screenshots, enabling background clicks, typing, scrolling, dragging, and app-state reads.
      145 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients such as Codex and Claude Code to read and control native macOS apps and Chrome using Accessibility, run batches of related actions, verify results, and display a separate software cursor.
      1
      MIT