Codex MCP Tool logo

Codex MCP Tool

by x51xxx

Connects MCP clients to Codex CLI for code analysis, editing, reviews, sessions, brainstorming, and batch tasks.

Install Codex MCP Tool

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "x51xxx-codex-mcp-tool": {
      "command": "npx",
      "args": [
        "-y",
        "@trishchuk/codex-mcp-tool"
      ],
      "env": {
        "CODEX_CLI_PATH": "YOUR_VALUE_HERE",
        "CODEX_SESSION_TTL_MS": "YOUR_VALUE_HERE",
        "CODEX_MAX_SESSIONS": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 13 tools correctly (1mo ago).

Overview

The x51xxx/codex-mcp-tool MCP server connects Claude or Cursor to Codex CLI for repository analysis, code changes, reviews, and structured agent workflows. It runs as a local Node.js MCP process and delegates requests to an installed, authenticated Codex CLI, with options for models, sessions, sandbox policies, web search, and local providers. Use it when an MCP client needs Codex-specific file references, multi-turn workspaces, batch transformations, or verification loops. Node.js 18+ and Codex CLI 0.95.0 or newer are required.

Use cases

  • Analyze source files and project dependencies
  • Apply multi-file refactoring tasks
  • Review current repository changes
  • Run repetitive code transformations in batches
  • Verify and retry automated coding tasks

Key features

  • Codex CLI access over MCP
  • Session-based multi-turn conversations
  • Structured change-mode output
  • Batch task execution
  • Repository review and act-check-fix workflows
  • Ollama and LM Studio provider support

Tools13

What Codex MCP Tool lets your agent do. Expand a tool for its parameters.

Verified live~3.9k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

17/18 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · @trishchuk/codex-mcp-tool (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars24Stargazers on the source repository.
npm downloads871Package downloads in the last 30 days.
Last commit28d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed13Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Codex MCP Tool works

What x51xxx/codex-mcp-tool MCP server does

The x51xxx/codex-mcp-tool MCP server exposes Codex CLI through MCP tools for coding assistance. It can analyze files referenced with @ syntax, continue conversations by session, apply sandboxed edits, produce structured change output, and run native repository reviews. The server supports model selection, reasoning controls, additional writable directories, web search, and local model providers through Ollama or LM Studio.

Its tool set covers both direct coding tasks and operational tasks. ask-codex handles general prompts, file analysis, model selection, sessions, and safety settings. batch-codex processes multiple atomic tasks sequentially or concurrently. review-changes invokes Codex’s review command, while do-act runs a task, checks the result with a shell command, and retries fixes when needed. Supporting tools provide health, version, help, session, skill, connection, and timeout information.

How it works

An MCP client starts the package as a local stdio process. The server then invokes the Codex CLI installed on the same machine. Codex must already be installed and authenticated, and the server requires Codex CLI 0.95.0 or newer. The health tool reports the detected CLI and session status; version reports Codex CLI, Node.js, platform, and package versions.

Session IDs allow multi-turn conversations with workspace isolation. A session can be reset when a fresh context is needed. Change mode returns structured OLD/NEW edits and may split large output into cached chunks; fetch-chunk retrieves later chunks. The CODEX_SESSION_TTL_MS and CODEX_MAX_SESSIONS settings control session lifetime and capacity.

The server can use the configured Codex model by omitting model, or override it for an individual request. Local execution can be selected with oss, localProvider: "ollama", or localProvider: "lmstudio". Ollama must be running locally with a model that supports tool calling.

Setup and configuration

Install and register the x51xxx/codex-mcp-tool MCP server with:

Terminal
claude mcp add codex-cli -- npx -y @trishchuk/codex-mcp-tool

The package requires Node.js 18 or later. For manual MCP configuration, use npx as the command and pass -y and @trishchuk/codex-mcp-tool as arguments. Claude Desktop configuration paths differ by platform; the README identifies the macOS and Windows locations.

Graphical MCP clients may start with a restricted PATH. If the server cannot locate codex, set CODEX_CLI_PATH to the executable path, such as a Homebrew installation path, and use health to inspect resolution. Optional configuration includes CODEX_SESSION_TTL_MS and CODEX_MAX_SESSIONS.

Tools and capabilities

  • Analyze files and directories with @ references.
  • Continue work across prompts using session IDs and native resume support.
  • Apply sandboxed edits and structured change-mode output.
  • Run batch tasks for repetitive transformations and refactoring.
  • Review current repository changes with Codex’s native review command.
  • Execute, verify, and retry coding tasks through an act-check-fix loop.
  • Discover skills under .agents/skills/ in the selected workspace.
  • Generate ideas using SCAMPER, design-thinking, and lateral-thinking frameworks.
  • Use web search when search: true is supplied.
  • Connect to Ollama or LM Studio for local OSS models.

Limitations and notes

The x51xxx/codex-mcp-tool MCP server depends on the locally installed Codex CLI rather than providing Codex independently. Its README requires Codex CLI 0.95.0 or newer and recommends current releases. The available models and their reasoning limits are determined by the Codex CLI and configured provider.

Sandbox and full-auto options are compatibility aliases for workspace-write with approval disabled; they do not bypass the sandbox. Review, editing, and shell-verification behavior therefore depends on the selected Codex policies and the current workspace. Cross-platform support is documented for Windows, macOS, and Linux.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codex MCP Tool

Register it with Claude using `claude mcp add codex-cli -- npx -y @trishchuk/codex-mcp-tool`, or configure the same npx command and arguments manually.

Yes. The README provides Claude Desktop configuration details and shows the package registered as a local MCP server.

It requires Node.js 18 or newer, Codex CLI 0.95.0 or newer, and an installed and authenticated Codex CLI.

Yes. It supports Ollama and LM Studio through the `localProvider` option, and Ollama must be running with a tool-calling model.

Set `CODEX_CLI_PATH` to the Codex executable when the MCP client does not inherit the correct PATH, then use the `health` tool to inspect the resolved executable.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodex MCP Tool AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/x51xxx-codex-mcp-tool?style=directory)](https://allmcps.com/mcp/x51xxx-codex-mcp-tool)
HTML Embed
<a href="https://allmcps.com/mcp/x51xxx-codex-mcp-tool"><img src="https://allmcps.com/api/badge/x51xxx-codex-mcp-tool?style=directory" alt="Codex MCP Tool on AllMCPs" /></a>