Codex MCP Server (version 1.4.10) is a crucial bridge component designed to integrate OpenAI's Codex CLI with AI agents like Claude Code, providing robust AI-powered code analysis, generation, and review capabilities directly within a developer's editor or IDE. Functioning as an MCP (Model Context Protocol) server wrapper, it translates requests from client applications into commands for the underlying Codex CLI, which then interacts with the OpenAI API. The project maintains an active development pace with frequent patch releases, as evidenced by recent fixes addressing issues like hanging processes and `codex -C` bugs. Its key differentiators include enabling multi-turn conversations with session support, advanced code review features for uncommitted changes or branches, and specialized tools like web search with customizable depth. It requires the globally installed Codex CLI (v0.75.0+) and an authenticated OpenAI API key for operation. The server itself is designed for execution as a command-line process rather than programmatic import into other JavaScript applications.
npm install codex-mcp-serverVerified import paths — ran on the pinned version, not inferred.
Demonstrates installation of prerequisite Codex CLI, authentication, and integration of `codex-mcp-server` as an MCP provider in Claude Code, followed by example prompts for usage.
Explicitly specify the desired model (e.g., `use codex with model 'old-model-id'`) if previous behavior is required, or review your prompts and expected outputs.
Upgrade to v1.4.10 or newer to prevent processes from hanging due to unclosed stdin.
Upgrade to v1.4.3 or newer to ensure `workingDirectory` functions as expected with the `codex -C` command.
Client applications should update to handle the absence or conditional availability of `structuredContent`. Check release notes for specific changes regarding `structuredContent` output. Consider enabling `STRUCTURED_CONTENT_ENABLED` if structured output is desired.
Run `npm i -g @openai/codex` to install the CLI and `codex login --api-key "your-openai-api-key"` to authenticate. Ensure `OPENAI_API_KEY` is set as an environment variable or via `codex login` for multi-agent workflows.
Run `codex login --api-key "your-openai-api-key"` in your terminal to authenticate the Codex CLI. Ensure your API key is correct and active.
Install the Codex CLI globally: `npm i -g @openai/codex` or `brew install codex` if applicable.
Upgrade `codex-mcp-server` to v1.4.10 or newer to get the fix for hanging processes.
Upgrade `codex-mcp-server` to v1.3.1 or newer, which includes fixes for the `review` command and improved stderr handling.