Codex MCP Go — Claude Code MCP server: call Codex CLI
A Go MCP server that wraps Codex CLI. Lets your agent hand coding tasks to Codex as a tool call.
claude mcp add codex-mcp-go -- npx -y @zenfun510/codex-mcp-goWhat Codex MCP Go does
Codex MCP Go runs a stdio server exposing a single codex tool. Clients like Claude, Cursor or Cline send a task through it, and Codex CLI does the work. The implementation is Go, ships as one binary, and handles concurrent clients with goroutines.
Sessions are supported: keep the returned SESSION_ID and pass it back to continue a multi-turn exchange. The sandbox parameter ranges from read-only to danger-full-access. Limits on models, profiles and working directories come from a TOML config or environment variables, and the variables win over the file.
The codex CLI has to be installed and configured first — nothing runs without it. Using npx avoids a Go toolchain; building from source needs Go 1.24+. Put OPENAI_API_KEY in the client config.
What it helps with
- wire Codex CLI into Claude or Cursor as a tool
- send a tricky patch to a second agent for review
- keep a multi-turn Codex conversation alive with
SESSION_ID - confine Codex to
read-onlywhile it inspects a repo - run the MCP server without installing Go
Example prompts for the agent
- Ask Codex over MCP to look at this module and draft a patch
- Call the
codextool withsandboxset toread-onlyand check my implementation - Resume the Codex session with
SESSION_IDand refine the refactor plan
How to install Codex MCP Go
Platform CLI
claude mcp add codex-mcp-go -- npx -y @zenfun510/codex-mcp-goPlatform CLI
codex mcp add codex-mcp-go -- npx -y @zenfun510/codex-mcp-goConfig file
{
"mcpServers": {
"codex-mcp-go": {
"command": "npx",
"args": [
"-y",
"@zenfun510/codex-mcp-go"
]
}
}
}Config file
{
"servers": {
"codex-mcp-go": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zenfun510/codex-mcp-go"
]
}
}
}Platform CLI
gemini mcp add codex-mcp-go npx -y @zenfun510/codex-mcp-goStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Codex MCP Go
How do I install Claude MCP Go in Claude Code?
Run claude mcp add codex-mcp-go -- npx -y @zenfun510/codex-mcp-go. Make sure the codex CLI is installed and configured beforehand.
What does Claude MCP Go do?
It serves a stdio MCP endpoint with a codex tool that calls Claude CLI from your agent. Sessions and sandbox modes are configurable.
What does Claude MCP Go need to run?
The codex CLI plus an OPENAI_API_KEY in your client config. Building from source requires Go 1.24+.