Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_CWD | No | Working directory | |
| CODEX_MODEL | No | Model (gpt-5-codex, o3, codex-1, etc.) | |
| CODEX_EFFORT | No | Reasoning effort (minimal, low, medium, high, xhigh) | |
| CODEX_API_KEY | No | OpenAI API key for this agent (can be inherited from parent process) | |
| CODEX_TOOL_NAME | No | Tool name prefix (<name> and <name>_reply) | codex |
| CODEX_WEB_SEARCH | No | Web search mode: disabled, cached, live | disabled |
| CODEX_DESCRIPTION | No | Tool description shown to the host AI | |
| CODEX_SERVER_NAME | No | MCP server name in protocol handshake | codex-octopus |
| CODEX_FACTORY_ONLY | No | Only expose the factory wizard tool | false |
| CODEX_INSTRUCTIONS | No | Replaces the default instructions | |
| CODEX_SANDBOX_MODE | No | read-only, workspace-write, danger-full-access | read-only |
| CODEX_NETWORK_ACCESS | No | Allow network from sandbox | false |
| CODEX_ADDITIONAL_DIRS | No | Extra directories (comma-separated) | |
| CODEX_APPROVAL_POLICY | No | never, on-failure, on-request, untrusted | on-failure |
| CODEX_PERSIST_SESSION | No | enable session resume | true |
| CODEX_APPEND_INSTRUCTIONS | No | Appended to the default instructions |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| codex | Send a task to an autonomous Codex agent. It reads/writes files, runs shell commands, searches codebases, and handles complex software engineering tasks end-to-end. Returns the result text plus a thread_id for follow-ups via codex_reply. |
| codex_reply | Continue a previous codex conversation by thread ID. Use this for follow-up questions, iterative refinement, or multi-step workflows that build on prior context. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |