codex-delegate
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-delegatehave sol 6 implement the CSV export, then you review the diff"
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.
claude-codex-delegate
Give Claude OpenAI's Codex models as implementers: GPT-6 Sol, Astra and Luna, GPT-5.6 Sol, Terra and Luna, and whatever else your Codex account lists. Claude stays the orchestrator. It plans the work, briefs the Codex model, reviews the diff, and runs the tests.
you ▸ let sol 6 implement the CSV export, you review it
claude ▸ delegate(model: "sol 6", prompt: "<self-contained brief>")
↳ gpt-6-sol edits src/export.ts, runs tests …
claude ▸ reviews the diff, runs `bun test`, and reports backIt's a sibling of claude-opencode-delegate, with the same tools and workflow, backed by the Codex CLI instead of OpenCode.
It works in:
Claude Code (CLI, IDE, desktop): you can ask directly, use
/codex, use thecodex-workersubagent, or use it from dynamic workflows.Claude Desktop, as a plain MCP server.
How it works
Claude Code / Claude Desktop / subagent / workflow
│ MCP (stdio)
▼
codex-delegate MCP server (Bun)
│ spawns
▼
codex exec --json -m <model> -s <sandbox> -c approval_policy="never" (or: codex exec resume <id> …)The server shells out to the codex CLI, so it uses your existing Codex login (ChatGPT plan or API
key), ~/.codex/config.toml, AGENTS.md files, MCP servers and rules. It does not use a separate API.
Related MCP server: claude-code-codex-agents
Requirements
Bun ≥ 1.1
Codex CLI, logged in (
codex login). Runcodexonce so the model list is cached in~/.codex/models_cache.json.
Install
Claude Code: plugin (recommended)
/plugin marketplace add aashahin/claude-codex-delegate
/plugin install codex-delegate@claude-codex-delegateFor a local checkout, use /plugin marketplace add /path/to/claude-codex-delegate.
This gives you the MCP server, the codex-delegate skill, the codex-worker subagent, and the /codex command.
Claude Code: MCP server only
git clone https://github.com/aashahin/claude-codex-delegate ~/.local/share/claude-codex-delegate
claude mcp add codex -s user -- bun ~/.local/share/claude-codex-delegate/dist/index.jsClaude Desktop
Clone the repo as shown above. Then add the server to claude_desktop_config.json:
{
"mcpServers": {
"codex": {
"command": "/home/YOU/.bun/bin/bun",
"args": ["/home/YOU/.local/share/claude-codex-delegate/dist/index.js"],
"env": { "CODEX_DELEGATE_CWD": "/home/YOU/projects/my-app" }
}
}
}Use absolute paths, because Desktop doesn't load your shell PATH. The server searches for codex
in ~/.bun/bin, ~/.local/bin, ~/.npm-global/bin, ~/.cargo/bin, /usr/local/bin and
/opt/homebrew/bin. If yours is somewhere else, set CODEX_BIN.
Usage
Talk to Claude normally:
"Use sol 6 to implement pagination for /api/users. You review it."
"Ask codex for a read-only second opinion on this diff."
"Have sol 6 and 5.6 terra both implement the parser in separate worktrees, then pick the better one."
/codex sol 6#high -- write unit tests for src/date.ts"Spawn codex-worker subagents: luna does the docs, sol does the tests."
Model names and effort
You can use exact slugs (gpt-6-sol) or loose names (sol 6, sol6, gpt 6 luna, 5.6 terra).
A version you name must match exactly, so
sol 6never becomesgpt-5.6-sol.Without a version, the newest family wins:
solresolves togpt-6-sol.gpt 6matches Astra, Sol and Luna, so you get the candidates instead of a guess.A slug the cache doesn't know yet (e.g.
gpt-7-nova) is passed through as-is.Set reasoning effort with
effortor a suffix:sol 6#max. It's checked against the levels the model supports. If you leave it out,model_reasoning_effortfrom yourconfig.tomlapplies.If you don't name a model,
gpt-6-solis used. Follow-ups withsession_idkeep the session's model.
Tools
Tool | What it does |
| Lists your account's Codex models and their reasoning efforts. Takes an optional |
| Runs a task and waits for it. Returns the response, |
| Same as |
| Collect results (with |
| Lists recent Codex sessions for a directory, so you can find one to continue. |
delegate and delegate_async take these arguments:
prompt,modelandeffortcwdandimages(screenshots, mockups)session_idandforkto follow up in an earlier sessionsandboxorauto,title, andtimeout_s
Sandbox
| |
| Codex can edit files under |
| No edits. |
| No sandbox: package installs, network, and the whole filesystem. Only pass it per call when a task needs it. |
Approvals are always never, because nobody is there to answer a prompt. The sandbox is the
boundary. Claude is told to review every change it gets back.
Using it from workflows
Workflow agent() calls and subagents can use the MCP tools directly or through the codex-worker
agent. If you fan out tasks that edit files, give each one its own git worktree so they don't
conflict.
Configuration (env vars)
Variable | Default | |
| auto-detected | Path to the |
|
| Where the model cache and sessions are read from. This is the same variable Codex uses. |
|
| Model used when |
| same as the default model | Model used when |
| (from config.toml) | Default reasoning effort. |
|
| Default sandbox. |
|
| Default for |
|
| Seconds before a run is killed. |
|
| Maximum number of response characters returned to Claude. |
| the server's cwd | Base directory for |
Development
bun install
bun test # unit tests (fixtures captured from real `codex exec --json`)
bun run typecheck
bun run build # bundles to dist/index.js, which is committed so installs need no build step
bun run start # run the server from sourceTo debug interactively, use bunx @modelcontextprotocol/inspector bun dist/index.js.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Build and supervise fleets of agents from Claude Code, Codex or Cursor. Connects over OAuth.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Codex to delegate tasks to Claude Code, allowing Claude to investigate, edit, and verify changes in the repository with background job management.2 npmMIT
- AlicenseAqualityDmaintenanceEnables Claude Code to delegate tasks to OpenAI's Codex CLI (GPT-5.4) with structured execution traces, parallel execution, session persistence, and adversarial code review.15MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex to delegate tasks to interactive Claude Code sessions as role-controlled subagents for exploration, code review, and implementation, using the existing Claude Code installation on macOS.MIT
- AlicenseNot gradedqualityAmaintenanceLets Codex delegate coding and repository work to an installed Claude Code CLI with permission-aware inspect/write access, model and effort selection, resumable and cloud-attached sessions, and durable synchronous or asynchronous jobs.MIT