Codex Delegate MCP
A bridge that hands coding work to the OpenAI Codex CLI — delegate tasks, review diffs, cancel runs, and diagnose setup.
delegatein agent mode — implement a coding task (multi-file edits) from a brief, in an existing workspace.planmode — get schema-validated implementation steps to approve before building.askmode — ask Codex questions about code without editing.reviewmode — run Codex's native reviewer on uncommitted changes, a base branch, or a specific commit.Resume — continue an earlier run with
resumeThreadId.Tune the run — pick
model,reasoningEffort, Fast mode, web search, and a whole-runtimeoutMs.cancel— stop one delegation, all runs on a thread, or everything; waits for settlement.doctor— diagnose plugin/CLI/login/workspace issues, plusdeepmodel-catalog and quota checks.
Delegates coding tasks to the OpenAI Codex CLI, enabling agents to plan, implement, ask questions, and review code, with structured results, thread management, and cancellation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Codex Delegate MCP Refactor auth module to async/await and add unit tests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
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.

🧠 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.
Related MCP server: harness-bridge
⚡ 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.


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 thethreadIdto continue from. Fields that carry no signal are omitted.📋 Plan first, then build it on the same thread —
planreturns schema-validated steps for you to approve, andagentimplements them.askanswers questions.reviewruns Codex's own reviewer over uncommitted work, a base branch, or a single commit.🧵 Resume — continue a Codex thread with
resumeThreadId.resumed: falsetells you the context did not carry over.🧑🤝🧑 Run several, cancel cleanly — the same question across models, or independent workers on independent directories.
cancelwaits 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
/plugin marketplace add andreilungeanu/codex-delegate-mcp
/plugin install codex-delegate@codex-delegate-mcpThen 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
Or add it under Customize → MCPs in the sidebar, or in ~/.cursor/mcp.json (every project) or .cursor/mcp.json (this project):
{
"mcpServers": {
"codex-delegate": {
"command": "npx",
"args": ["-y", "codex-delegate-mcp"]
}
}
}Then ask Cursor to delegate implementation to Codex the same way.
Google Antigravity
agy plugin install https://github.com/andreilungeanu/codex-delegate-mcpRestart 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
copilot plugin marketplace add andreilungeanu/codex-delegate-mcp
copilot plugin install codex-delegate@codex-delegate-mcpThe server alone, without the skill: copilot mcp add codex-delegate -- npx -y codex-delegate-mcp.
More clients
{
"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).
Under Settings → Tools → AI Assistant → Model Context Protocol (MCP), click Add and paste this JSON:
{
"mcpServers": {
"codex-delegate": {
"command": "npx",
"args": ["-y", "codex-delegate-mcp"]
}
}
}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.
{
"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.
{
"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 does not use mcpServers. Local servers go under mcp, with type: "local" and command as one array:
{
"$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).
{
"mcpServers": {
"codex-delegate": {
"command": "npx",
"args": ["-y", "codex-delegate-mcp"],
"timeoutSeconds": 21660
}
}
}Same shape as OpenCode: type: "local" and command as one array.
{
"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.
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):
{
"mcpServers": {
"codex-delegate": {
"command": "npx",
"args": ["-y", "codex-delegate-mcp"]
}
}
}MIT © Andrei Lungeanu
Configuration · Security · Privacy · Terms · Changelog
Available Tools
3 toolscancelADestructiveIdempotent
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).
Inputs: threadId, delegationId.
delegateADestructive
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.
Inputs: spec (required), workspace (required), fast, mode, +6 more.
doctorARead-onlyIdempotent
Diagnose plugin/CLI/login, recursion, and workspace (default: server cwd). deep adds no-quota help and model-catalog checks.
Inputs: deep, workspace.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools map to clearly separate lifecycle phases: starting a run (delegate), stopping one (cancel), and diagnosing the environment (doctor). Their scopes are orthogonal, so an agent cannot reasonably misselect between them.
All three names are single lowercase verbs (delegate, cancel, doctor), giving a predictable, readable convention. It deviates from the classic verb_noun pattern only because the domain is a single resource type, so no noun is needed.
Three tools is on the lean side but each covers a genuinely distinct need for a focused delegation plugin. Nothing feels padded or redundant, though the surface is minimal.
The delegate description tells agents to 'check status before trusting result,' yet there is no explicit status, list, or result-retrieval tool — status appears only implicitly through delegate's return value. That leaves a notable gap for inspecting or enumerating runs, even though start/cancel/diagnose is covered.
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Goal and task planning MCP for Codex and AI agents, with evidence-backed completion.
Coordinate coding agents through MCP using existing AI plans, saved work, and independent checks.
AI-powered spec-to-task decomposition and execution orchestration for coding agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP bridge for calling local coding-agent CLIs (Codex, Claude) from another agent, enabling bounded tasks like code review, verification, and bug hunting.MIT
- AlicenseAqualityBmaintenanceBridges Claude Code and OpenAI Codex through MCP, allowing cross-harness querying, code review, explanation, and implementation delegation.63 npm1MIT
- AlicenseAqualityBmaintenanceBridges multiple CLI coding agents (Codex, Cursor, OpenCode, Claude, Antigravity) into any MCP client, enabling delegation of prompts, parallel execution, and code review workflows.671 npmMozilla Public 2.0
- AlicenseBqualityBmaintenanceLocal-first multi-agent delegation and approval control for Codex via MCP, with persistent task DAG, isolated worktrees, and a web console.181MIT