Codex MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_MCP_MODE | No | Force `app-server` or `exec` mode, skipping auto-detection. | auto-detect |
| CODEX_MCP_BINARY | No | Name of the codex binary to use. | codex |
| CODEX_MCP_STDIO_MODE | No | Startup preflight guard mode for stdout contamination risk. Allowed values: `auto` (default; run with warnings when risk is elevated), `strict` (fail fast on blocking risks, keep heuristic risks as warnings), or `off` (disable the preflight guard). | auto |
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
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| codexB | Start session asynchronously and return |
| codex_replyA | Continue existing session. Allowed in |
| codex_sessionB | Session actions: list, get, cancel, interrupt, fork, clean_background_terminals.
|
| codex_checkA | Poll session for events or respond to approval/input requests. POLLING FREQUENCY: Do NOT poll every turn. Codex tasks take minutes, not seconds.
poll: events since cursor. Default maxEvents=1. respond_permission: approval decision. Default maxEvents=0 (compact ACK). respond_user_input: user-input answers. Default maxEvents=0 (compact ACK). events[].type is coarse-grained; details are in events[].data.method. cursor omitted => use session last cursor. cursorResetTo => reset and continue. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| server_info | Server metadata and runtime capabilities |
| compat_report | Cross-backend compatibility capability report |
| config | Parameter guide and config.toml mapping |
| gotchas | Practical limits and common issues |
| quickstart | Minimal end-to-end workflow |
| errors | Error code reference and recovery hints |
TDQS
Scored across 4 tools
The four tools map to distinct lifecycle stages: start (codex), continue (codex_reply), manage (codex_session), and poll/respond (codex_check). There is minor overlap between codex_reply and codex_check's respond_user_input/respond_permission (both send input to a session), but the descriptions disambiguate by session state (idle/error vs waiting_approval).
All tools share the `codex_` prefix and snake_case style, giving a predictable namespace. The bare `codex` tool for starting a session is the only deviation (no verb like codex_start), which is a minor inconsistency rather than a real problem.
Four tools is a compact, well-scoped surface for an async session orchestrator, with each tool earning its place. However, codex_session hides six sub-actions (list/get/cancel/interrupt/fork/clean) and codex_check bundles poll plus two respond variants, so the effective surface is larger than the count suggests.
The full loop is covered: start a session, poll events, respond to approvals/input, continue turns, and cancel/interrupt/fork/manage sessions. Minor gaps exist—there is no explicit delete/archive action to remove sessions from memory and no dedicated result-retrieval beyond get details, but these are workaroundable.