Skip to main content
MCP server CX Codex

codex-mcp-tool — Claude Code MCP server: what it does, how to install

Bridges AI editors to OpenAI's Codex CLI for automated code reviews, file analysis, and sandboxed edits. Ideal when delegating repository tasks to local or hosted models.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env CODEX_MCP_CWD=<CODEX_MCP_CWD> --env CODEX_SESSION_TTL_MS=<CODEX_SESSION_TTL_MS> --env CODEX_MAX_SESSIONS=<CODEX_MAX_SESSIONS> --transport stdio codex-mcp-tool -- npx -y @trishchuk/codex-mcp-tool
Open on GitHub

What codex-mcp-tool does

This server routes editor requests straight into the Codex terminal utility. Assistants gain access to tools like ask-codex, do-act, and review-changes. You can inspect repositories using @ file selectors, request structured old-and-new patches, or trigger web lookups. Local engines such as Ollama and LM Studio work through the localProvider flag.

Task continuity relies on isolated workspaces and the native session recovery mechanism built into modern CLI releases. The do-act routine executes actions, evaluates them against terminal commands, and tries fresh corrections if tests fail. Built-in image creation runs directly on your existing ChatGPT session without extra credential setup.

Execution fails unless Node.js 18 and an authenticated Codex CLI exist in your path. Defaults flow straight from your ~/.codex/config.toml file unless overridden explicitly per call.

What it helps with

  • route repository and directory inspection into Codex CLI
  • conduct non-interactive code reviews on pending git diffs
  • run automated code edits with shell verification loops
  • query local open models via Ollama or LM Studio

Example prompts for the agent

  • explain the project layout in @src/ using codex
  • run codex with sandbox:true to generate a data migration script
  • review current changes in the repository with review-changes

How to install codex-mcp-tool

Platform CLI

claude mcp add --env CODEX_MCP_CWD=<CODEX_MCP_CWD> --env CODEX_SESSION_TTL_MS=<CODEX_SESSION_TTL_MS> --env CODEX_MAX_SESSIONS=<CODEX_MAX_SESSIONS> --transport stdio codex-mcp-tool -- npx -y @trishchuk/codex-mcp-tool

Replace <…> with your own values

Step 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-tool

How to install codex-mcp-tool in Claude Code?

Run claude mcp add codex-mcp-tool -- npx -y @trishchuk/codex-mcp-tool in your terminal. You must have Node.js 18 or newer alongside an authenticated Codex CLI installation.

What does codex-mcp-tool do?

It exposes Codex CLI utilities to MCP clients, adding tools for file examination, sandboxed execution, and multi-turn refactoring sessions.

Is an OPENAI_API_KEY required for image generation?

No, the image-gen tool uses Codex's native mechanism tied to your active ChatGPT login, omitting the need for a separate API token.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor