Run Codex from Claude Code over MCP
Wire OpenAI's Codex CLI into Claude Code as a second agent with four lines of .mcp.json. The argument is codex mcp-server, not codex mcp.
The whole config
Drop this in .mcp.json at your repo root and Claude Code can hand tasks to Codex as a second agent:
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "codex",
"args": ["mcp-server"]
}
}
}
Mind the command
codex mcp-server runs Codex as an MCP server over stdio — what you want here. codex mcp (with add, list, remove) manages the servers Codex itself connects to, which is the opposite direction. There is no codex mcp serve. It is easy to copy the wrong one.
Tools and checks
It surfaces as mcp__codex__codex and mcp__codex__codex-reply. Auth is reused from your local codex login, so the config holds no secrets and is safe to commit; the only requirement is that codex is on your PATH. Confirm it registered with claude mcp list, or /mcp inside a session.
Why you would bother, when it earns its keep, and the caveats are in the full write-up.