Codex MCP Server

1.4.10 · active · verified Sun Apr 19

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

npm i -g @openai/codex
codex login --api-key "your-openai-api-key"

# Add to Claude Code or other MCP-compatible editor/client
claude mcp add codex-cli -- npx -y codex-mcp-server

# Example usage in your editor/AI client (after server is running)
// Ask codex to explain this function
// Use codex to refactor this code for better performance
// Use review to check my uncommitted changes
// Use websearch with query "TypeScript 5.8 new features"

view raw JSON →