
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 分