Codex MCP Tool (cexll)

Codex MCP Tool

An MCP server that sends tasks to Codex CLI from Claude Code and Cursor: code review via @ refs, a sandbox, patch edits, ideas

  • 176 ★ on the repository
  • Last commit
  • MIT
MCP server

Broad access

Why this level

  • Through Codex the agent writes files in the working folder, and `danger-full-access` mode opens the whole file system and network
  • The `yolo` flag disables safety checks and approvals
  • File contents pulled in by `@` references go to the OpenAI service together with the request
All reasons and checks
Needs a VPN

cexll/codex-mcp-server

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/codex-mcp-tool

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Through Codex the agent writes files in the working folder, and `danger-full-access` mode opens the whole file system and network
  • The `yolo` flag disables safety checks and approvals
  • File contents pulled in by `@` references go to the OpenAI service together with the request

This is third-party code. Review the repository files before installing.

What it does

The server runs Codex CLI in `codex exec` mode and returns the answer to the MCP client. Any MCP client, for example Claude Code, Claude Desktop or Cursor, gets access to Codex without an interactive session. A reference such as `@src/main.ts` or `@.` pulls files and directories into the request, so analysis and review work on the real project contents. The main tool `ask-codex` takes a model, a sandbox mode and an approval policy. `changeMode` returns edits as OLD and NEW pairs, and large answers come in pieces through `fetch-chunk`. The `brainstorm` tool collects ideas with methods such as divergent and convergent thinking, SCAMPER, design thinking and lateral thinking. Utility tools are `ping`, `help` and `timeout-test`. Claude Code gets the slash commands `/analyze`, `/sandbox`, `/help` and `/ping`. The server streams progress so long tasks are not cut off by a client timeout.

Who it is for. Claude Code users who already have Codex CLI set up and want a second opinion from another model on code, a review or a ready patch without leaving the current session.

Good fit when

  • Before merging you want fresh changes double-checked by another model: `ask codex to review @src/`
  • You need a patch as OLD and NEW pairs to read line by line before applying it
  • A large repository has to be walked through with questions per directory using `@` references, without pasting files into the chat
  • Ideas for a feature or process are easier to gather with a method such as SCAMPER, with a feasibility score straight away
  • A script should be tested in the Codex sandbox with the `on-failure` approval policy

Not a fit when

  • Codex CLI is not installed or not signed in: the server only passes requests to it and does not call a model itself
  • You need an official OpenAI plugin for Claude Code: this is an unofficial third-party project not affiliated with OpenAI
  • The task needs an interactive Codex session with a step-by-step dialogue instead of a single `codex exec` request
  • Environment policy forbids `danger-full-access` mode and the `yolo` flag, and nobody can configure the Codex sandbox

Example request

Ask Codex to check @src/auth for vulnerabilities in read-only mode and return the findings as a list with files and lines

MCP

Transport
stdio
Authentication
not required

Environment variables

MCP_TOOL_TIMEOUT
Tool call timeout in milliseconds for long tasks; the README example is 36000000.

Limitations

  • Node.js 18 or newer and an installed, signed-in Codex CLI are required. The server does not work without it.
  • The `sandbox: true` parameter turns on `fullAuto` mode and does not disable protection. For read-only work set `sandboxMode: read-only`.
  • The `yolo` flag removes all safety checks, and `danger-full-access` mode gives full file system and network access. The author warns about both.
  • Long tasks hit the client timeout, so they need the `MCP_TOOL_TIMEOUT` variable in milliseconds.
  • The last commit in the repository dates from June 2026, and the README describes version 1.2.4.

How to disable. `claude mcp remove codex-cli` removes the server from Claude Code. In Claude Desktop delete the `codex-cli` block from `claude_desktop_config.json` and restart the client. A global install is removed with `npm uninstall -g @cexll/codex-mcp-server`, and Codex CLI itself stays in place.

FAQ

How do I connect Codex to Claude Code through MCP?

Run `claude mcp add codex-cli -- npx -y @cexll/codex-mcp-server` and type `/mcp` in Claude Code to confirm the server is visible. Codex CLI must already be installed and signed in.

What does the sandbox parameter do and is it safe?

`sandbox: true` turns on `fullAuto`, which means writes in the working folder with the `on-failure` policy. It neither disables nor strengthens protection. For a check without edits set `sandboxMode: read-only`.

How do I get edits as a patch instead of a finished result?

Turn on `changeMode`: the server returns changes as OLD and NEW pairs. If the answer is large, the remaining pieces are fetched with the `fetch-chunk` tool using `cacheKey` and a chunk number.

Where does the spawn codex ENOENT error come from?

The server did not find Codex CLI on PATH. Install it with `npm install -g @openai/codex`, open a new terminal session and repeat the request. The project docs have a separate four-step guide for Windows.

Which models can I pick?

The README lists `gpt-5-codex` by default, `gpt-5`, `o3`, `o4-mini`, `codex-1`, `codex-mini-latest` and `gpt-4.1`. The model is set with the `model` parameter of the `ask-codex` or `brainstorm` tool.

Discussion

No questions or reviews yet.

An MCP server that gives an agent search over a large Claude Code guide, official docs, releases and ready-made templates

MCP serverExtended access6.4KRepository stars
Official

An MCP server on your machine that lets ChatGPT and Claude edit code, run tests and check Git in a local repository

MCP serverBroad access2.5KRepository stars

An MCP server that gives Claude Desktop and other clients file tools, a shell and sub-agents in the style of Claude Code

MCP serverBroad access305Repository stars

Codex Settings skills

Codex CLI Skills & Profiles

A Codex CLI plugin with twelve skills: deep research, pull request review, image generation and session handoff

PluginBroad access248Repository stars

A local MCP server and CLI for agents: semantic code search, call graphs and change-impact analysis

MCP serverExtended access760Repository stars

An MCP server that lets an agent read files, search code and run commands in a workspace

MCP serverBroad access1.2KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Codex MCP Tool (cexll) (this card)nonot required176
Codex MCP Server: Codex inside Claude CodenoAPI key648another MCP server for Codex CLI by a different author, focused on resumable sessions and web search
skill-codexno1,471a skill without a server: passes tasks to Codex through shell commands, with no MCP tools

README in short

The README opens with requirements and a one-line setup, then shows manual configuration for Claude Desktop and a global install. It continues with request examples, tables of sandbox modes and approval policies, the tools and slash commands, a changelog and a platform support table. At the end the author names the gemini-mcp-tool project that inspired it and disclaims any link to OpenAI.

README badge

Report a problem

Foxx AICodex MCP Tool (cexll)
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.