Codex MCP Bridge logo

Codex MCP Bridge

Expose Codex CLI code execution, review, web search, text analysis, sessions, and JSON-schema output through MCP.

Install Codex MCP Bridge

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "codex-mcp-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "codex-mcp-bridge"
      ],
      "env": {
        "OPENAI_API_KEY": "YOUR_VALUE_HERE",
        "CODEX_MAX_CONCURRENT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 7 tools correctly ().

Overview

codex-mcp-bridge MCP server wraps Codex CLI as MCP tools for code execution, repository-aware analysis, native diff review, web search, and structured JSON output. It launches Codex as a subprocess and supports file context, working directories, sandbox modes, reasoning controls, and resumable sessions. Use it when an MCP client needs Codex capabilities but cannot directly run shell commands, or when validated structured output and session orchestration are required. Codex CLI must be installed and authenticated before the bridge can run.

Use cases

  • Review uncommitted repository changes
  • Generate or refactor code with project context
  • Search the web for current technical references
  • Extract data into schema-validated JSON
  • Resume multi-turn Codex conversations

Key features

  • Codex CLI execution over MCP
  • Native diff-aware code review
  • Web search with source URLs
  • JSON Schema-validated responses
  • Session resume and session inspection
  • Sandbox and reasoning controls

Tools7

What Codex MCP Bridge lets your agent do. Expand a tool for its parameters.

Verified live~2.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

21/21 checks healthy over the last 78d

What it can do

From the 7 tools this server returned when we ran it; 7 declare their own safety hints.

Runs commands · 2Can delete or modify data · 2Makes network requests · 5Read-only tools · 5
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age220 days
Maintainers1

Observed 2026-11-11 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · codex-mcp-bridge (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads356Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed7Callable tools this server registers over MCP.
Directory activity13 viewsConfig copies, upvotes, and views on AllMCPs.

How Codex MCP Bridge works

What codex-mcp-bridge does

The codex-mcp-bridge MCP server exposes Codex CLI through the Model Context Protocol. Its main execution tool can generate, inspect, explain, and refactor code with project context, including files supplied to the request and repository guidance such as AGENTS.md or CODEX.md. Depending on the selected sandbox, Codex may also read or modify files and run Git or terminal operations.

Separate tools cover focused tasks. query analyzes text supplied directly in a request without repository exploration or session state. search uses Codex CLI web search and returns a synthesized response with source URLs. review invokes Codex’s native diff-aware review for uncommitted changes, a base branch, or a commit. structured embeds a supplied JSON Schema in the prompt and validates the result with Ajv.

The bridge also provides ping for installation and authentication checks, listSessions for inspecting active conversations, and mcpStatus for reporting the MCP servers known to Codex. Calls include execution metadata such as duration, model, fallback use, and applicable session information.

How it works

The codex-mcp-bridge MCP server starts Codex CLI as a subprocess and exposes its operations over MCP. Set workingDirectory to the target repository when the response needs project context. The codex tool supports read-only, workspace-write, and full-auto sandbox levels, while read-only is the default for analysis-oriented work.

Use sessionId to continue a multi-turn conversation, or set resetSession to begin again. listSessions can show available session metadata before resuming one. Reasoning effort ranges from none through xhigh, allowing callers to trade depth against response time.

Pass text in query’s context parameter when analyzing plans, documents, or other content already available to the caller. Supplying file paths instead invokes file I/O through tools that support files and can increase timeout pressure. Complex work is better divided into focused prompts.

Setup and configuration

Install Codex CLI first, then authenticate it with an OPENAI_API_KEY environment variable or by completing codex auth login. The bridge can be started with:

Terminal
npx codex-mcp-bridge

MCP clients configure it as a command using npx -y codex-mcp-bridge. Claude Code, Gemini CLI, Cursor, Windsurf, and VS Code are documented configuration targets; the same stdio setup applies to other MCP clients.

The default timeout is 60 seconds for common execution tools, 120 seconds for web search, and 180 seconds for native review. These can be increased for slower operations. Concurrent subprocesses are queued, with a configurable maximum controlled by CODEX_MAX_CONCURRENT.

Tools and capabilities

  • codex: Run prompts with files, model selection, sandbox control, working-directory context, reasoning effort, and session resume.
  • review: Review uncommitted changes, a base comparison, or a commit in a real Git repository.
  • search: Research current information and documentation with source URLs.
  • structured: Produce JSON validated against a caller-provided schema.
  • ping, listSessions, and mcpStatus: Check health, inspect sessions, and diagnose Codex-managed MCP servers.

Limitations and notes

Native review does not accept a bridge-supplied review prompt; Codex owns the reviewer instructions. Review also requires workingDirectory to identify a real Git repository. The mcpStatus diagnostic mode is slower because it starts Codex-managed MCP servers to inspect their state.

For worktrees, run review from inside the worktree because the documented Codex CLI -C behavior is broken for review. File inclusion supports text and images, but using files for material already held by the caller adds file-I/O overhead. Sandbox permissions determine whether requested modifications or commands can run.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codex MCP Bridge

codex-mcp-bridge is an MCP server that connects MCP clients to the Codex CLI and exposes tools for code execution, text analysis, web search, native diff review, structured JSON output, health checks, and session management. It runs Codex as a subprocess and supports repository context, sandbox controls, and resumable conversations.

Install Codex CLI, authenticate it with OPENAI_API_KEY or codex auth login, then run npx codex-mcp-bridge. MCP clients can configure the command as npx with arguments -y and codex-mcp-bridge.

Yes, codex-mcp-bridge works with Cursor through its MCP settings. Configure a server that runs npx -y codex-mcp-bridge and provide OPENAI_API_KEY when using API-key authentication.

Use the review tool with mode set to uncommitted and workingDirectory set to the target Git repository. For a branch comparison, use base mode with a base branch; for one commit, use commit mode with its commit identifier.

Use the structured tool with a prompt and a JSON Schema string. The bridge includes the schema in the request and validates Codex’s response with Ajv, returning JSON on success or validation errors on failure.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodex MCP Bridge AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codex-mcp-bridge?style=directory)](https://allmcps.com/mcp/codex-mcp-bridge)
HTML Embed
<a href="https://allmcps.com/mcp/codex-mcp-bridge"><img src="https://allmcps.com/api/badge/codex-mcp-bridge?style=directory" alt="Codex MCP Bridge on AllMCPs" /></a>