Skip to main content
Glama
README.md
<p align="center">
  <img src="assets/agent-pets.svg" width="240" height="220" alt="Claude, Codex, and Antigravity connected by curved two-way arrows" />
</p>

<h1 align="center">codex-mcp-bridge</h1>

<p align="center">
  <a href="https://www.npmjs.com/package/@minhspark/codex-mcp-bridge"><img src="https://raw.githubusercontent.com/buidangminh23/codex-mcp-bridge/analytics/stats-npm-version.svg" height="20" alt="npm" /></a>
  <a href="https://www.npmjs.com/package/@minhspark/codex-mcp-bridge"><img src="https://raw.githubusercontent.com/buidangminh23/codex-mcp-bridge/analytics/stats-npm-downloads.svg" height="20" alt="npm downloads" /></a>
  <a href="https://www.npmcharts.com/compare/%40minhspark%2Fcodex-mcp-bridge?minimal=true"><img src="https://raw.githubusercontent.com/buidangminh23/codex-mcp-bridge/analytics/stats-npm-downloads-month.svg" height="20" alt="npm downloads / month" /></a>
  <br />
  <a href="https://github.com/buidangminh23/codex-mcp-bridge/network/dependents"><img src="https://raw.githubusercontent.com/buidangminh23/codex-mcp-bridge/analytics/stats-used-by.svg" height="20" alt="Used by repositories (Libraries.io)" /></a>
  <a href="https://skills.sh/buidangminh23/codex-mcp-bridge/codex-bridge"><img src="https://skills.sh/b/buidangminh23/codex-mcp-bridge?label=skills.sh" height="20" alt="skills.sh installs" /></a>
  <a href="https://buidangminh23.github.io/codex-mcp-bridge/"><img src="https://raw.githubusercontent.com/buidangminh23/codex-mcp-bridge/analytics/stats-github-views.svg" height="20" alt="GitHub views / source window" /></a>
  <a href="LICENSE"><img src="https://raw.githubusercontent.com/buidangminh23/codex-mcp-bridge/analytics/stats-npm-license.svg" height="20" alt="license" /></a>
</p>

Connect **Claude, Codex, and Antigravity** through MCP. Send work between native Desktop conversations or use independent CLI background workers.

Supports Windows, macOS, and Linux. Native Desktop integration supports Windows and macOS.

https://github.com/user-attachments/assets/98b23989-826f-4d7d-9dcb-ad7dd2739095

## Installation

### Package — npm

Requires **Node.js 22.13+**. Use the same command for a fresh install or an update.

**Windows PowerShell**

```powershell
npx.cmd -y @minhspark/codex-mcp-bridge@latest
```

**macOS / Linux / WSL**

```bash
npx -y @minhspark/codex-mcp-bridge@latest
```

Run the command directly in an interactive terminal. It installs the package, applies Claude/Codex/Antigravity settings, and verifies the background relay. Windows installs into `%APPDATA%\npm` without administrator rights. Existing permissions, project grants, custom settings, and disabled services are preserved.

For native handoffs, sign in to the Desktop apps and open the same saved project in Codex Desktop and Claude Desktop's **Code tab**. The shared Claude chat connector is a separate local app-server route.

Setup supplies a missing Codex CLI. Install and authenticate Claude Code and `agy` separately for their workers; CLI authentication is separate from Desktop sign-in.

[Windows setup](docs/new-windows-setup.md) · [macOS setup](docs/new-macos-setup.md) · [Project permissions](docs/project-onboarding.md)

### Independent background workers

Codex ↔ Claude, Codex ↔ Antigravity, and Claude ↔ Antigravity workers communicate through a per-user service, even while Desktop apps are closed or unresponsive. Workers use separate CLI sessions and require an authenticated provider, a running service, and an authorized project.

- MCP tools: `worker_status`, `list_workers`, `send_to_worker`, `read_worker_delivery`.
- Terminal: `worker-relay status`, `worker-relay list`, `worker-relay send`, `worker-relay read`.
- Authorize a selected project with `bridge-projects allow-project <absolute-project-path>`.

On Windows, add `.cmd` to terminal commands. Provider quotas and tool permissions still apply. [Worker setup and authorization](docs/project-onboarding.md)

### Manage work across computers

Run `worker-relay dashboard` inside the local project to open the operator dashboard. Add an existing macOS/Linux remote Codex profile with `worker-relay dashboard --host mac`. Run the same command again to reopen the dashboard. From a source checkout use `node scripts/worker-relay.mjs dashboard`. The dashboard listens on loopback, and the coordinator keeps scheduling when its browser windows close.

Create a job with one or more sequential steps. Auto prefers this computer when a worker is ready and the OS reports at least 2 GiB of memory available to the worker. Other eligible computers are ranked by available RAM. Adjust the memory floor beside the machine list while the dashboard is running. Set the startup floor with `--min-free-gib`. Pin a job to a machine, change its destination while queued, or cancel the remaining queued steps. An active step finishes on the machine that accepted it. Later steps receive earlier results and can move when the two working trees are clean at the same Git revision. Share any required artifacts separately. Interrupted deliveries keep their original receipt ID for recovery.

Install this version of the bridge and set up the background relay on each worker. Each checkout needs an existing project grant and the same Git origin. Test the configured SSH alias using the operator's key and verified host key. For Windows SSH targets or multiple custom checkout mappings, use `worker-relay dashboard --config /path/to/fleet.json` with a local configuration:

```json
{
  "version": 1,
  "hosts": [
    { "id": "laptop", "sshHost": "laptop", "platform": "darwin", "cwd": "/Users/<user>/project" },
    { "id": "workstation", "sshHost": "workstation", "platform": "win32", "cwd": "D:\\Projects\\project" }
  ]
}
```

Open each machine in its own dashboard window to compare jobs and RAM. Expand the AI session list on a machine to see AI sessions for its configured project, their reported status, and any jobs the fleet is running there. The list refreshes while open. The screen viewer connects to the remote machine's existing VNC service over SSH. Sign in to the destination and enable control to use the mouse and keyboard. Windows also supports downloading an RDP connection file for an existing Remote Desktop service. Both remote desktop options use the operator's SSH tunnel and the destination's authentication. Queue data and the browser sign-in link are private to the coordinator's OS account.

### Verify the installation

```bash
codex-bridge-setup --check
worker-relay status
```

On Windows use `codex-bridge-setup.cmd --check` and `worker-relay.cmd status`. The first command checks saved settings; the second checks the independent service and CLI readiness.

Check native connections with the tools available inside each client:

| Client | Status tool |
| --- | --- |
| Claude Code | `codex_bridge_status` |
| Codex | `claude_bridge_status`, `native_relay_status` |
| Codex / Claude with Antigravity | `antigravity_bridge_status` |
| Antigravity | `agent_bridge_status` |

Confirm a reply on each route used. Saved configuration alone does not verify live delivery.

## Use

- **Claude → Codex:** “Send this review to my Codex task in this project and wait for its reply.”
- **Codex → Claude:** “Send this result to my Claude Desktop Code session in this project.”
- **Background work:** “Send this task to a Claude worker in this project.”
- **Another computer:** from an existing AI session, use [`send_to_fleet_session`](REFERENCE.md#cross-machine-ai-sessions) to send a brief to a session in the mapped project. To inspect a particular Codex Desktop task from Codex, use [`remote_codex` over SSH](REFERENCE.md#codex-to-codex-over-ssh).

Native handoffs preserve the actual sender and destination permissions. Antigravity App replies stay in their App conversation; independent workers return separate delivery receipts.

Continue unfinished work in its original conversation. If delivery times out or is uncertain, inspect the original receipt before sending again. [Daily handoffs](docs/daily-handoffs.md)

## ChatGPT plugin

[Open Codex Bridge](https://codex-mcp-bridge.buidangminh23.chatgpt.site) to connect ChatGPT to a selected project on Windows or macOS. After installing the package, pair the connector:

```bash
codex-sites-connector --pair --site https://codex-mcp-bridge.buidangminh23.chatgpt.site --roots "/absolute/project/path"
```

On Windows use `codex-sites-connector.cmd` and a Windows project path. Open the printed pairing URL and select **Connect this computer**. Keep Codex Desktop and the connector running.

The hosted service stores account/connector identifiers, prompts, and returned results; its operator, Bui Dang Minh, can access these records. Disconnecting revokes access but does not erase history or stop dispatched tasks. Request deletion through [support](https://github.com/buidangminh23/codex-mcp-bridge/issues) without posting private content publicly. Availability follows [OpenAI's Sites access rules](https://help.openai.com/en/articles/20001547-hosting-a-plugin-with-chatgpt-sites).

### Optional workflow skill

Install the hosted workflow's Markdown instructions with:

```bash
npx skills add buidangminh23/codex-mcp-bridge --skill codex-bridge
```

Use `npx.cmd` on Windows. The skill requires the hosted plugin and a paired connector; it does not install the local bridges.

## Troubleshooting

Rerun the installation command to update, or `codex-bridge-setup` to repair settings. Use `--dry-run` to preview changes and `--check --json` to inspect configuration. Add `.cmd` on Windows.

Include the **Bridge diagnostic** block when [reporting an issue](https://github.com/buidangminh23/codex-mcp-bridge/issues). Retain the original request/delivery ID after a timeout and remove private data from surrounding logs.

## Documentation

- [Windows setup and recovery](docs/new-windows-setup.md)
- [macOS setup and recovery](docs/new-macos-setup.md)
- [Project authorization](docs/project-onboarding.md)
- [Daily Desktop handoffs](docs/daily-handoffs.md)
- [Tools, settings, SSH, and technical details](REFERENCE.md)
- [Homebrew installation](https://github.com/buidangminh23/homebrew-tap)
- [Changelog](CHANGELOG.md) · [Releases](https://github.com/buidangminh23/codex-mcp-bridge/releases)

## Optional active-install statistics

The npm version, license, and Libraries.io dependent-repository badges are generated SVGs hosted on the analytics branch. They refresh hourly and after the Publish workflow succeeds, retaining the last successful values when a source is unavailable. Badge tooltips show the last successful check; source indexing, workflow scheduling, and GitHub caching can delay updates.

Usage reporting is **off by default**. Use `codex-mcp-bridge telemetry status` to inspect it, or `telemetry enable` / `telemetry disable` to change it. Reports include a random installation ID, UTC day, version, and OS; no chats, paths, accounts, or credentials. `DO_NOT_TRACK=1` or `CODEX_BRIDGE_TELEMETRY=0` disables reporting.

[Analytics](https://buidangminh23.github.io/codex-mcp-bridge/) · [Contributing](CONTRIBUTING.md) · [MIT license](LICENSE)

TDQS

A3.5/5.0

Scored across 18 tools

Disambiguation2/5

There is a confusing cluster of near-equivalent Codex entry points: delegate_to_codex (create+send+wait), start_codex_thread (create only), send_to_codex_thread (send+wait), and wait_codex_reply (wait only). The descriptions themselves spend paragraphs explaining which one to use, which signals genuine boundary ambiguity. There are also two parallel remote-execution channels (send_to_fleet_session vs send_to_worker) and four status/introspection tools (worker_status, codex_bridge_status, inspect_bridge_project, prepare_bridge_project) whose scopes are hard to distinguish at a glance.

Naming Consistency4/5

Nearly everything follows a snake_case verb_noun pattern (list_codex_threads, send_to_worker, read_worker_delivery, prepare_bridge_project, interrupt_codex_turn). The only deviations are noun-first status tools (worker_status, codex_bridge_status) and the inconsistent domain prefixing (codex_/worker_/fleet_ used unevenly across the same verb families).

Tool Count3/5

At 18 tools this sits in the heavy end of the acceptable band. The scope is genuinely broad — Codex threads, cross-machine fleet sessions, background CLI workers, project authorization, and diagnostics — but the surface feels inflated, especially the four read/wait/status variants and the create/send/delegate trio that could collapse into fewer tools.

Completeness3/5

The Codex thread lifecycle is well covered (list, start, send, read, interrupt, open, status), but other areas have notable gaps. Workers can be sent to and read from but not cancelled or interrupted, the fleet channel has no session-listing or cancellation, and there is no thread archive/delete or rename. Agents can work around most of these, but dead ends exist.

Maintenance

ActivityActive
ResponsivenessUsually handled