xiaolai avatar

Codex Octopus

xiaolai/codex-octopus

If you need to run multiple Codex instances with different personalities and permissions, this is the wrapper for you. It lets you spin up specialized agents from a single binary, each configured independently via environment variables. You might run a strict code reviewer locked to read-only sandbox, a test writer with workspace-write access, and a quick helper on minimal effort, all appearing as separate tools in your MCP client. It wraps the OpenAI Codex SDK and exposes a task tool plus a reply tool for threading conversations. There's also a factory mode that generates configuration snippets interactively. Useful when one general-purpose Codex isn't enough and you want purpose-built agents without managing separate installations.

GitHub stars
14
tool
1
auth
Secret needed
transport
STDIO
env vars
7
last updated
Apr 2, 2026

Tools

1 tools

Public tool metadata for what this MCP can expose to an agent.

create_codex_mcpInteractive wizard that generates the `.mcp.json` entry for a new agent from a plain-language description.

Interactive wizard that generates the `.mcp.json` entry for a new agent from a plain-language description.

No parameter schema in public metadata yet.

Sponsors

Configuration

CODEX_API_KEYsecret

OpenAI API key (leave unset to inherit from parent process)

CODEX_TOOL_NAME

Tool name prefix (default: codex)

CODEX_MODEL

Model: gpt-5-codex, o3, codex-1, or full ID

CODEX_SANDBOX_MODE

Sandbox: read-only, workspace-write, danger-full-access

CODEX_APPROVAL_POLICY

Approval: never, on-failure, on-request, untrusted

CODEX_APPEND_INSTRUCTIONS

Additional instructions appended to the default

CODEX_FACTORY_ONLY

Set to true to expose only the factory wizard tool

Readme

Codex Octopus

Codex Octopus

One brain, many arms.

An MCP server that wraps the OpenAI Codex SDK, letting you run multiple specialized Codex agents — each with its own model, sandbox, effort, and personality — from any MCP client.

Why

Codex is powerful. But one instance does everything the same way. Sometimes you want a strict code reviewer in read-only sandbox. A test writer with workspace-write access. A cheap quick helper on minimal effort. A deep thinker on xhigh.

Codex Octopus lets you spin up as many of these as you need. Same binary, different configurations. Each one shows up as a separate tool in your MCP client.

Prerequisites

  • Node.js >= 18
  • Codex CLI — the Codex SDK spawns the Codex CLI under the hood, so you need it installed (@openai/codex)
  • OpenAI API key (CODEX_API_KEY env var) or inherited from parent process

Install

npm install codex-octopus

View the full README on GitHub

Details

Repository
github.com/xiaolai/codex-octopus
Package
codex-octopus
Transport
STDIO
Auth
Required
Registry
MCP registry, active