Codex MCP Server

# Codex MCP Server <div align="center"> [![GitHub Release](https://img.shields.io/github/v/release/x51xxx/codex-mcp-tool?logo=github&label=GitHub)](ht

Local serverstdioPython

What is the Codex MCP server?

Codex MCP Server GitHub Release [![npm. Exposed over MCP by the codex mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

  • File Analysis — — Reference files with @src/, @package.json syntax
  • Multi-Turn Sessions — — Conversation continuity with workspace isolation
  • Native Resume — — Uses codex resume for context preservation (CLI v0.36.0+)
  • Local OSS Models — — Run with Ollama or LM Studio via localProvider
  • Web Search — — Research capabilities with search: true
  • Sandbox Mode — — Safe automation with explicit sandbox and approval policies

Its toolset

Everything the assistant can do here goes through one of these:

  • ask-codex — Execute Codex CLI with files, models, sessions, and safety controls
  • batch-codex — Run multiple atomic Codex tasks sequentially or concurrently
  • review-changes — Run the native non-interactive Codex review command
  • do-act — Execute, verify with a shell command, and retry fixes
  • brainstorm — Generate ideas with structured creative frameworks
  • list-sessions — View, delete, or clear MCP conversation mappings
  • list-skills — List skills visible from the selected workspace
  • health — Diagnose CLI installation, version, features, and sessions
  • fetch-chunk — Retrieve a chunk from cached change-mode output
  • ping — Test the MCP connection
  • help — Return current codex --help output
  • version — Report Codex CLI, Node.js, platform, and package versions

Adding it to your client

@trishchuk/codex-mcp-tool on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration

You will need one environment variable: CODEX_CLI_PATH. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Codex's toolset — ask-codex, batch-codex, review-changes and 11 more — is a fair guide to whether it matches your workflow. It is maintained by x51xxx; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Codex.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the codex mcp server does with a few real requests.

Available tools

ToolWhat it does
ask-codexExecute Codex CLI with files, models, sessions, and safety controls
batch-codexRun multiple atomic Codex tasks sequentially or concurrently
review-changesRun the native non-interactive Codex review command
do-actExecute, verify with a shell command, and retry fixes
brainstormGenerate ideas with structured creative frameworks
list-sessionsView, delete, or clear MCP conversation mappings
list-skillsList skills visible from the selected workspace
healthDiagnose CLI installation, version, features, and sessions
fetch-chunkRetrieve a chunk from cached change-mode output
pingTest the MCP connection
helpReturn current codex --help output
versionReport Codex CLI, Node.js, platform, and package versions
timeout-testExercise keepalive and timeout behavior
ConfigurationThe Configuration tool exposed by this server.

How to install the Codex MCP server

{
  "mcpServers": {
    "codex-mcp-tool": {
      "command": "npx",
      "args": ["-y", "@trishchuk/codex-mcp-tool"],
      "env": {
        "CODEX_CLI_PATH": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
CODEX_CLI_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Codex to ask-codex.
  • Use Codex to batch-codex.
  • Use Codex to review-changes.

Frequently asked questions

Node.js 18+ and a locally installed and authenticated Codex CLI are required.