
Claudebox
io.github.psyb0t由 GitHub 帳號 psyb0t 發布v2.8.5更新於 Oct 27, 2026
Self-hosted MCP server exposing Claude Code as an agentic AI tool over streamable HTTP.
概覽
自架的 Docker 服務,透過 streamable HTTP、MCP、API、Telegram 與排程工作,把 Claude Code 當成代理式編碼工具對外提供。
- 可以做什麼
- 在掛載的專案目錄上執行 Claude Code 提示,取得文字、JSON 或串流輸出
- 把 Claude Code 以 streamable HTTP 工具提供給其他代理,並提供含非同步輪詢的 HTTP 執行端點與 OpenAI 相容聊天端點
- 維持持續性工作階段、恢復工作區上次的工作階段,並停止執行中的容器
- 排程工作並保留執行產物,或透過 Telegram 使用含附件的聊天工作區
- 安裝同層包裝器以支援巢狀啟動,並加入自訂腳本、初始化掛鉤、技能與外部 MCP 伺服器
- 適用情境
- 適合想以自架、容器化方式,讓助理或腳本在特定專案目錄中呼叫 Claude Code 處理編碼工作的情境,包括程式化呼叫、排程工作與多代理設定。
- 執行需求
- 以本機啟動的 Docker 映像執行;安裝包裝器需要 Bash、目前使用者可存取的 Docker、curl、SSH 金鑰產生工具與 sudo 權限。需先完成 Claude Code 驗證,或透過環境變數提供 ANTHROPIC_API_KEY 或 CLAUDE_CODE_OAUTH_TOKEN。容器首次啟動需連網安裝固定版本的 Claude Code CLI。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Claudebox,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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:
Full development image:
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:
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.
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
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
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
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.
來源:README.md,提交 1c5e4f4
工具
0版本歷史
8- v2.8.5最新Oct 22, 2026
- v2.8.4Oct 20, 2026
- v2.5.1Oct 10, 2026
- v2.5.0Oct 7, 2026
- v2.4.7Oct 7, 2026
- v2.4.6Sep 26, 2026
- v2.4.5Sep 23, 2026
- v2.4.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分