# Codexbox [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/psyb0t/docker-codexbox  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/codexbox

## Description
Self-hosted MCP server: run OpenAI Codex CLI prompts and manage workspace files.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/psyb0t/docker-codexbox), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
curl -fsSL https://raw.githubusercontent.com/psyb0t/docker-codexbox/master/install.sh | bash
```

2. Install:

```sh
curl -fsSL https://raw.githubusercontent.com/psyb0t/docker-codexbox/master/install.sh | bash -s -- codex
```

3. Install:

```sh
make install       # minimal image
```

4. Install:

```sh
make install-full  # full image
```

5. Install:

```sh
make install-wrapper
```

6. Install:

```sh
CODEXBOX_FULL=1 make install-wrapper  # full image
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/codexbox/readme_

