home / mcp / codex mcp tool mcp server

Codex MCP Tool MCP Server

Codex Mcp Server

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cexll-codex-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@cexll/codex-mcp-server"
      ],
      "env": {
        "NONE": "Placeholder"
      }
    }
  }
}

Codex MCP Tool provides a dedicated MCP server that lets your editor or AI assistant interact with the Codex CLI for automated analysis, safe edits, and large‑scale code understanding. It streamlines non‑interactive tasks, enables sandboxed changes with approvals, and delivers progress updates as you work across your codebase.

How to use

You use this MCP server by registering it with your MCP client so Codex can execute prompts, analyze files, and perform edits inside your development environment. You can ask Codex questions about code, request explanations of complex modules, or command Codex to refactor and document code through file references. The server supports structured change outputs and sandboxed workflows with optional approvals, so you maintain control over automated changes.

How to install

Prerequisites you need before installation:

  • Node.js v18.0.0 or higher
  • Codex CLI installed and authenticated

One‑Line Setup to register Codex MCP Server with Claude: you install the MCP server via NPX for cross‑platform reliability.

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

Configuration and startup

Register the MCP server with Claude Desktop using an NPX command for the codex‑mcp‑server package, then configure Claude Code to load the server. The following configurations show how to enable NPX usage and how to run when using a global installation.

{
  "mcpServers": {
    "codex-cli": {
      "command": "npx",
      "args": ["-y", "@cexll/codex-mcp-server"]
    }
  }
}

Starting from a global installation

If you install the MCP server globally, you can configure Claude to run the server with a simple command.

{
  "mcpServers": {
    "codex-cli": {
      "command": "codex-mcp"
    }
  }
}

Available tools

ask-codex

Sends a prompt to Codex via codex exec, supports file references and model selection for coding tasks.

brainstorm

Generates ideas with multiple frameworks (divergent, convergent, SCAMPER, design-thinking) and analyzes feasibility.

ping

A simple check to verify MCP connection responds with a message.

help

Displays the Codex CLI help text and available commands.

fetch-chunk

Retrieves cached chunks from changeMode responses to paginate large edits.

timeout-test

Tests long-running operations by running a timeout timer.