# x51xxx/codex-mcp-tool [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/x51xxx/codex-mcp-tool  
**GitHub Stars:** 24  
**npm Downloads (last month):** 861  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/x51xxx-codex-mcp-tool

## Description
MCP server that connects your IDE or AI assistant to Codex CLI for code analysis and editing with support for multiple models (gpt-5-codex, o3, codex-1)

## Tools
Capabilities this server exposes over MCP:

- **ask-codex** — Execute Codex CLI with file analysis (@syntax), skills ($syntax), model selection, and safety controls. Supports changeMode.
- **batch-codex** — Delegate multiple atomic tasks to Codex for batch processing. Ideal for repetitive operations, mass refactoring, and automated code transformations
- **review-changes** — Run a code review against the current repository using Codex CLI native review subcommand
- **ping** — Echo
- **help** — receive help information
- **version** — Display version and system information
- **brainstorm** — Generate creative ideas using structured frameworks with domain context and feasibility analysis.
- **fetch-chunk** — Retrieves cached chunks from a changeMode response. Use this to get subsequent chunks after receiving a partial changeMode response.
- **timeout-test** — Test timeout prevention by running for a specified duration
- **list-sessions** — List all active conversation sessions with metadata, or manage sessions
- **health** — Check Codex CLI and session health status
- **list-skills** — Discover available Codex skills from .agents/skills/ directory
- **do-act** — Execute task via Codex, verify with shell command, auto-fix on failure. Act-Check-Fix loop.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "codex-mcp-tool": {
    "command": "npx",
    "args": ["-y","@trishchuk/codex-mcp-tool"],
    "env": {
      "CODEX_CLI_PATH": "",
      "CODEX_SESSION_TTL_MS": "",
      "CODEX_MAX_SESSIONS": ""
    }
  }
}
```

**Requires environment variables:** `CODEX_CLI_PATH`, `CODEX_SESSION_TTL_MS`, `CODEX_MAX_SESSIONS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## 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:

```bash
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.

_Full upstream README: https://allmcps.com/mcp/x51xxx-codex-mcp-tool/readme_

