Skip to main content
Glama
antigravity-codex-mcp
by Sunlazys

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CODEX_MCP_HOSTNoHost address to bind. CLI flag: --host <addr>.127.0.0.1
CODEX_MCP_PORTNoPort number. CLI flag: --port <num>.8765
CODEX_CLI_COMMANDNoCodex CLI command. CLI flag: --codex-command <cmd>.codex
CODEX_MCP_BACKENDNoBackend to use (cli or app-server). CLI flag: --backend <cli|app-server>.cli
CODEX_MCP_HTTP_PATHNoHTTP route path. CLI flag: --path <route>./mcp
CODEX_MCP_STATELESSNoEnable stateless HTTP mode. CLI flag: --stateless.false
CODEX_MCP_STATE_DIRNoState directory. CLI flag: --state-dir <dir>.~/.codex-mcp-state
CODEX_MCP_TRANSPORTNoTransport mode. CLI flag: --transport <stdio|http>.stdio
CODEX_MCP_AUTH_TOKENNoBearer token for HTTP mode. CLI flag: --auth-token <token>. Required for authenticated HTTP mode unless CODEX_MCP_AUTH_TOKEN_FILE is used.
CODEX_MCP_MAX_SANDBOXNoMaximum sandbox mode. CLI flag: --max-sandbox <mode>. Default: unrestricted for stdio, workspace-write for HTTP.
CODEX_MCP_ALLOWED_HOSTSNoComma-separated allowed Host headers. CLI flag: --allowed-hosts <csv>. Default: loopback + bind host.
CODEX_MCP_ALLOWED_ROOTSNoAllowed workspace root paths. CLI flag: --allowed-roots <paths>. Required for HTTP mode; unrestricted for stdio by default.
CODEX_MCP_ALLOW_ANY_CWDNoAllow any current working directory (dev opt-in only). CLI flag: --allow-any-cwd.false
CODEX_MCP_DEFAULT_MODELNoDefault Codex model. CLI flag: --default-model <model>. Unset by default.
CODEX_MCP_ALLOWED_ORIGINSNoComma-separated allowed Origin headers. CLI flag: --allowed-origins <csv>. Default: loopback origins.
CODEX_MCP_AUTH_TOKEN_FILENoPath to a file containing the bearer token for HTTP mode. CLI flag: --auth-token-file <path>. Alternative to CODEX_MCP_AUTH_TOKEN.
CODEX_MCP_DEFAULT_PROFILENoDefault Codex profile name. CLI flag: --default-profile <name>. Unset by default.
CODEX_MCP_SESSION_TTL_SECNoHTTP session idle TTL in seconds. CLI flag: --session-ttl-sec <sec>.3600
CODEX_MCP_MAX_RETAINED_JOBSNoMaximum retained jobs. CLI flag: --max-retained-jobs <n>.500
CODEX_MCP_MAX_CONCURRENT_JOBSNoMaximum concurrent jobs. CLI flag: --max-concurrent-jobs <n>.4
CODEX_MCP_DEFAULT_REASONING_EFFORTNoDefault reasoning effort level. CLI flag: --default-reasoning-effort <lvl>. Unset by default.
CODEX_MCP_ALLOW_UNAUTHENTICATED_HTTPNoAllow unauthenticated HTTP (loopback dev opt-in only). CLI flag: --allow-unauthenticated-http.false
CODEX_MCP_ALLOW_UNAUTHENTICATED_NETWORKNoAllow unauthenticated network access (dangerous opt-in). CLI flag: --allow-unauthenticated-network.false

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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
codex_runA

Start a new asynchronous Codex CLI session (codex exec --json). Returns a job_id immediately (or waits up to wait_seconds <= 55s).

codex_resumeB

Resume an existing Codex session by exact session_id, previous MCP job_id, or use_last=true (mutually exclusive). Locks session identity strictly.

codex_forkB

Fork an existing Codex session by exact session_id or previous MCP job_id into a brand-new session.

codex_reviewA

Run a non-interactive Codex code review (codex exec review --json). Choose exactly one target: uncommitted=true, base branch, commit SHA (+optional title), or custom prompt.

codex_pollA

Safely long-poll an asynchronous Codex job (wait_seconds <= 55). Supports replayable cursor (returns seq > cursor), truncation reporting, terminal/events wakeup modes, and optional intermediate event omission.

codex_resultA

Retrieve the final structured result of a completed/failed/cancelled/timed_out job. Returns ready=false without blocking if still active.

codex_cancelA

Cancel an active Codex job by terminating its process tree. Atomic against completion and retryable on kill failure.

codex_list_sessionsA

List Codex sessions by merging local $CODEX_HOME/sessions rollout files and MCP job records. Sessions in both appear as source='both' and match both local and mcp filters.

codex_get_sessionA

Inspect metadata and recent user/assistant conversation turns for a specific Codex session_id.

codex_list_jobsA

List active and recent asynchronous Codex MCP jobs (newest first). Useful for reconnecting or recovering job_id across windows/devices.

codex_list_workspacesA

List available workspace directories (allowed roots + child directories in restricted mode, or recently used directories in unrestricted mode) with Git branch and dirty status.

codex_healthA

One-shot preflight and health check: verifies Codex CLI availability, MCP concurrency/policy limits, default model/reasoning config, cached models, and optional cwd/model/reasoning_effort readiness.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 12 tools

Disambiguation4/5

Most tools target clearly distinct operations: run (new session), resume, fork, review, poll, result, cancel all have specific roles clarified by descriptions. Minor overlap exists between codex_list_sessions and codex_list_jobs (both enumerate session/job records, with sessions merging both sources) and between codex_resume and codex_fork (both accept session_id or job_id), but the descriptions draw the lines adequately.

Naming Consistency4/5

All tools share a consistent `codex_` prefix with a predictable verb_noun convention (codex_run, codex_resume, codex_poll, codex_list_sessions, codex_get_session). A couple of names are noun-only (codex_health, codex_result) rather than verb-led, a minor deviation from the otherwise uniform pattern.

Tool Count5/5

Twelve tools is well within the ideal range and each maps to a distinct facet of the async job/session lifecycle. The set is cleanly organized into job control (run/poll/result/cancel), session management (resume/fork/list/get), plus review, health, and workspace listing, so no tool feels redundant.

Completeness4/5

The surface covers the full async lifecycle (start, poll, result, cancel), session continuation (resume, fork, list, get), review, and environment introspection (health, workspaces). Minor gaps remain: no session/job cleanup or deletion, no way to change default config (only read it via health), and no content-based session search.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues