Codexbox logo

Codexbox

Run OpenAI Codex prompts and manage workspace files through a self-hosted, Docker-based MCP server.

Install Codexbox

Run the project’s own setup commands, in order.

Setup steps from the project

Codexbox installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    curl -fsSL https://raw.githubusercontent.com/psyb0t/docker-codexbox/master/install.sh | bash
    
  2. 2. Install
    curl -fsSL https://raw.githubusercontent.com/psyb0t/docker-codexbox/master/install.sh | bash -s -- codex
    
  3. 3. Install
    make install       # minimal image
    
  4. 4. Install
    make install-full  # full image
    
  5. 5. Install
    make install-wrapper
    
  6. 6. Install
    CODEXBOX_FULL=1 make install-wrapper  # full image
    

Overview

Codexbox MCP server exposes OpenAI Codex through streamable HTTP, with a `run_prompt` tool and tools for working with workspace files. It runs inside a Docker container and connects Codex to either an OpenAI API key or a ChatGPT subscription. Enable MCP mode when you want an agent to delegate coding prompts to Codex while keeping project files mounted in the container. The same image also supports interactive use, an HTTP API, Telegram, and scheduled jobs.

Use cases

  • Delegate coding prompts to Codex from an MCP-compatible agent
  • Apply Codex-driven fixes to files in a mounted workspace
  • Run Codex against a project inside an isolated Docker environment
  • Expose Codex through streamable HTTP for remote agent access

Key features

  • Streamable HTTP MCP service
  • `run_prompt` and workspace file tools
  • Dockerized OpenAI Codex CLI
  • Minimal and full image variants
  • OpenAI-compatible HTTP API
  • Telegram and cron execution modes

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 84d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit3d agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Codexbox works

What Codexbox does

Codexbox packages the OpenAI Codex CLI in a Docker-based environment and exposes it as an MCP service. In MCP mode, agents can call run_prompt and use workspace file tools over streamable HTTP. The container can operate on a mounted project directory, allowing Codex prompts and file operations to target files available inside that workspace.

Authentication can use an OpenAI API key or a ChatGPT subscription through Codex login. Codexbox also provides non-MCP entry points, including an interactive terminal, one-shot command execution, an OpenAI-compatible HTTP API, Telegram access, and cron-triggered jobs. Those modes are separate from the MCP interface but use the same containerized Codex foundation.

How it works

The published Docker image contains Codex and a development environment. The minimal image includes Node.js, Python, uv, Docker, Git, jq, and curl. A full variant adds language tooling and utilities such as Go, GitHub CLI, Terraform, Kubernetes tools, Helm, debuggers, and database clients.

Set CODEXBOX_MCP_MODE=1 to start the MCP service. MCP runs over streamable HTTP and can run alongside the other service modes. Mount host project directories into the container so workspace tools can read and modify the intended files. The container handles the Codex sandbox boundary, while Codex communicates with OpenAI services or an authenticated ChatGPT account.

Setup and configuration

Docker is the primary prerequisite. The installer creates Codex and SSH-related directories, installs the codexbox wrapper on the host, and pulls the selected image. The default image is minimal; setting CODEXBOX_FULL=1 during installation selects the full development image.

A typical service configuration sets the MCP mode flag, supplies credentials through the supported Codex authentication method, and mounts a workspace. Authentication settings, container options, forwarded environment variables, ports, Git identity, initialization scripts, and MCP-specific options are documented as separate configuration areas by the project.

The wrapper can preserve Codex login state and sessions in ~/.codex. It also mounts the current directory for interactive and one-shot commands, while service deployments can mount an explicit workspace path such as /workspace.

Tools and capabilities

  • Invoke Codex with the run_prompt MCP tool.
  • Read and manage workspace files through MCP file tools.
  • Serve MCP requests over streamable HTTP.
  • Run Codex interactively or execute a single prompt from a terminal.
  • Expose an HTTP API with an OpenAI-compatible chat/completions endpoint.
  • Send prompts through Telegram or schedule YAML-defined cron jobs.
  • Choose minimal or full Docker images based on the required toolchain.

Limitations and notes

Codexbox depends on Docker and on Codex authentication through an OpenAI API key or ChatGPT subscription. The MCP service operates against files visible inside its container, so workspace mounts determine what an agent can access. An empty service token disables authentication on that surface; protect the HTTP listener and bind it appropriately for the deployment.

The full image includes Terraform, which uses the BUSL-1.1 license, and bundled third-party components retain their own licenses. The project itself is licensed under WTFPL. MCP-specific client setup should account for the service's streamable HTTP transport; the repository also provides a stdio bridge through its OpenClaw plugin.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codexbox

Codexbox is an MCP server that connects agents to the OpenAI Codex CLI through Docker and streamable HTTP. Its main tools are `run_prompt` for sending prompts to Codex and workspace file tools for reading and managing files mounted in the container. It supports OpenAI API-key authentication or a ChatGPT subscription.

Install it with the provided shell installer after installing Docker, then enable MCP mode with `CODEXBOX_MCP_MODE=1`. The installer pulls the image, creates Codex and SSH directories, and adds the `codexbox` wrapper to your `PATH`. Mount the project workspace into the container for file access.

Mount the project directory into the container, such as `/workspace`, and configure Codex authentication with an API key or ChatGPT subscription login. Workspace file tools operate on paths visible inside the container, so the mount determines which project files the MCP client can access.

Codexbox provides an MCP service over streamable HTTP, so it can be used from MCP clients that support that transport, including clients such as Cursor. Configure the client with the Codexbox service endpoint and enable the container's MCP mode.

Yes. Codexbox supports authenticating Codex with a ChatGPT subscription through device authentication instead of setting `OPENAI_API_KEY`. The selected authentication method supplies Codex's access to OpenAI services.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodexbox AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codexbox?style=directory)](https://allmcps.com/mcp/codexbox)
HTML Embed
<a href="https://allmcps.com/mcp/codexbox"><img src="https://allmcps.com/api/badge/codexbox?style=directory" alt="Codexbox on AllMCPs" /></a>