An MCP server that wraps the Codex CLI as a subprocess and exposes tools for code execution, agentic code review, web search, structured JSON output, and session-based conversations. It adds concurrency control, model fallback, and environment isolation around Codex CLI usage.
From the registry: Wraps Codex CLI as MCP tools: query, review, search, assess, structured, sessions.
$ npm i -g @openai/codexhttps://github.com/openai/codex/$ codex auth loginhttps://github.com/openai/codex/Please install the `codex-mcp-bridge` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install Codex CLI** — Install the OpenAI Codex CLI, which this MCP bridge wraps as a subprocess. Run: `npm i -g @openai/codex` (https://github.com/openai/codex/)
- **Authenticate Codex CLI** — Set the OPENAI_API_KEY environment variable or complete Codex CLI login with `codex auth login` so the underlying Codex CLI can authenticate. Run: `codex auth login` (https://github.com/openai/codex/)
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","codex-mcp-bridge"]
- optional environment variables:
- `OPENAI_API_KEY`: OpenAI API key for Codex CLI authentication. Required if you have not already authenticated via `codex auth login`. (example: `<your-openai-api-key>`)
- `CODEX_DEFAULT_MODEL`: Default model for all tools. (example: `<your-default-model>`)
- `CODEX_FALLBACK_MODEL`: Fallback model used on quota exhaustion. Set to `none` to disable fallback. (example: `<your-fallback-model>`)
- `CODEX_CLI_PATH`: Path to the Codex CLI binary. (example: `<path-to-codex-cli>`)
- `CODEX_MAX_CONCURRENT`: Maximum concurrent Codex subprocess spawns. (example: `<max-concurrent-spawns>`)
- `CODEX_MCP_SERVERS`: Controls which Codex internal MCP servers stay enabled. (example: `<your-codex-mcp-servers-setting>`)
Note: The README’s recommended portable install path is `npx -y codex-mcp-bridge`. This is a stdio MCP server. The server depends on a separately installed Codex CLI (`codex` by default, or override with `CODEX_CLI_PATH`).
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.OPENAI_API_KEYrequiredAuthenticates Codex CLI access.AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev.
Persistent codebase knowledge graph. Survives session restarts and context compaction.
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.