codex-computer-use-mcp
A local MCP server that lets compatible agents use the official, signed Computer Use broker bundled with the OpenAI ChatGPT macOS app.
README
Codex Computer Use MCP
0.2 direct candidate: direct Pi-owned Computer Use tools. The package/repository name is unchanged; npm 0.1 remains the released nested implementation until a separate release gate.
This project exposes the official signed macOS Computer Use capabilities as direct typed tools for Pi and MCP clients. The calling agent chooses every tool and argument itself.
The primary path has:
- no nested model call;
- no model-generated action plan;
- no subagent;
- no prompt sent to Codex;
- no separate model-token usage.
It does use OpenAI's signed codex app-server as the official host for the bundled Computer Use MCP client. The current official mcpServer/tool/call API requires a loaded thread identifier, so the bridge creates an empty, in-memory, zero-turn context (ephemeral: true, turns: [], path: null). It never calls turn/start and fails closed if any turn/* or item/* model activity appears.
Independent project. This is not an OpenAI product and is not endorsed by OpenAI. The app-server API is marked experimental and fixed ChatGPT bundle paths may change.
Direct tools
Pi registers namespaced tools to avoid collisions with Pi's built-ins. The MCP server exposes the upstream method names.
| Pi tool | MCP method | No-permissions | Purpose |
|---|---|---|---|
computer_use_list_apps |
list_apps |
yes | List apps known to official Computer Use |
computer_use_get_app_state |
get_app_state |
yes | Read accessibility state and imagery for one app |
computer_use_click |
click |
yes | Click an element or screenshot coordinates |
computer_use_perform_secondary_action |
perform_secondary_action |
yes | Invoke a named accessibility action |
computer_use_set_value |
set_value |
yes | Assign an accessibility value |
computer_use_select_text |
select_text |
yes | Select text or place the cursor |
computer_use_scroll |
scroll |
yes | Scroll an element |
computer_use_drag |
drag |
yes | Drag between screenshot coordinates |
computer_use_press_key |
press_key |
yes | Send a key or key combination |
computer_use_type_text |
type_text |
yes | Type literal text |
Pi—not a nested planner—must call computer_use_get_app_state, choose a current element identifier or coordinates, execute one action, and inspect again when needed.
Authorization policy: durable no-permissions
no-permissions has one precise meaning here: the wrapper asks no permission questions and exposes all ten official actions. It is the only mode and the durable default. There is no safe/full selector, config file, environment override, slash command, CLI switch, per-call elevation, app allowlist, intent classifier, task schema, per-action confirmation, special-case app policy, or method gate.
The app-server runtime is also created with approvalPolicy: "never". The client does not advertise an elicitation UI. If the official downstream service unexpectedly requests elicitation, the bridge silently declines it; it never opens a prompt and never self-accepts. Any persistent first-party access required by Computer Use must therefore already be configured in the official ChatGPT app.
No-permissions does not bypass:
- first-party OpenAI app approvals or sensitive-action prompts;
- macOS Screen Recording, Accessibility, or TCC controls;
- strict OpenAI Team ID and code-signature checks;
- exact upstream ten-tool schema verification;
- canonical app identity resolution and per-user/per-app kernel locks shared across Pi and MCP state roots;
- focus telemetry, timeouts, verified process-tree cleanup, or private audit logging.
Why the signed app-server is required
Calling the signed SkyComputerUseClient mcp binary directly from an ordinary Pi/Node parent successfully initializes and lists all ten schemas, but real calls are rejected with:
Computer Use server error -10000: Sender process is not authenticated
OpenAI's app-server exposes a documented mcpServer/tool/call endpoint. That endpoint calls a configured MCP tool directly; no model turn is required. Running it from the signed app-bundled binary preserves the official responsible-process/authentication chain without injection, re-signing, TCC changes, private socket emulation, or credential extraction.
See ARCHITECTURE.md for source links and the full restriction inventory.
Requirements
- macOS
- Node.js 22 or newer
- official ChatGPT macOS app at
/Applications/ChatGPT.app - official Computer Use component installed and its first-party permissions configured
The direct bridge starts app-server with a new private CODEX_HOME containing no account credentials and only one configured MCP server: official Computer Use. It does not inherit the user's Codex MCP servers, plugins, history, memories, API keys, or auth file. It selects a non-websocket dummy model provider bound to unreachable loopback, disables plugin/remote-control features, and never starts a turn; this prevents app-server model prewarm or Responses API traffic.
Pi integration
The npm package remains at the released 0.1 nested architecture; do not assume an npm 0.2 exists. To evaluate an exact reviewed source commit:
npm ci
npm run build
pi -ne -e /absolute/path/to/codex-computer-use-mcp/integrations/pi/index.ts
Command:
/computer-use-status
The native Pi adapter is the primary product path. It always registers all ten typed tools directly. It exposes no mode-changing command and no approval UI.
MCP server
Running the binary without arguments starts a stdio MCP server exposing the same ten direct methods plus computer_use_status:
node dist/mcp-server.js
For Pi's generic MCP gateway, keep directTools: false so this powerful surface remains intentional:
{
"mcpServers": {
"computer-use": {
"command": "node",
"args": ["/absolute/path/to/codex-computer-use-mcp/dist/mcp-server.js"],
"lifecycle": "lazy",
"requestTimeoutMs": 180000,
"directTools": false
}
}
}
The generic MCP server exposes the same no-permissions behavior: no wrapper approval UI and all ten methods. Unexpected downstream elicitations are silently declined; configure persistent first-party app access only in official ChatGPT Computer Use settings.
Security and privacy
Each call:
- validates typed arguments;
- applies the single durable no-permissions policy with no mode or prompt branch;
- resolves a target to a canonical installed bundle ID;
- acquires a fixed per-user/per-app kernel lock shared across all supported clients and state roots;
- starts global focus telemetry;
- verifies fixed OpenAI-signed broker/client binaries;
- starts a credential-free isolated app-server process tree with model transport disabled;
- requires explicit
ephemeral: true,turns: [], andpath: nullattestation; - verifies the exact upstream ten-tool inventory and schemas;
- issues exactly one
mcpServer/tool/call; - rejects any model-turn notification, including during teardown;
- combines partial-preserving ancestry enumeration with private-working-directory ownership recovery, then freezes, terminates, and verifies the app-server plus separately grouped or reparented helpers; finally it removes temporary state, releases the lock, and writes a content-safe audit with separate broker/lease cleanup evidence.
Focus checks are detection/completion criteria, not a preventive macOS sandbox. If the target becomes frontmost, the call is reported as failed even though an individual official action may already have completed.
Tool results may contain visible target-app text or screenshots because that is the purpose of Computer Use. They return only to the invoking Pi/MCP client. Audits never retain arguments, typed values, screenshots, app-state payloads, result text, prompts, credentials, or tokens—only bounded metadata such as method, canonical/hashed app identity, byte counts, content types, outcome, focus, broker version, and zero-turn evidence.
State and migration
Audit state defaults to ~/.direct-computer-use; override with CODEX_COMPUTER_USE_HOME. Permission policy is not read from that agent-writable path: no-permissions is compiled as the only interface. Legacy config.json files are ignored.
See MIGRATION.md for the immutable-review gate, exact-head opt-in migration, rollback, and conflict avoidance.
Development
npm ci
npm run check
npm run check:pi
npm test
npm run build
npm audit --omit=dev
npm pack --dry-run
Registry dependency tarballs are exact-pinned with integrity and the package includes npm-shrinkwrap.json.
See PROOF.md, SECURITY.md, and CONTRIBUTING.md.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。