codex-router-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AGENT_ROUTER_DEBUG | No | Mirror app-server stderr and protocol traffic to stderr. | false |
| AGENT_ROUTER_SANDBOX | No | Sandbox for delegations (reviews are always read-only). | workspace-write |
| AGENT_ROUTER_CODEX_BIN | No | Executable to spawn. | codex |
| AGENT_ROUTER_ISOLATION | No | Default isolation: `none` or `worktree`. | none |
| AGENT_ROUTER_CODEX_ARGS | No | Args; a JSON array is accepted for paths with spaces. | app-server |
| AGENT_ROUTER_STATE_FILE | No | Task metadata file. | ~/.agent-router/tasks.json |
| AGENT_ROUTER_CHECKPOINTS | No | Set to `off` to stop snapshotting around turns. | on |
| AGENT_ROUTER_AUTO_APPROVE | No | Accept an approval request that arrives anyway. | false |
| AGENT_ROUTER_WORKTREE_ROOT | No | Where linked worktrees are created. | ~/.agent-router/worktrees |
| AGENT_ROUTER_APPROVAL_POLICY | No | Codex runs headless; nobody can answer prompts. | never |
| AGENT_ROUTER_QUOTA_PREFLIGHT | No | Set to `off` to skip the pre-delegation quota check. | on |
| AGENT_ROUTER_MAX_WAIT_SECONDS | No | Ceiling on `waitSeconds`. | 1800 |
| AGENT_ROUTER_QUOTA_LOW_PERCENT | No | Remaining percent that triggers the `low` warning. | 15 |
| AGENT_ROUTER_QUOTA_BLOCK_PERCENT | No | Remaining percent that blocks delegation. | 2 |
| AGENT_ROUTER_DEFAULT_WAIT_SECONDS | No | Blocking window before returning `running`. | 240 |
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_get_modelsA | List the Codex models available to this account, with the reasoning-effort levels each one supports. Read live from the Codex model catalogue — never hardcoded. Use it before codex_delegate when you want to match model strength to task difficulty. |
| codex_get_limitsA | Read Codex usage limits, normalized by window duration (300 min -> '5h', 10080 min -> 'weekly'), with usedPercent, remainingPercent, resetsAt and rateLimitReached per window, plus a delegation verdict. Check this before delegating anything large. |
| codex_delegateA | Hand a self-contained coding task to Codex as a subagent. Starts a fresh Codex thread, runs the task, and returns the result plus the files it changed. Checks quota first: if Codex has no quota left it returns status 'quota_exhausted' with a handoff so you can finish the work yourself instead of waiting for a reset. |
| codex_continueA | Send a follow-up instruction into an existing Codex thread, keeping all of its prior context. Use it to iterate on review feedback instead of re-delegating from scratch. |
| codex_task_statusA | Read the current state of a delegated task: status, model, reasoning effort, changed files, commands run, plan, diff, worktree, checkpoints, and timestamps. Poll this when codex_delegate returned status 'running'. Omit taskId to list all known tasks. |
| codex_interruptA | Stop the turn Codex is currently running for a task. The thread survives, so codex_continue can pick it back up. |
| codex_reviewA | Ask Codex to review changes and report findings. Use it on YOUR OWN work for a second opinion before you ship, or on a Codex task's output with a different model. Codex reviews read-only and changes nothing. Returns a review task you can poll or extend with codex_continue. |
| codex_checkpointsA | List the working-tree snapshots taken around a task's turns. Each checkpoint captures tracked and untracked files without touching the user's index, and can be restored with codex_restore. Requires the working directory to be inside a git repository. |
| codex_restoreA | Roll the working tree back to a checkpoint — use it when Codex made things worse. This overwrites files on disk, so confirm with the user before calling it unless they already asked for the rollback. The pre-restore state is always captured as a new checkpoint first, so the operation is itself undoable. |
| codex_worktreeA | Commit or remove the isolated git worktree of a task delegated with isolation "worktree". "commit" records the work on the task branch and reports the merge command; the router never merges into the user branch itself. "remove" tears the worktree down and refuses to discard uncommitted work unless forced. |
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 10 tools
Each tool targets a clearly distinct action or resource: delegation, continuation, status polling, interrupting, reviewing, checkpoint listing/restoring, worktree management, and preflight checks for models/limits. Even the closely related checkpoint and worktree tools are differentiated by their git semantics and descriptions.
All tools share the codex_ prefix, but the action pattern is mixed: codex_delegate, codex_restore, codex_continue, codex_interrupt, and codex_review are bare verbs, codex_get_models and codex_get_limits use get_, while codex_checkpoints, codex_worktree, and codex_task_status are bare nouns. The naming is readable but not predictable enough for an agent to guess tool names confidently.
Ten tools is well-scoped for a Codex routing and task-lifecycle server. Each tool covers a necessary phase—preflight checks, delegation, follow-up, status, interruption, review, checkpoint rollback, and worktree handling—without redundant entries.
The tool surface covers the full delegation lifecycle: checking models and limits before starting, delegating, continuing, polling status, interrupting, reviewing, and rolling back via checkpoints or worktrees. No obvious dead ends or critical missing operations stand out for the router's stated purpose.