Skip to main content
Glama

codex-mcp-bridge

English version

MCP server for Claude Desktop to send prompts directly into an existing Codex thread, through a shared Codex app-server. Runs on macOS, Windows, and Linux.

Not codex exec (which creates a new session every time). The bridge speaks JSON-RPC with the real Codex app-server, so the thread keeps its history, cwd, model, and rollout file.

Architecture

Claude Desktop ──stdio──> codex-mcp-bridge ──WebSocket──> codex app-server (ws://127.0.0.1:8791)
                                                                  │
Codex TUI  ──codex --remote ws://127.0.0.1:8791───────────────────┘   (cùng app-server, cùng thread live)
  • The app-server is a singleton per port. The bridge probes http://127.0.0.1:8791/readyz; if it is not alive, it spawns a detached one (codex app-server --listen ws://127.0.0.1:8791), and that app-server keeps running independently after the bridge exits.

  • Every client pointing to the same URL uses the same app-serverthread/resume with threadId rejoins the actual running thread instead of starting a new session.

  • The bridge keeps exactly one WebSocket, initializes once, and routes notifications by threadId, so multiple threads running in parallel never interfere with each other.

Related MCP server: webgpt MCP

Tools

Tool

Description

send_to_codex_thread

Sends a prompt as a user turn into threadId, waits for turn/completed, and returns Codex's reply + activity trail (commands run, files modified).

list_codex_threads

Lists threads (id, title, cwd, last updated, status) — use it to get the right threadId. loadedOnly: true shows only threads that are live in the app-server. On macOS each line also includes the deep link codex://threads/<id>.

start_codex_thread

Opens a new Codex thread in a cwd, returns threadId.

read_codex_thread

Reads the thread's recent conversation without sending anything.

interrupt_codex_turn

Stops a running turn.

open_codex_thread

macOS: brings the thread up in the Codex desktop app via codex://threads/<id> so the user can watch directly. background: true opens it without stealing focus.

codex_bridge_status

Reports the environment: platform, resolved codex binary, whether the app-server endpoint is alive, LaunchAgent + desktop app on macOS. Use it first when the bridge has issues.

send_to_codex_thread accepts additional timeoutSec (default 240), cwd, model, effort, and openInApp (macOS — opens the thread in the app before sending so you can watch live). Timing out does not cancel the turn — the bridge returns whatever it has gathered along with turnId; continue reading with read_codex_thread or stop with interrupt_codex_turn.

Install into Claude Desktop

npm install
node scripts/install-claude-desktop.mjs

The script detects the platform, creates the config file if it doesn't exist, backs up the old one (*.bak-<ngày>-codexbridge), and preserves all existing keys:

OS

Config path

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

${XDG_CONFIG_HOME:-~/.config}/Claude/claude_desktop_config.json

Result on macOS:

{
  "mcpServers": {
    "codex-bridge": {
      "command": "/Users/<user>/.local/node/v24.18.0/bin/node",
      "args": ["/Users/<user>/code/codex-mcp-bridge/src/index.mjs"],
      "env": {
        "CODEX_BIN": "/Users/<user>/.local/bin/codex",
        "CODEX_APP_SERVER_URL": "ws://127.0.0.1:8791"
      }
    }
  }
}

Restart Claude Desktop after installing.

Resolve the codex binary: Claude Desktop (and launchd) launch the MCP server with a trimmed PATH, so codex is often not on PATH. The bridge searches in this order — CODEX_BIN → the platform's usual install locations → PATH:

OS

Search order

macOS / Linux

~/.local/bin/codex~/.npm-global/bin/codex/opt/homebrew/bin/codex/usr/local/bin/codex~/.volta/bin~/.bun/bin~/.cargo/bin~/.codex/packages/standalone/current/codex/Applications/ChatGPT.app/Contents/Resources/codex (macOS only)

Windows

%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe%APPDATA%\npm\codex.cmd%ProgramFiles%\nodejs\codex.cmd

On macOS/Linux, codex is a Node script with shebang #!/usr/bin/env node, so the bridge also injects PATH (current node directory + /opt/homebrew/bin + /usr/local/bin + system dirs) into child processes — without this step, spawning the app-server dies immediately at the shebang.

macOS

Run the app-server in the background with launchd

node scripts/install-launch-agent.mjs

Create ~/Library/LaunchAgents/com.codex-mcp-bridge.app-server.plist (RunAtLoad + KeepAlive on crash, ThrottleInterval 10s) then launchctl bootstrap gui/$UID. The app-server is already alive from login, so the bridge doesn't have to spawn it, and threads are always in the live state.

launchctl print gui/$UID/com.codex-mcp-bridge.app-server | head -20   # trạng thái
node scripts/install-launch-agent.mjs --uninstall                     # gỡ

Log: ~/Library/Logs/codex-mcp-bridge/app-server.{out,err}.log.

View threads directly in the Codex desktop app

The Codex desktop app on macOS is /Applications/ChatGPT.app and registers the codex:// scheme. The bridge uses codex://threads/<threadId> to open the correct thread:

open_codex_thread { threadId: "01a0…", background: true }
send_to_codex_thread { threadId: "01a0…", prompt: "…", openInApp: true }

This is how the person assigning the task can watch Codex doing the work instead of having to read back the rollout ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl after it finishes.

Limitations on macOS

  • The Codex desktop app runs its own app-server via stdio (ChatGPT.app/Contents/Resources/codex … app-server) and does not accept an external endpoint. Threads opened in the app can still be sent to via the bridge, but by resuming from the .jsonl rollout rather than attaching live. Do not send to a thread currently running a turn in the desktop app — two app-servers writing to the same rollout can corrupt the history. Check status with list_codex_threads first, and only send when idle/notLoaded.

  • A repo on an NTFS partition of a dual-boot machine (/Volumes/...) is read-only on macOS — macOS mounts NTFS read-only. Keep a separate checkout on an APFS volume (e.g. ~/code/codex-mcp-bridge) to run and edit.

  • codex app-server daemon start uses unix:// transport with control socket ~/.codex/app-server-control/app-server-control.sock. The bridge does not use this path (a framing protocol different from WebSocket, and no public API yet) — it always talks over ws://.

Environment

Variable

Default

Meaning

CODEX_APP_SERVER_URL

ws://127.0.0.1:8791

The shared app-server endpoint.

CODEX_BIN

auto-detected

Path to codex for autostart.

CODEX_BRIDGE_AUTOSTART

1

0 = do not spawn the app-server; it must already be running.

CODEX_BRIDGE_APPROVAL

approve

How to answer approval requests from Codex. Set deny to refuse.

CLAUDE_DESKTOP_CONFIG

auto-detected per OS

Force the config path when running install-claude-desktop.mjs.

CODEX_EXE

auto-detected

Force the codex path for the two installer scripts.

About approval: Codex will ask to approve commands/patches if approval_policy is not never. No one is sitting in front of Claude Desktop to click, so the bridge automatically answers according to CODEX_BRIDGE_APPROVAL and logs to stderr. The default approve matches the configuration approval_policy = "never" + sandbox_mode = "danger-full-access" in ~/.codex/config.toml; if you tighten the sandbox, consider switching to deny.

Sharing the app-server with an interactive Codex session

Open the TUI pointing at the same endpoint so threads in the TUI and the bridge see them as one:

codex --remote ws://127.0.0.1:8791

Run the app-server manually (independent of bridge autostart):

codex app-server --listen ws://127.0.0.1:8791

Testing

npm run check

Quick check: the bridge starts, autostarts the app-server if needed, lists threads.

npm run smoke

Smoke test creates a new thread, sends 2 consecutive turns, and verifies Codex remembers the codeword from the previous turn — i.e., the thread is truly continuous rather than a new session each time.

Check the environment from inside Claude: call the codex_bridge_status tool.

Available Tools

9 tools
codex_bridge_statusCheck the Codex bridge environmentA
Read-only

Report how this bridge is wired on the current machine: platform, resolved codex binary, app-server endpoint and whether it is live, plus desktop deep-link support and macOS integrations.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds meaningful behavioral context beyond the readOnlyHint annotation by listing exactly what the tool inspects and reports, including liveness checks and desktop/macOS integration details. It does not contradict the annotations, and for a read-only status tool the disclosure of its reported fields is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that immediately states the tool's purpose and then lists the specific items reported, with no redundant phrases or filler. Every clause adds information, and the structure is easy to parse for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter status tool with readOnlyHint and openWorldHint annotations, the description is complete: it explains what the tool does, what information it exposes, and how it is bounded to the current machine. There is no output schema, so the enumerated report contents compensate appropriately and give the agent a clear model of the return value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema coverage is 100% by definition, so there is no parameter semantics to clarify. Per the baseline for zero-parameter tools, this is a solid score; the description accurately describes the tool's fixed scope without pretending there are configurable inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Report') and a specific resource ('how this bridge is wired on the current machine'), then enumerates the concrete facts returned: platform, resolved codex binary, app-server endpoint and liveness, deep-link support, and macOS integrations. This clearly distinguishes it from the sibling tools, all of which are imperative actions rather than status checks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Report how this bridge is wired' implies this is a diagnostic/status tool to be used when the agent needs environment or connectivity information. However, there is no explicit guidance about when to prefer this over the sibling tools, such as 'check this before delegating' or 'use this when an operation fails.' The usage context is clear but only implied, not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delegate_to_codexDelegate work to a new Codex sessionA
Destructive

Create a named Codex session at the requested project directory, send Claude's prompt into it, return Codex's reply, and hand the session to Codex Desktop without leaving the bridge writer lock behind.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdYesAbsolute project directory where Codex must work
nameNoOptional Codex session title; otherwise one is derived from the prompt
modelNoModel override, e.g. gpt-5.6-luna
effortNoOverride reasoning effort (default whatever ~/.codex/config.toml says)
promptYesThe complete task Claude is delegating to Codex
openInAppNoShow the task in Codex Desktop; native tasks open immediately while running
timeoutSecNoHow long to observe the task (Desktop caps the entire call, including creation, at 40s; the task continues and its threadId is returned)
releaseAfterTurnNoUnsubscribe this thread after a terminal turn; open Desktop only after its unload is confirmed

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations already covering destructiveHint/openWorldHint, the description adds genuine behavioral context: the operation returns Codex's reply, hands the session to Codex Desktop, and specifically avoids leaving the bridge writer lock behind. This discloses a side-effect and cleanup detail that annotations cannot convey. No contradiction with the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense sentence with zero filler: every clause carries one phase of the operation, and the distinctive lock-cleanup behavior is placed last for emphasis without bloating the description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter destructive tool with no output schema, the description captures the main flow but omits the return shape; the timeoutSec parameter reveals that a threadId is returned on timeout, but the description only says 'return Codex's reply'. An agent knows what the tool does but not precisely what it gets back or how the desktop handoff interacts with the timeout case.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description only loosely reinforces cwd (project directory), name (named session), and prompt. It adds nothing about model, timeoutSec, or releaseAfterTurn beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a precise verb chain (create session, send prompt, return reply, hand to Desktop) with a specific resource (a new Codex session at a project directory). This clearly differentiates it from send_to_codex_thread, which implies messaging an existing thread, without needing to open the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: creating a fresh named session and handing it to Desktop suggests delegation of work to a new Codex context. However, the description never explicitly says when to choose this over sending to an existing thread, nor does it name alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

interrupt_codex_turnInterrupt a Codex turnA
DestructiveIdempotent

Stop a turn that is still running in a Codex thread.

ParametersJSON Schema
NameRequiredDescriptionDefault
turnIdYesTurn id reported by send_to_codex_thread
threadIdYesCodex thread id

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark destructiveHint=true and readOnlyHint=false, so the description carries a lower burden. It adds the useful condition that the turn must be still running, but it does not disclose side effects such as whether partial output is lost or whether the thread remains usable after interruption.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence with no redundant content. It conveys the action, target, and condition in twelve words, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with full schema coverage and annotations covering the destructive and idempotent nature, the description captures the core action and the key condition (still running). It lacks only minor detail about post-interruption behavior, which is not essential for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and both parameters have clear descriptions in the schema (turnId is reported by send_to_codex_thread, threadId is the Codex thread id). The description adds no additional parameter-level meaning, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Stop') and resource ('a turn ... in a Codex thread'), clearly distinguishing it from sibling tools that operate on threads or the app server. The qualifying phrase 'still running' further narrows the scope and makes the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'still running' implies the intended use case—interrupting an active turn—but the description provides no explicit guidance on when not to use it or how it relates to alternatives like stop_codex_app_server. No when-to-use or when-not-to-use conditions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_codex_threadsList Codex threadsA
Read-only

List recent Codex threads (id, title, cwd, last update, status) so you can pick the exact threadId to talk to.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOnly threads whose session cwd matches this path exactly
limitNoHow many threads to return (default 15)
loadedOnlyNoOnly threads currently loaded/live inside this app-server (default false)
searchTermNoSubstring filter on the thread title

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true and openWorldHint=true, so this is clearly a non-destructive operation. The description adds value by specifying the exact output fields and its purpose, which is especially useful since no output schema is present. It does not describe sorting or the exact source scope, but the annotations lower the bar for side-effect disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the verb, resource, and output fields, then states the practical purpose. There is no redundant filler or repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only list tool with a fully described schema and no required parameters, the description is nearly complete: it names the output fields and the intended follow-up action. It could be slightly more explicit about whether it lists only app-server-loaded threads or all persistent threads, but the loadedOnly parameter and sibling context make this a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and every parameter (cwd, limit, loadedOnly, searchTerm) already has a meaningful description, including the default limit of 15. The description adds no additional parameter-level meaning, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb-resource pair ('List recent Codex threads') and enumerates the returned fields (id, title, cwd, last update, status). It also gives a clear goal — picking the exact threadId to talk to — which distinguishes this read-only listing tool from sibling action tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: before interacting with a thread, when the agent needs to resolve a threadId. It does not explicitly name sibling alternatives or state when not to use it, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

open_codex_threadOpen a Codex thread in the desktop appA
Idempotent

Bring a Codex thread to the front on Windows or macOS using (codex://threads/) so a human can watch the work live instead of reading the transcript afterwards.

ParametersJSON Schema
NameRequiredDescriptionDefault
threadIdYesCodex thread id
backgroundNoOpen without stealing focus from the current app (default false)

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (idempotent, non-destructive), the description adds platform scope, the URI scheme, and the UI-focus side effect. It does not cover failure behavior such as an invalid thread ID or the desktop app not running, but there is no contradiction with the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence that front-loads the action and resource, then gives the purpose. No filler and no repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description plus schema adequately cover the key call details for a low-complexity UI-focus operation. It does not explicitly state return or error behavior, but no output schema exists and the intent is clear, leaving only a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds extra value by showing the exact codex://threads/<id> format for threadId, helping the agent construct a valid call beyond the schema's simple 'Codex thread id'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action ('bring... to the front'), a specific resource (Codex thread), platform scope (Windows/macOS), and mechanism (codex://threads/<id>). This clearly distinguishes it from siblings like read_codex_thread or send_to_codex_thread.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description conveys when to choose this tool: when a human should watch the work live instead of reading a transcript. It does not explicitly name alternatives or exclusion criteria, but the contextual purpose is clear enough for an agent to route correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_codex_threadRead a Codex threadA
Read-only

Read the recent conversation of a Codex thread without sending anything.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoHow many recent messages to show (default 10)
threadIdYesCodex thread id

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation already covers the safety profile, and the description adds useful domain-specific context by stating that it sends nothing to the thread. This meaningfully clarifies that the tool is non-participatory, not merely read-only at the data layer. It does not describe the return format, but that is a smaller gap given the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It immediately states the action, the target, and the key non-sending behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with two well-documented parameters and a readOnlyHint annotation, the description is largely sufficient. It is missing explicit guidance about how the returned conversation is shaped and when open_codex_thread would be a better choice, but these are minor completeness gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for threadId and limit including default and bounds. The tool description itself adds no parameter-specific meaning beyond 'recent conversation,' which aligns with the limit parameter. Baseline of 3 is appropriate because the schema carries the parameter documentation burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Read'), a specific resource ('recent conversation of a Codex thread'), and adds a meaningful qualifier ('without sending anything') that differentiates it from send_to_codex_thread. It does not explicitly distinguish it from open_codex_thread, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'without sending anything' implies the tool is for passive, non-mutating inspection of a thread, which gives some usage context. However, the description does not explicitly state when to use this tool versus open_codex_thread, list_codex_threads, or other siblings, nor does it name alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

send_to_codex_threadSend a prompt to a Codex threadA
Destructive

Send a prompt as a new user turn inside an existing Codex thread and wait for Codex to answer. The thread keeps its full history, cwd and model. Use list_codex_threads first if you do not know the threadId. Desktop-owned tasks must use Desktop native delivery; an open task is a valid destination. If legacy delivery reports an active writer, inspect codex_bridge_status and repair the native relay/configuration. Do not close the task, create a replacement, or ask the user to copy the message manually.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoOverride the working directory for this turn
nameNoOptional title to show for this Codex session
modelNoOverride the model for this turn
effortNoOverride reasoning effort (default whatever ~/.codex/config.toml says)
promptYesThe message to send to Codex, exactly as a user would type it
threadIdYesCodex thread id (UUID) - get it from list_codex_threads
openInAppNoOpen the thread in Codex Desktop on Windows or macOS so a human can watch it live
timeoutSecNoHow long to observe the task (Desktop caps the entire call at 40s; the task continues and its threadId is returned)
releaseAfterTurnNoUnsubscribe this thread after a terminal turn; open Desktop only after its unload is confirmed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare destructiveHint=true and readOnlyHint=false. The description adds meaningful behavioral context: it waits for Codex to answer, preserves thread history/cwd/model, warns against closing the task, and explains the timeout behavior. It also details desktop delivery constraints and repair steps. This goes beyond the annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately long but every sentence contributes: it states the action, gives usage guidance, lists constraints, and provides an error-handling path. It is front-loaded with the primary purpose and structured logically. It is not overly verbose, though it could be trimmed slightly without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 9 parameters and no output schema, the description covers usage, constraints, and error handling. It does not explicitly describe the return format, but the phrase 'wait for Codex to answer' implies the answer is returned. The description also addresses edge cases like desktop delivery and timeouts. The only minor gap is the lack of an explicit return type, but this is likely inferred.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining that threadId comes from list_codex_threads, that cwd and model are overrides for the thread's defaults (since the thread keeps its own), and that timeoutSec is capped at 40s on Desktop with the task continuing. It does not explain releaseAfterTurn, but the parameter name and schema description cover it. Overall, it enhances parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('send a prompt as a new user turn inside an existing Codex thread'), identifies the resource (prompt) and the destination (existing thread), and implicitly distinguishes from siblings by emphasizing 'existing' and pointing to list_codex_threads for threadId discovery. It is clear and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs to use list_codex_threads when threadId is unknown, specifies the condition for Desktop-owned tasks (must use native delivery), and gives a fallback action when legacy delivery reports an active writer (inspect codex_bridge_status). This provides clear when-to-use and when-not-to-use guidance with alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

start_codex_threadStart a new Codex threadA
Destructive

Start a Codex task. In Desktop mode include the initial prompt to create and assign a visible task atomically; use delegate_to_codex to also wait for its reply.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdYesAbsolute working directory for the new Codex session
nameNoOptional title to show for the new Codex session
modelNoModel override, e.g. gpt-5.6-luna
promptNoInitial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false. The description adds useful behavioral context by mentioning atomic task creation, visible task assignment, and the fact that this tool does not wait for the reply, which is a meaningful behavioral distinction from its sibling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences deliver the core purpose and the most important usage distinction without filler. The main action is front-loaded, and the sibling routing guidance is efficiently integrated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with a straightforward purpose, the description plus rich schema and annotations provide enough context to invoke it correctly. It does not describe the return value or non-Desktop mode behavior explicitly, but the sibling list and schema fill most practical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents each parameter including cwd, name, model, and prompt. The description adds only a small amount of context tying the prompt to Desktop-mode task creation, but it does not meaningfully expand on the schema's own parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Start a Codex task' with a specific verb and resource, and the title reinforces that it creates a new thread. It also distinguishes itself from delegate_to_codex by noting that the delegate variant additionally waits for the reply.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit context for Desktop mode, telling the agent to include the initial prompt when creating a visible task atomically. It also names delegate_to_codex as the alternative when waiting for a reply, though it does not enumerate all other sibling alternatives or explicitly state non-Desktop mode behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stop_codex_app_serverStop the shared Codex app-serverA
DestructiveIdempotent

Stop the shared app-server this bridge talks to. Use it when work is handed off and the Codex desktop app is open: two app-servers on the same ~/.codex state make the app stutter. The bridge starts a new one automatically the next time it needs it.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already signal idempotent and destructive, and the description adds meaningful context beyond them: the shared-server scope, the stuttering problem it prevents, and automatic restart by the bridge on next use. It does not detail effects on in-flight Codex threads, but 'when work is handed off' and the auto-start note cover the main behavioral concerns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, each earning its place: what it stops, when to use it and why, and what happens next. The key trigger is front-loaded after the opening statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, no-output-schema tool, the description covers purpose, trigger conditions, rationale, and post-call behavior. The sibling context and annotations complete the picture without requiring extra prose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and 100% schema coverage, so there is no parameter meaning to add. The description correctly implies this is a direct action with no inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Stop the shared app-server this bridge talks to.' It distinguishes this tool from the thread/turn siblings by naming the bridge's app-server as the target, making its unique role clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit trigger: 'Use it when work is handed off and the Codex desktop app is open,' plus the reason ('two app-servers on the same ~/.codex state make the app stutter'). It also reassures about the next startup, so an agent knows when it is safe and expected to call it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updates
    • Changeddelegate_to_codex2 fields changed
      • changedInput schema / properties / openInApp / description
        Previous value: -"Open the finished session in Codex Desktop on Windows or macOS"New value: +"Show the task in Codex Desktop; native tasks open immediately while running"
      • changedInput schema / properties / timeoutSec / description
        Previous value: -"How long to wait for the turn to finish (default 240s)"New value: +"How long to observe the task (Desktop caps the entire call, including creation, at 40s; the task continues and its threadId is returned)"
    • Changedsend_to_codex_thread1 field changed
      • changedInput schema / properties / timeoutSec / description
        Previous value: -"How long to wait for the turn to finish (default 240s)"New value: +"How long to observe the task (Desktop caps the entire call at 40s; the task continues and its threadId is returned)"
    • Changedstart_codex_thread1 field changed
      • addedInput schema / properties / prompt
        Added value: +{
        +  "description": "Initial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately",
        +  "minLength": 1,
        +  "type": "string"
        +}
  2. 2 tool updatesv1.12.3
    • Changeddelegate_to_codex1 field changed
      • changedInput schema / properties / releaseAfterTurn / description
        Previous value: -"Stop the bridge app-server after a terminal turn so Codex Desktop owns the writer lock"New value: +"Unsubscribe this thread after a terminal turn; open Desktop only after its unload is confirmed"
    • Changedsend_to_codex_thread1 field changed
      • changedInput schema / properties / releaseAfterTurn / description
        Previous value: -"Stop the bridge app-server after a terminal turn so Codex Desktop owns the writer lock"New value: +"Unsubscribe this thread after a terminal turn; open Desktop only after its unload is confirmed"
  3. 9 tool updatesv1.11.2
    • First observedcodex_bridge_status
    • First observeddelegate_to_codex
    • First observedinterrupt_codex_turn
    • First observedlist_codex_threads
    • First observedopen_codex_thread
    • First observedread_codex_thread
    • First observedsend_to_codex_thread
    • First observedstart_codex_thread
    • First observedstop_codex_app_server

TDQS

A4.1/5.0

Scored across 9 tools

Disambiguation4/5

Most tools target distinct actions (list, read, open, interrupt, status), and send_to_codex_thread is clearly for existing threads while delegate_to_codex creates a new session. The main ambiguity is delegate_to_codex versus start_codex_thread, which both create a new Codex task; the descriptions mitigate this by noting that delegate waits for a reply.

Naming Consistency4/5

The names mostly follow a verb_codex_noun pattern in snake_case (list_codex_threads, read_codex_thread, start_codex_thread). Minor deviations are codex_bridge_status, which is noun-first, and delegate_to_codex, which uses a preposition rather than the object-noun structure.

Tool Count5/5

Nine tools is a well-scoped set for a Codex bridge: thread lifecycle, UI handoff, status inspection, and server control are each represented. No tool feels redundant or like filler.

Completeness4/5

The surface covers the core workflow: list, read, send, start/delegate, interrupt, open, status, and stopping the app server. There is no explicit close/delete/archive tool, but the descriptions suggest tasks are meant to remain open, so this is a minor gap rather than a dead end.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers