Codex Octopus is an MCP server that wraps the OpenAI Codex SDK, allowing users to run multiple specialized Codex agents with distinct configurations from any MCP client.
From the registry: Spawn multiple specialized Codex agents as MCP servers, each independently configured.
$ npm i -g @openai/codexPlease install the `codex-octopus` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Node.js 18+** — Node.js 18 or higher
- **Codex CLI** — Install @openai/codex CLI (wrapped by the SDK) Run: `npm i -g @openai/codex`
- **OpenAI API key** — Provide CODEX_API_KEY or inherit from parent process
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["codex-octopus@latest"]
- required environment variables:
- `CODEX_API_KEY`: OpenAI API key (example: `<your-openai-api-key>`)
- optional environment variables:
- `CODEX_SANDBOX_MODE`: Sandbox mode: read-only or workspace-write (example: `workspace-write`)
- `CODEX_APPROVAL_POLICY`: Approval policy: never, auto, on-request (example: `never`)
- `CODEX_TOOL_NAME`: Tool name for this instance (example: `codex`)
- `CODEX_SERVER_NAME`: Server name shown to client (example: `codex`)
- `CODEX_DESCRIPTION`: Tool description
- `CODEX_MODEL`: Codex model (e.g., gpt-5-codex, o3) (example: `gpt-5-codex`)
- `CODEX_APPEND_INSTRUCTIONS`: System instructions appended to the agent
- `CODEX_EFFORT`: Effort level: minimal, low, medium, high, xhigh (example: `medium`)
Note: Multi-instance Codex agent host — each MCP server entry becomes a specialized Codex tool (different model, sandbox, effort, instructions).
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.CODEX_API_KEYrequiredOpenAI API key for this agent.AI Agents Framework with Self Reflection and MCP support