codex-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_BIN | No | Path to the Codex CLI binary, if not in PATH | |
| CODEX_MCP_TERMINAL | No | Set to 1 to enable the live terminal view by default for codex_execute/codex_continue | 0 |
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 |
|---|---|
| codex_executeA | Start a new Codex session that executes a plan/task in the given workspace. Returns sessionId (keep it to send review feedback later), agent message, file changes and commands run. |
| codex_continueA | Resume an existing Codex session by sessionId with a follow-up prompt — typically review feedback that Codex should address. Preserves Codex context. |
| codex_reviewA | Ask Codex to review the uncommitted changes in a workspace (read-only sandbox, no files modified). Returns findings ordered by severity plus a sessionId usable with codex_continue. |
| codex_sessionsA | Discover Codex sessions stored locally under ~/.codex/sessions/. Returns sessionId, cwd, and last activity for each, newest first. sessionId can be passed to codex_continue to resume. Filter by cwd to find sessions from a specific workspace. |
| codex_metricsA | Roll up token/duration/failure counts from the local metrics log (~/.codex-mcp/metrics.jsonl). Set CODEX_MCP_PRICING (JSON: {inputPer1M, cachedInputPer1M, outputPer1M, reasoningOutputPer1M}) to include estCostUsd. |
| codex_batchA | Fan out N tasks across N cwds (typically git worktrees) with a bounded concurrency limit. Each task uses its own per-cwd lock, so callers must supply distinct cwds. Returns one result entry per input task in input order. |
| codex_healthA | Report installed Codex CLI version and login status. With deep=true, also run one bounded read-only Codex exec probe to detect quota/model outages that login status cannot see. |
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 7 tools
Each tool has a clearly distinct purpose: discovering sessions, executing new tasks, resuming sessions, reviewing changes, batching work, reading metrics, and checking health. Though execute and batch both run Codex, their scope (single vs. fanned-out) is explicit and easy to distinguish.
All tools share the consistent codex_ prefix and snake_case style, which makes them predictable. However, the suffix mixes verbs (execute, continue) with nouns (sessions, metrics, batch, health), so it is not a strict verb_noun convention.
Seven tools is well-scoped for a Codex-focused server. Each tool covers a meaningful workflow: session discovery, execution, continuation, review, batch processing, metrics, and health checks, with no obvious bloat.
The set covers the core Codex lifecycle: create and run sessions, resume them, review changes, batch tasks, and observe usage/health. Minor gaps exist, such as no explicit tool for full session transcripts or canceling in-progress sessions, but agents can work around these using returned sessionIds and the CLI.