MCP server and CLI for reusing the installed Codex Browser Use (node_repl) and Computer Use (cua_repl) runtimes from Claude Code, Antigravity, Cursor, OpenClaw, Hermes Agent, and shell scripts.
Website · 中文文档 · Native Setup · Upgrading to 3.0.x
| Entry | Runtime | Use it for |
|---|---|---|
--surface native-browser (default) |
Codex node_repl |
The installed Codex Browser/Chrome plugin JavaScript API (agent.browsers, tab.playwright, tab.dom_cua). |
--surface computer |
Codex cua_repl |
The installed Computer Use cua API for desktop windows and unified browser targets. |
Bare invocations without --surface use native-browser. See Native setup for launch discovery, host environment policy, and elicitation approvals. Browser Use and Computer Use have separate MCP registrations and worker state.
# Claude Code plugin
claude plugin install codex-browser --marketplace DeliciousBuding/codex-browser-bridge
# Google Antigravity (agy CLI — imports .claude-plugin/plugin.json directly)
agy plugin install https://github.com/DeliciousBuding/codex-browser-bridge
# Agent Skills (skills.sh)
npx skills add DeliciousBuding/codex-browser-bridgeCursor native plugin metadata is provided in .cursor-plugin/plugin.json and Official MCP Registry metadata in server.json. The plugin registers both native MCP services (codex-browser and codex-computer). Install and configure the native Codex runtimes first; the plugin does not bundle them. If only one runtime is installed on your machine, the other entry failing to start is expected—use a single-entry manual configuration if you only want one.
npm i -g @delicious233/codex-browser-bridge # or download a release binary{
"mcpServers": {
"codex-browser": {
"command": "codex-browser-bridge",
"args": ["--surface", "native-browser", "--mode", "mcp"]
},
"codex-computer": {
"command": "codex-browser-bridge",
"args": ["--surface", "computer", "--mode", "mcp"]
}
}
}Use only the entry you need if a client needs one service or if only one runtime is installed. Client templates are in examples/.
codex-browser-bridge --surface native-browser --mode doctor
codex-browser-bridge --surface computer --mode doctor
codex-browser-bridge --surface computer call js '{"code":"await cua.listWindows();"}'Use batch for several native JS calls that share one worker. tools, call, and batch do not combine with --mode; --image-dir applies to call and batch only. Add --omit-inline-images with --image-dir to keep the saved files and bridge_artifacts while dropping the base64 data from stdout.
Requires: the configured native runtime for each entry · Node.js 18+ only for the npm/npx path.
The binary is a thin, stateless Rust stdio relay. It discovers the selected launch row, spawns one owned worker, forwards MCP frames in both directions, applies the launch row's tool filters and environment policy, and tears the worker tree down on exit.
It does not implement CDP, DOM snapshots, locators, observation cursors, tool profiles, or browser sessions. Those belong to the installed runtime, and their behavior, permissions, and catalog are what clients see. The only transport path is stdio to that runtime.
- From 2.x or 3.0.0 to 3.0.x: read docs/upgrade-v3.md (the compatibility browser adapter and its structured tools were removed in 3.0.1).
- From 1.x to 2.x: read docs/upgrade-v2.md.
| Platform | Status |
|---|---|
| Windows x64 / arm64 | Published binaries |
| Linux GNU x64 / arm64 | Published binaries; glibc >= 2.39 |
| macOS arm64 / x64 | Published binaries; grant the installed runtime Accessibility and Screen Recording (TCC) permissions when macOS prompts |
Native relay behavior follows the installed runtime and its platform support. A Linux/WSL process needs a runtime installed in that environment; the bridge does not bridge a Windows worker across the OS boundary.
- The relay forwards the client's handshake, catalog, pagination cursors, unknown tool fields, images, and errors without normalizing schemas or native extensions. The external host owns version negotiation and client request deadlines.
- When a
tools/callrequest omits Codex correlation metadata, the relay fills_meta.callId,_meta["x-codex-turn-metadata"](session_idandturn_id),_meta.sessionId, and_meta.threadId. enabled_toolsis applied beforedisabled_toolsacross advertised catalogs, directtools/callrequests, and the end-of-sessionturn_endedhook.- Application approval uses bidirectional MCP form elicitation (
elicitation/create);accept,decline, andcancelresponses pass through unchanged. The CLI is non-interactive and responds with{"action": "cancel"}. - On EOF,
SIGINT, orSIGTERM, the bridge cancels in-flight work, sendsturn_ended, closes the worker's stdin, and terminates the owned process tree (Windows Job Object, Unix process group). Timed-out or interrupted calls are never replayed. - Explicit turn hooks clear their matching context only after success; unanswered hooks are reported without replay. CLI preserves native RPC error frames on stdout and exits nonzero. Model token budgets, tool exposure, and UI rendering belong to the receiving host; see native setup.
Upstream Codex desktop app updates do not require a bridge release by themselves. After an upgrade, verify the relay first:
codex-browser-bridge --surface native-browser --mode doctorcodex-browser-bridge --surface computer --mode doctor
Ship a patch only for a real launcher/transport contract change or a fixed regression in this repository.
This tool acts inside your live browser and desktop session.
- Never expose it on a network port; run it only for trusted MCP clients.
- The installed runtime's permissions and approval prompts are authoritative. The bridge adds no second permission layer and does not re-implement CDP access control.
- Review agent actions before allowing sensitive operations; avoid payment and admin flows.
- Redact tab titles, URLs, DOM text, and screenshots before sharing output.
- No telemetry and no hidden fallback runtime.
git clone https://github.com/DeliciousBuding/codex-browser-bridge.git
cd codex-browser-bridge
cargo check --locked
cargo test --locked
cargo clippy --locked -- -D warnings
cargo build --locked --releaseRead ARCHITECTURE.md for the module map and design boundaries, and CONTRIBUTING.md for conventions. Release steps are in docs/release-process.md.
- examples/ — MCP configs for Claude Code, Antigravity, Cursor, OpenClaw, Hermes Agent, and native Computer Use
- skills/codex-browser/ — progressive agent skill
- ARCHITECTURE.md — module map and design decisions
- docs/native-computer-use.md — discovery, environment policy, approvals, and verification status
- ROADMAP.md · CHANGELOG.md
MIT. Maintained independently from OpenAI, Anthropic, and Google.
Thanks to LINUX DO for community support and feedback.