codex-mcp-bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_CLI_PATH | No | Path to the Codex CLI binary. | codex |
| OPENAI_API_KEY | No | Your OpenAI API key. Required if not using `codex auth login`. | |
| CODEX_MCP_SERVERS | No | Control which Codex internal MCP servers stay enabled. | |
| CODEX_DEFAULT_MODEL | No | Default model for all tools. | (CLI default) |
| CODEX_FALLBACK_MODEL | No | Fallback on quota exhaustion. Set to 'none' to disable. | o3 |
| CODEX_MAX_CONCURRENT | No | Maximum concurrent subprocess spawns. | 3 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| codexA | Execute a prompt via Codex CLI. Codex is an AI coding agent that can generate, analyze, refactor, and explain code with full project context (reads AGENTS.md/CODEX.md automatically). Capabilities: code generation and refactoring, code analysis and explanation, file reading and modification (when sandbox allows), git operations and terminal commands, multi-turn conversations via sessionId. When to use a different tool:
Tips:
|
| searchA | Web search via Codex CLI. Searches the web and synthesizes a comprehensive answer with source URLs. Use for current information, documentation lookups, API references, and research questions. Tips:
|
| queryA | Lightweight query for analysis or opinions on text you already have. No file reading, no repo exploration, no session state. Pass text in the context parameter. For code execution or file operations, use the codex tool instead. Use cases: reviewing a plan, critiquing a draft, comparing approaches, answering questions about provided text, generating summaries. Tips:
|
| reviewA | Run Codex CLI's native diff-aware review via codex exec review --json. The bridge does not accept or bundle a review prompt; upstream Codex owns the reviewer instructions. Use for MCP clients that cannot run shell commands but need native Codex review of uncommitted changes, a base branch diff, or a single commit. Tips:
|
| structuredA | Generate a JSON response conforming to a provided JSON Schema. Use for data extraction, classification, or any task needing machine-parseable output. |
| listSessionsA | List active Codex conversation sessions. Returns session metadata for orchestration (no prompts or responses, just IDs and timing). Use to check available sessions before resuming with the codex tool's sessionId parameter. |
| mcpStatusA | Report what Codex's own app-server says about each MCP server it knows about: auth type, tool inventory, and whether the server initialized. Unlike the other tools, this one deliberately does NOT suppress Codex's MCP servers — suppressing them would disable the thing being measured — so it is slower than a normal call and boots the servers named in ~/.codex/config.toml. Two modes:
Reading the output:
|
| pingA | Health check: verifies Codex CLI is installed and authenticated, reports versions and capabilities. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Each tool has a distinct purpose, though codex/query and ping/mcpStatus have some overlap. Descriptions draw clear boundaries, but an agent could still confuse the general-purpose codex tool with its specialized variants like query or review.
Naming follows no consistent pattern: listSessions and mcpStatus use camelCase, while the rest are single lowercase verbs or nouns (codex, search, query, ping, review, structured). Some are verbs, some nouns, and one is an adjective, making the set feel inconsistent.
8 tools is appropriate for the bridge's scope, covering core execution plus specialized helpers without bloat. It sits comfortably within the typical 3-15 range and each tool earns its place.
The server covers core prompt execution, lightweight text analysis, web search, structured output, native review, session listing, and health/status checks. Minor gaps like session deletion or explicit file operations remain, but codex's own capabilities fill those holes.