codex-subagent-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_BIN | No | Path to the Codex executable, if it is not codex on PATH. | |
| CODEX_SUBAGENT_MAX_EFFORT | No | Ceiling on reasoning effort. Useful for keeping ultra off the table. | |
| CODEX_SUBAGENT_MAX_SANDBOX | No | Ceiling on what a delegation may do. Set to read-only to forbid writing outright. | |
| CODEX_SUBAGENT_DEFAULT_MODEL | No | Stops the server asking which Codex model to use. Sets the default model for delegations. | |
| CODEX_SUBAGENT_ALLOWED_MODELS | No | Comma-separated allow-list of Codex models. Any model not in the list is refused. | |
| CODEX_SUBAGENT_DEFAULT_EFFORT | No | Reasoning effort used when a delegation call specifies none. |
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
} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| codex_doctorA | Check whether the local Codex CLI is installed, recent enough, signed in and able to load its configuration, and report the exact steps to fix it if not. Run this when any other tool reports the CLI is unavailable, or before relying on delegation for the first time. It only inspects the installation; it never installs or repairs anything. Opt in with extended for a slow, networked config.load report from codex doctor --json. |
| list_codex_modelsA | List the Codex models available on this machine, with the reasoning-effort levels each one supports. Read from the installed Codex CLI, with a warned static fallback if its catalog cannot be read. Call this before codex_delegate when choosing a model explicitly. |
| codex_recommendA | Given a task description, recommend which Codex model and reasoning effort to delegate it with. Runs no model call; applies a documented matrix reconciled against the installed catalog. |
| codex_delegateA | Delegate a task to the local Codex CLI (OpenAI's coding agent), choosing model and reasoning effort. Use it when the user asks for Codex, or when handing work off clearly serves their request: a second opinion from a different model family, or an investigation that would otherwise flood this conversation. When the user has not named a model, call codex_recommend first and present its suggested model and effort to the user in the same message in which you say you are going to delegate, then pass both explicitly here. That recommendation is advice for an already-authorised delegation, not a replacement for the user's own preference. Everything passed in prompt, context and target_files is sent to OpenAI, and every run spends the user's own Codex usage, so do not delegate what you can answer directly, and tell the user when you delegate. Codex runs read-only unless a different default sandbox is configured. Set sandbox to workspace-write to let it edit files, if this server's sandbox ceiling allows it: a correctly configured server states the ceiling in its instructions, and a call above it is refused. Codex cannot see this conversation, so pass everything it needs in prompt, context, and target_files. |
| codex_follow_upA | Send a follow-up message to a previous delegation using its thread_id. Codex retains the earlier context, so only the new instruction needs to be sent. Like a delegation, it is sent to OpenAI and spends the user's Codex usage. |
| codex_job_statusA | Report the state and recent activity of a background delegation started with mode=background. Call it with no job_id to list every known job. |
| codex_usageA | Summarise this server's local usage log (CODEX_SUBAGENT_USAGE_LOG) over a window: per group, the number of delegation processes, their outcomes, commands, durations and the tokens the Codex CLI reported. Reads local files only and runs no Codex process. It never reports quota, credits or remaining allowance. |
| codex_job_resultA | Return the full output of a finished background delegation. Errors if the job is still running. |
| codex_job_cancelB | Terminate a running background delegation. |
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 9 tools
Each tool targets a distinct phase of the delegation workflow: model discovery, recommendation, delegation, follow-up, and job lifecycle. The only mild overlap is between codex_recommend and list_codex_models, but the descriptions clearly separate 'advise a choice' from 'enumerate the catalog'. codex_usage versus codex_job_status is also close but distinguishable (aggregate log vs. live job state).
All names use snake_case and a shared codex_ prefix, which helps. However, the verb placement and part of speech vary: codex_delegate (verb-first) vs codex_job_cancel (noun-then-verb), and noun-style names like codex_doctor and codex_usage break any verb_noun pattern. Readable, but not predictable.
Nine tools is well within the sweet spot and each maps to a concrete need: discovery, advice, execution, follow-up, observability, and three background-job controls. No tool looks redundant or padded.
The surface covers the full lifecycle from install diagnosis through model selection, delegation, follow-up, usage accounting, and background job status/result/cancel. Minor gaps exist, such as no explicit way to enumerate past threads or clean up finished jobs, but agents can work around these via thread_id and status listing.