Claudebox

io.github.psyb0tPublished by GitHub account psyb0tv2.8.5Updated Oct 27, 2026

Self-hosted MCP server exposing Claude Code as an agentic AI tool over streamable HTTP.

Overview

AI-generated overview

Self-hosted Docker-based server that exposes Claude Code as an agentic coding tool over streamable HTTP, MCP, API, Telegram and cron.

What you can do
  • Run Claude Code prompts against a mounted project directory and get text, JSON or streamed output
  • Expose Claude Code as streamable HTTP tools for other agents, plus an HTTP run endpoint with async polling and an OpenAI-compatible chat endpoint
  • Keep persistent sessions, resume a workspace's last session, and stop running containers
  • Schedule jobs and keep durable run artifacts, or drive chat workspaces with attachments over Telegram
  • Install sibling wrappers for nested launches and add custom scripts, init hooks, skills and external MCP servers
When to use it
Useful when you want a self-hosted, containerized way to give assistants or scripts access to Claude Code for coding tasks in a specific project directory, including programmatic, scheduled or multi-agent setups.
Requirements
Runs as a Docker image started locally; needs Bash, Docker accessible to your user, curl, SSH key-generation tools and sudo to install the wrapper. Claude Code must be authenticated, or ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN supplied via the environment. First container start needs network access to install the pinned Claude Code CLI.
Before you install
The standard wrapper is explicitly not a security sandbox: it uses host networking, mounts the host Docker socket, grants passwordless sudo and bypasses Claude's permission prompts, so use it only with trusted workloads. API and MCP authentication are independent and an unset token leaves the endpoint open; configure Telegram chat access explicitly and bind to loopback before exposing a server. Keep OAuth tokens in a secret store.

Installation

In SourceWeft

  1. Open Claudebox in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

claudebox

[CI] [version] [license] [Docker Pulls]

Run Claude Code in Docker, from an interactive terminal, a script, an HTTP client, MCP, Telegram, or a cron schedule. Claudebox adds Claude-specific setup to the shared aicodebox runtime.

The wrapper mounts your current directory, persists Claude state and SSH keys, and resumes the workspace's last session by default.

Not a security sandbox: the standard wrapper uses host networking, mounts the host Docker socket, gives Claude passwordless sudo, and bypasses Claude's permission prompts. Use it only with trusted workloads. Separate workspace directories do not isolate untrusted tenants. Server examples omit the Docker socket.

Install

You need Bash, Docker running and accessible to your user, curl, SSH key-generation tools, and sudo permission to install the wrapper. The installer pulls the image, creates Claude state and an SSH key, and installs the claudebox command.

Minimal image, the default:

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

Full development image:

bash
export CLAUDEBOX_FULL=1 && curl -fsSL https://raw.githubusercontent.com/psyb0t/docker-claudebox/master/install.sh | bash

The full-image choice stays in the installed wrapper. Both variants install the pinned Claude Code CLI from npm when a fresh container first starts, so that start needs network access.

For a reviewed local install, a custom command name, image overrides, or wrapper updates, see Installation and wrapper. The remote installer currently fetches the wrapper from its embedded release ref, not necessarily master.

First run

Run from the directory Claude should work in:

bash
cd /path/to/projectclaudebox

Authenticate in Claude Code, or supply ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN through your environment. claudebox setup-token runs Claude Code's OAuth token flow; keep the resulting token in a secret store and export it when needed.

bash
claudebox --no-continueclaudebox -p "explain this codebase"claudebox -p "review this codebase" --output-format jsonclaudebox -p "inspect the workspace" --output-format stream-jsonclaudebox stop

The wrapper supports a defined set of flags, not every native Claude Code argument. See Programmatic mode for output formats, model selection, and session control.

Image variants

ImageContents
psyb0t/claudebox:latestMinimal aicodebox runtime, Claude adapter, and first-start setup.
psyb0t/claudebox:latest-fullThe same Claude interfaces plus aicodebox's shared development toolchain.

The full variant adds Go and its tools, Python and Node development tools, C/C++ tools, infrastructure tools, database clients, and shell utilities. The shared Dockerfile.full and lockfiles own the package inventory. Neither Claudebox variant bundles the Claude Code CLI in the published image.

Set CLAUDEBOX_IMAGE to use an explicit image tag or digest. An existing container keeps its original image and launch configuration until recreated. See Wrapper lifecycle.

Modes

InterfaceGuide
Interactive terminal with persistent sessionsInteractive mode
One prompt with text, JSON, or native NDJSON outputProgrammatic mode
HTTP /run, files, async polling, and OpenAI-compatible chatAPI mode
Streamable HTTP tools for other agentsMCP mode
Chat workspaces, attachments, and access listsTelegram mode
Scheduled jobs and durable run artifactsCron mode

For all native events from HTTP POST /run, request "eventMode": "full". This works with or without jsonSchema. Events include the records Claude Code emits, such as tool calls, tool results, and available thinking content. It does not expose private reasoning that the CLI does not emit. /run returns a completed JSON response; use native stream-json for direct CLI streaming or the OpenAI endpoint's opt-in native SSE events.

API and MCP authentication are independent. An unset token leaves its endpoint open. Configure explicit Telegram chat access too. Use the loopback-bound deployment examples in each mode guide before exposing a server.

Configuration and extensions

  • Environment variables: wrapper settings, forwarded variables, extra mounts, and sibling boxes.
  • Customization: user scripts, first-container init hooks, always-active skills, and external MCP servers.
  • GitHub Action: one-shot jobs with a read-only context and a writable output directory.
  • Agent integrations: local wrapper skills and remote MCP connections for Claude Code, Codex, and OpenClaw.

Install sibling claudebox, codexbox, and pibox wrappers in the same command directory for nested launches. Each sibling mounts its own host state. Do not manually set AICODEBOX_HOST_*.

Development

bash
make helpmake test-unitmake test-image-selectmake test-programmatic-contractmake test-agent-launchermake buildmake build-full

Builds use the minimal or full aicodebox parent respectively. See Makefile for base-image overrides and the remaining checks. The adapter lives in claudebox/claudebox/adapter.py; the shared server modes live in aicodebox.

Migration and license

Previously named docker-claude-code with image psyb0t/claude-code. Current names are docker-claudebox, psyb0t/claudebox, and claudebox. In v2, latest became minimal and latest-full became the full variant. See CHANGELOG.md for migration history.

WTFPL.

Source: README.md at commit 1c5e4f4

Tools

0
SourceWeft started this package once in an isolated sandbox, without credentials, to list its tools. That failed: the package type cannot run in the sandbox.

Version history

8
  1. v2.8.5LatestOct 22, 2026
  2. v2.8.4Oct 20, 2026
  3. v2.5.1Oct 10, 2026
  4. v2.5.0Oct 7, 2026
  5. v2.4.7Oct 7, 2026
  6. v2.4.6Sep 26, 2026
  7. v2.4.5Sep 23, 2026
  8. v2.4.3Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts