Codex Delegate

io.github.andreilungeanu由 GitHub 帳號 andreilungeanu 發布v2.8.0更新於 Nov 8, 2026

Bridge AI coding hosts to the OpenAI Codex CLI for delegated implementation.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

把 MCP 用戶端接到 OpenAI Codex CLI,讓助理把程式實作委派出去並審閱回傳的差異。

可以做什麼
  • 規劃並實作程式變更:先產生經結構驗證的步驟,再讓 Codex 在同一執行緒上完成
  • 回答問題,並用 Codex 內建的審查器檢查未提交的變更、基準分支或單一提交
  • 回傳一份精簡的 JSON 結果,包含狀態、變更的檔案、token 計數與執行緒 ID
  • 續接先前的 Codex 執行緒,平行執行多個委派任務,並取消執行中的任務
  • 透過 doctor 檢查診斷安裝設定問題
適用情境
適合希望主要編碼助理把上下文用在規劃與審閱、由獨立的 Codex CLI 程序完成多檔案修改的情況,也適合把實作工作轉到另一份用量額度上。
執行需求
透過 npx 以 stdio 在本機執行(npm 套件 codex-delegate-mcp)。需要 Node.js 20+,並已安裝 OpenAI Codex CLI 且以 codex login 登入。僅支援桌面版 MCP 用戶端;未宣告環境變數或標頭。
安裝前請注意
委派的工作在 Codex CLI 上執行並消耗其自身用量,與協調助理的額度分開計費。Codex 會直接修改專案檔案,接受變更前應先審閱回傳的差異。安裝依賴本機既有的 Codex 登入狀態。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Codex Delegate,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Codex Delegate

Stop burning your frontier agent's limits on boilerplate.

Delegate implementation to the OpenAI Codex CLI — your agent writes the brief and reviews the diff.

[npm version] [npm downloads] [MCP Registry] [codex-delegate-mcp MCP server] [node] [license: MIT] [tests]

[Codex Delegate logo]

Use your best coding agent where its judgment matters most: understanding the task, shaping the plan, and reviewing the result.

Codex Delegate is the MCP bridge that lets Claude Code, Cursor, Copilot — or any MCP client — hand implementation to the OpenAI Codex CLI, then get a clean, structured result back for review.


[A terminal recording of Claude Code delegating to Codex: a health check confirms the Codex CLI, auth and model catalog; an ask-mode run diagnoses why the demo repo prints "today 0", naming commitDay() bucketing by UTC while cellDay() labels by local time, with line numbers; one sentence then fans out to two Codex models at once — one editing the repo, one researching in a separate directory — and the fix lands with tests passing and the footer reading today 4, current streak 23, longest streak 23; finally Codex reviews its own diff and reports three findings]

🧠 Frontier quality, kept

Your assistant does what frontier models are actually for: understands the task, writes a precise brief, reviews the finished diff. Codex holds its own as the implementer — guided and checked by a smarter orchestrator. The result reads like frontier work, because a frontier model planned it and signed off on it.

⚡ Done faster

Codex tears through multi-file edits while a frontier chat model would still be streaming the first file. You delegate, keep working with your assistant, and the diff shows up done.

🔋 Your limits stop being the bottleneck

Delegated work runs on the OpenAI Codex CLI and its own usage — separate from your orchestrator's chat quota, though the Codex side still bills its own way. Your Claude, Cursor, or Copilot subscription spends tokens on the brief and the review; Codex does the grinding. On API? That's the per-token grind moved off your main bill.

[You and your agent understand the task, write the brief and review the diff; the MCP delegate tool hands that brief to the OpenAI Codex CLI, which implements it and edits your workspace; one compact JSON result comes back with what changed, which files, and the thread id]

[A delegate result: one compact JSON block with the final answer, status, thread and delegation ids, workspace, Codex CLI version, cumulative thread token usage, and the files the edit tools reported changing]

Features

  • 📦 One result you can review — a compact JSON block: the final answer, status, the files Codex's edit tools reported changing, cumulative thread token counts, and the threadId to continue from. Fields that carry no signal are omitted.
  • 📋 Plan first, then build it on the same thread — plan returns schema-validated steps for you to approve, and agent implements them. ask answers questions. review runs Codex's own reviewer over uncommitted work, a base branch, or a single commit.
  • 🧵 Resume — continue a Codex thread with resumeThreadId. resumed: false tells you the context did not carry over.
  • 🧑‍🤝‍🧑 Run several, cancel cleanly — the same question across models, or independent workers on independent directories. cancel waits for the exit and warns when a process outlives the kill deadline.
  • 🤝 One-command install — Claude Code, Google Antigravity, GitHub Copilot CLI, Cursor and VS Code take it as a plugin, with a skill that teaches your agent how to delegate well. Cursor and VS Code install the server in one click; JetBrains, Devin Desktop (Windsurf), Visual Studio and the rest add the stdio server in settings.
  • 🩺 doctor — tells you exactly what's missing if setup isn't right.

Install

You need Node.js 20+ and the OpenAI Codex CLI, already logged in (codex login).

Claude Code

shell
/plugin marketplace add andreilungeanu/codex-delegate-mcp/plugin install codex-delegate@codex-delegate-mcp

Then just ask:

Delegate to Codex: migrate src/api from callbacks to async/await and update the tests, then walk me through what changed.

That's the whole loop — Claude writes the brief, Codex grinds through the files, Claude walks you through the diff.

Cursor

[Add to Cursor]

Or add it under Customize → MCPs in the sidebar, or in ~/.cursor/mcp.json (every project) or .cursor/mcp.json (this project):

json
{  "mcpServers": {    "codex-delegate": {      "command": "npx",      "args": ["-y", "codex-delegate-mcp"]    }  }}

Then ask Cursor to delegate implementation to Codex the same way.

Google Antigravity

shell
agy plugin install https://github.com/andreilungeanu/codex-delegate-mcp

Restart the Antigravity app to load it. If you added codex-delegate to mcp_config.json by hand, remove that entry.

Without the CLI, use the manual config under More clients.

GitHub Copilot CLI

shell
copilot plugin marketplace add andreilungeanu/codex-delegate-mcpcopilot plugin install codex-delegate@codex-delegate-mcp

The server alone, without the skill: copilot mcp add codex-delegate -- npx -y codex-delegate-mcp.

More clients

VS Code — one-click install, or .vscode/mcp.json

[Install in VS Code] [Install in VS Code Insiders]

json
{  "servers": {    "codex-delegate": {      "type": "stdio",      "command": "npx",      "args": ["-y", "codex-delegate-mcp"]    }  }}

Or run Chat: Install Plugin From Source with this repository's URL (needs the chat.plugins.enabled setting).

JetBrains AI Assistant — Settings → Tools → AI Assistant → MCP

Under Settings → Tools → AI Assistant → Model Context Protocol (MCP), click Add and paste this JSON:

json
{  "mcpServers": {    "codex-delegate": {      "command": "npx",      "args": ["-y", "codex-delegate-mcp"]    }  }}
Devin Desktop (formerly Windsurf) — ~/.config/devin/mcp_config.json

This config is for Devin Local, the default agent (Local 3.6+). On Windows the file is %APPDATA%\devin\mcp_config.json. Legacy Cascade and older Windsurf builds read ~/.codeium/windsurf/mcp_config.json.

json
{  "mcpServers": {    "codex-delegate": {      "command": "npx",      "args": ["-y", "codex-delegate-mcp"]    }  }}

Heads-up: Devin Desktop's Cascade agent caps you at 100 tools across all servers.

Visual Studio 2026 / 2022 — %USERPROFILE%\.mcp.json
json
{  "servers": {    "codex-delegate": {      "type": "stdio",      "command": "npx",      "args": ["-y", "codex-delegate-mcp"]    }  }}

Visual Studio 2022 needs 17.14+. Note the top-level key is servers, not mcpServers. A .mcp.json in the solution directory scopes it to that solution.

OpenCode — ~/.config/opencode/opencode.json or project opencode.json

OpenCode does not use mcpServers. Local servers go under mcp, with type: "local" and command as one array:

json
{  "$schema": "https://opencode.ai/config.json",  "mcp": {    "codex-delegate": {      "type": "local",      "command": ["npx", "-y", "codex-delegate-mcp"],      "enabled": true    }  }}

This is the v1 shape, which OpenCode v2 still reads (v2's native form is mcp.servers).

Google Antigravity (without the plugin) — ~/.gemini/config/mcp_config.json or workspace .agents/mcp_config.json
json
{  "mcpServers": {    "codex-delegate": {      "command": "npx",      "args": ["-y", "codex-delegate-mcp"],      "timeoutSeconds": 21660    }  }}
Kilo Code — kilo.jsonc (mcp key, not mcpServers)

Same shape as OpenCode: type: "local" and command as one array.

json
{  "mcp": {    "codex-delegate": {      "type": "local",      "command": ["npx", "-y", "codex-delegate-mcp"],      "enabled": true    }  }}

In the VS Code extension: Settings → MCP → Add Server → Local (stdio). On Windows, if npx is not found, use command cmd with arguments /c, npx, -y, codex-delegate-mcp.

Zed — Settings → AI → MCP Servers, or context_servers in Zed settings
json
{  "context_servers": {    "codex-delegate": {      "command": "npx",      "args": ["-y", "codex-delegate-mcp"],      "env": {}    }  }}

Zed's native agent uses this, and Zed forwards these servers to external agents over ACP; those agents may also read their own MCP config.

Kiro and any other MCP client

Add the following server to the client's MCP config — for Kiro, ~/.kiro/settings/mcp.json (user) or .kiro/settings/mcp.json (workspace):

json
{  "mcpServers": {    "codex-delegate": {      "command": "npx",      "args": ["-y", "codex-delegate-mcp"]    }  }}

MIT © Andrei Lungeanu

Configuration · Security · Privacy · Terms · Changelog

來源:README.md,提交 993cb89

工具

3

delegate

Delegate coding task to Codex

Delegate a coding task to OpenAI Codex. Never run codex from the shell — use this tool. Check status before trusting result — a run that spawns then fails returns normally. Set spec, workspace and mode, plus resumeThreadId to resume and reviewTarget in review; leave every other field at its default unless the user asks. See the delegate skill.

輸入參數fastmodespec必填modeltimeoutMswebSearchworkspace必填reviewTargetresumeThreadIdreasoningEffort

cancel

Cancel Codex delegation

Cancel active runs. delegationId selects one (announced in progress before spawn — the only handle if a run wedges at startup), threadId all on its thread, neither all. Waits for settlement; if a process tree survives the kill deadline, it still returns and the delegate result warns. Status: cancelled, nothing-active, or not-found (no active run with this ID).

輸入參數threadIddelegationId

doctor

Diagnose Codex delegation setup

Diagnose plugin/CLI/login, recursion, and workspace (default: server cwd). deep adds no-quota help and model-catalog checks.

輸入參數deepworkspace

版本歷史

6
  1. v2.7.0Nov 7, 2026
  2. v2.6.0Oct 22, 2026
  3. v2.5.0Oct 5, 2026
  4. v2.4.0Oct 4, 2026
  5. v2.3.0Sep 25, 2026
  6. v2.2.1Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分