codex
Codex Mcp Server
claude mcp add --transport stdio cexll-codex-mcp-server npx -y @cexll/codex-mcp-server
How to use
Codex MCP Tool is a server that lets your MCP-enabled editor or agent (such as Claude, Cursor, or Claude Desktop) interface with the Codex CLI to perform non-interactive automation, code analysis, and safe sandboxed edits. It enables you to ask Codex questions, run analysis on codebases via file references (using @file syntax), and generate structured change outputs suitable for code reviews, refactoring, documentation, and CI automation. The server is designed for reliability and speed, streaming progress updates and supporting a structured patch mode for OLD/NEW changes. To use it, attach the MCP server to your client (for example via npx setup or Claude Desktop config) and invoke Codex commands that reference files in your project using the standard @file syntax. The setup is intended to work cross‑platform (Windows, macOS, Linux) with a focus on seamless integration with Codex CLI workflows.
How to install
Prerequisites:
- Node.js v18.0.0 or higher
- Codex CLI installed and authenticated
Installation steps:
- Install Node.js from https://nodejs.org/ (if not already installed).
- Install the Codex CLI and authenticate following its documentation.
- Install the Codex MCP Server via NPX (recommended):
# One-time setup (NPX)
claude mcp add codex-cli -- npx -y @cexll/codex-mcp-server
- Verify installation by listing MCP servers or running a test command depending on your Claude/Claude Desktop configuration. You should see the codex MCP server available as an MCP source in your editor or Claude integration.
Optional alternative (if you prefer global NPX usage):
{
"mcpServers": {
"codex-cli": {
"command": "npx",
"args": ["-y", "@cexll/codex-mcp-server"]
}
}
}
Notes:
- If you plan to run outside Claude Desktop, you can also configure the server with a direct command (depending on your MCP client) as shown in the examples in the README.
Additional notes
Tips and considerations:
- Use the NPX configuration for broad compatibility across environments. This ensures the latest version of the codex-mcp-server is used without global installations.
- Ensure Codex CLI is installed and authenticated before attempting to use the MCP server to avoid permission or access errors.
- The server supports non-interactive automation and can stream progress updates; enable appropriate sandbox modes for safe file edits (e.g., workspace-write for development tasks).
- If you encounter environment-specific issues on Windows, macOS, or Linux, verify that the NPX invocation is accessible in your shell/CLI and that node/npm paths are properly configured.
- When configuring Claude Desktop, you can either use the NPX approach or point to a global bin (codex-mcp) if you have a global installation.
- File references in prompts should use the @file syntax to leverage Codex analysis on specific code assets.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud