← Back to directory
C

Codex MCP Server

Community
Connect Codex CLI to MCP clients for automated code analysis and editing.
Category
Dev Tools #295 of 438
Stars
★ 177 Popular
Transport
stdio (local process)
Runtime
Node.js 18+
Credentials
No credential needed
License
MIT
Last commit
⚠
Tools
6
46FMRS · D

The project has positive feedback on GitHub, with community recognition of its functionality. v1.2.4 enhanced Windows compatibility and provides detailed documentation. For security, pay attention to sandbox configuration.

Strongest · Documentation 12/20 Weakest · Reliability 5/20

Reliability
5/20
Security and permissions
7/20
Maintenance
11/20
Documentation
12/20
Setup experience
11/20
Why each score
Reliability 5/20
Only the README and repository metadata were supplied; no source code, tests, or CI evidence. The MCP init handshake, tool list, and actual behavior cannot be verified, and README claims are untrusted. 68 open issues add uncertainty. With no execution evidence, the static cap is 12; a conservative 5 is given.
Security and permissions 7/20
No direct evidence of malware, credential theft, or default irreversible remote commands was found, so no red line is triggered. However, the server is designed to invoke Codex CLI and supports high-risk configurations such as full-auto, danger-full-access, and approval_policy=never; missing source prevents auditing credential handling and data boundaries. Confirmation and least privilege depend entirely on external Codex config, hence 7.
Maintenance 11/20
The repository is not archived, has an MIT license, and the README shows recent v1.2.4 release with changelog. However, no commit history, issue-response evidence, dependency update cadence, or security-response channel was supplied; 68 open issues indicate governance pressure. Visible activity with governance/versioning gaps warrants 11.
Documentation 12/20
The README covers installation, configuration, tools, examples, troubleshooting, platform support, and changelog fairly comprehensively. But cost, limits, and security boundaries are missing, some badges point to an old repository name, and the docs are self-reported without verifiable evidence. Score 12.
Setup experience 11/20
One-line npx setup, client config examples for Claude Desktop/Claude Code, global install alternative, and a platform matrix are provided. Yet no package.json/bin entry or packaging evidence exists in the supplied material, and external Codex CLI installation/authentication adds fragility. Below the static cap of 15, a conservative 11 is given.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesRuns commands or codeUses the network

Best for

  • Developers who want to integrate Codex CLI into AI-assisted editors.
  • Teams that need automated code analysis or editing.
  • Users seeking to use Codex models within the MCP ecosystem.

Not for

  • Users requiring official OpenAI support or endorsement.
  • Users who do not use Codex CLI or Node.js.
  • Users needing fully unsupervised high-risk automation (such as yolo mode, not recommended).

Required permissions

  • Requires filesystem access to read code files (depending on sandbox mode).
  • Can modify workspace files in `workspace-write` mode.
  • Has full system access in `danger-full-access` mode (not recommended).
  • May require network access depending on configuration and tasks.

Risks and side effects

  • Setting sandbox mode to `danger-full-access` or `yolo` may lead to unintended modifications or data loss.
  • Automated code edits may introduce errors or security issues.
  • Codex CLI requires authentication and may incur API costs.
  • Using @file references may expose sensitive code content.

Setup

Before you start

Runtime:Node.js 18+

Other optional settings (1)
MCP_TOOL_TIMEOUT optional Timeout in milliseconds for MCP tool calls, used to prevent timeouts on long-running Codex tasks; set it in your shell profile if needed, e.g. export MCP_TOOL_TIMEOUT=36000000.
  1. Ensure Node.js v18.0.0 or higher is installed.
  2. Install and authenticate Codex CLI: npm install -g @openai/codex.
  3. For npx usage, run claude mcp add codex-cli -- npx -y @cexll/codex-mcp-server, or add the JSON configuration to your Claude Desktop config file.
  4. Restart your terminal or client.
claude_desktop_config.json
{
  "mcpServers": {
    "codex-cli": {
      "command": "npx",
      "args": ["-y", "@cexll/codex-mcp-server"]
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "codex-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@cexll/codex-mcp-server"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add codex-cli -- npx -y @cexll/codex-mcp-server

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Type /mcp in Claude Code to confirm the codex-cli server is active and tools like ask-codex appear; alternatively call ping and confirm it echoes your message back.

Troubleshooting

  1. For timeout errors, set environment variable `MCP_TOOL_TIMEOUT` (in milliseconds).
  2. If file write permission errors occur, check if sandbox mode is `read-only`; use `workspace-write` instead.
  3. If Codex CLI is not found, ensure it is installed globally and authenticated.
  4. On Windows, if ENOENT errors occur, update to v1.2.4+ or follow the troubleshooting guide in the docs.

Things to try

Once connected, you can ask your AI assistant things like:

  • ask-codex to analyze @src/ and explain the architecture
  • use codex with model gpt-5 to refactor @utils/database.js for better performance
  • brainstorm ways to optimize our CI/CD pipeline using the SCAMPER method
  • ping the server to confirm the Codex MCP connection works

Tools 6

ask-codex writes
Sends a prompt to Codex via `codex exec`, supporting `@` file references, model selection, sandbox and approval policies, change mode, and automatically includes `--skip-git-repo-check`.
brainstorm read-only
Generates novel ideas with structured methodologies, supporting multiple frameworks (e.g., SCAMPER, design thinking) and domain-specific context, with feasibility, impact, and innovation scoring.
ping read-only
A simple test tool that echoes back a message to verify MCP connection.
help read-only
Shows the Codex CLI help text and available commands.
fetch-chunk read-only
Retrieves cached chunks from changeMode responses for paginating large structured edit responses.
timeout-test read-only
Test tool for timeout prevention, runs for a specified duration.

Use cases

Ask Codex questions or brainstorm ideas from your MCP client.
Analyze codebases, files, or directories and get explanations or suggestions.
Safely edit code with approvals and sandbox modes.
Perform large-scale code analysis with @file references.
Automate code review, refactoring, documentation, and CI integration.

Supported clients

Claude Desktop
Claude Code

Listed from the project's documentation, not tested by this site.

Overview

Codex MCP Tool is an open-source Model Context Protocol (MCP) server that connects your IDE or AI assistant (such as Claude, Cursor) to the Codex CLI. It enables non-interactive automation with codex exec, safe sandboxed edits with approvals, and large-scale code analysis via @ file references. Built for reliability and speed, it streams progress updates, supports structured change mode (OLD/NEW patch output), and integrates cleanly with standard MCP clients for code review, refactoring, documentation, and CI automation.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision 19fbc1b6441f Data synced 2026-10-12 Read the FMRS scoring method