Oxcart 下载
菜单

面向 AI 编程智能体的 Docker:Claude Code、Codex 和 Cursor 的本地 MCP 服务器

The best way to let a coding agent work with your Docker containers on a Mac is an MCP server that answers its questions directly. Oxcart includes one: 13 tools, no pulls, builds or deletions by default, local only, and a crash diagnosis in 159 tokens instead of the 2,014 the agent would read from the docker CLI.

更新于

编程智能体需要从 Docker 了解什么

处理真实项目时,智能体会反复问几个问题:哪些服务正在运行、端口 3000 上是什么应用、这个容器为什么退出、日志说了什么、能否在一次性环境中运行测试。只有 shell 时,它会运行 docker ps、docker inspect 和 docker logs,再逐行读取返回内容。这能解决问题,却又慢又贵:每一轮都要把原始 JSON 和数百行日志放入模型上下文。

MCP 服务器把这些问题转化为直接返回答案的工具。Oxcart 的工具围绕问题设计,而非照搬 Docker API 端点,因此一次调用即可替代一连串命令。

13 个工具

按智能体意图分类的 Oxcart MCP 工具
意图工具Level needed
查看status, projects, ports, images, logsRead only(只读)
解释diagnose:退出码、OOM 终止、健康检查失败、端口问题,以及关键日志行Read only(只读)
执行操作container(启动、停止、重启)、exec、compose(启动、停止)、无网络的 sandboxManage(管理)
修改与清理build、remove、cleanup(先预览)、带网络的 sandboxFull(完整权限)

status 显示每个 Compose 项目的文件夹、git 分支及 localhost URL,让你和智能体对“端口 3000 上的应用”有相同理解。订阅资源的客户端可在崩溃、OOM 终止或健康状态变化发生时立即收到通知,无需轮询。

回答更精简,会话成本更低

智能体回答各问题时,通过 Oxcart 读取的内容与原本需读取的 docker CLI 输出对比;在同一时刻对同一批容器测量:

每个回答的 token 数(字符数 ÷ 4)
问题Oxcart MCP对应的 docker CLI 命令docker CLI缩减倍数
这个容器为什么停止?159inspect + logs --tail 3002,01413×
最近 500 行日志有错误吗?39logs --tail 50070318×
哪些服务正在运行?106ps -a + stats --no-stream + compose ls -a3323.1×

五个测试容器(一个崩溃、一个不健康、一个被 OOM 终止、一个 Compose 项目、一个已发布端口)。无论日志多长,diagnose 和 logs 的响应大小均保持不变。工具列表本身每个会话只需加载一次:只读级别(6 个工具)为 510 个 token,全部 13 个工具为 1,463 个。

完整会话也呈现同样趋势。Claude Code 使用 Claude Opus 5.5 回答两个日常问题,分别仅使用 docker CLI 和使用 Oxcart MCP 服务器。两组都正确回答了两个问题。

每个任务、每组各一次 Claude Code 会话:仅供参考,并非正式研究
任务时间费用Token 数轮次
“worker 有报错吗?把错误给我。”4.2 s 对比 31.0 s$0.022 对比 $0.15710,686 对比 52,2662 对比 8
“我的 api 容器一直退出,为什么?”8.5 s 对比 14.9 s$0.036 对比 $0.07011,283 对比 19,5102 对比 4

每个任务分别在使用和不使用 Oxcart 的条件下各运行一次会话,采用人工构造的测试容器,Oxcart 0.1.0:仅供参考。费用受提示缓存影响,运行顺序未交替安排。

在任意编程智能体中设置 Oxcart MCP 服务器

  1. 安装 Oxcart。 下载 Oxcart(Apple 芯片,macOS 26 或更高版本)并打开。设置可离线完成,只需几秒。
  2. Copy the setup sentence. Open MCP Integrations in Oxcart's sidebar and copy the sentence: “Set up Oxcart's MCP server for me: run /Applications/Oxcart.app/Contents/Helpers/oxcart agent setup and follow its instructions. If you can't run commands, tell me to copy the entry under "Agent can't run commands?" in Oxcart › MCP Integrations.”
  3. 粘贴到智能体中。 粘贴到 Claude Code、Codex、Cursor 或任何可运行命令的智能体中。智能体会执行命令,读取适用于自身的步骤,并注册名为 oxcart 的服务器。
  4. Ask about your containers. Ask “what is running?” or “why did api stop?”. The agent appears on the MCP Integrations page, at Manage, with every call in its activity log.
  5. Change the level if you want. Lower the agent to Read only to let it look but change nothing, or raise it to Full to let it build, remove and clean up. Block refuses every call. Agents set up with an earlier version of Oxcart keep their level.

Claude Desktop can't run commands, so you add the entry yourself. In Claude, Settings › Developer › Edit Config opens ~/Library/Application Support/Claude/claude_desktop_config.json. Add oxcart under mcpServers, keeping any servers already there, then quit and reopen Claude:

{
  "mcpServers": {
    "oxcart": {
      "command": "/Applications/Oxcart.app/Contents/Helpers/oxcart",
      "args": ["mcp", "--client", "claude-desktop"]
    }
  }
}

Apps opened from the Dock or Finder don't search your shell's PATH, so every entry names the full path to oxcart, even with Oxcart's command-line tools installed. Other apps that can't run commands, such as LM Studio, take the entry Oxcart shows under Agent can't run commands? on the MCP Integrations page.

For Claude Code, the direct command is:

claude mcp add -s user oxcart -- /Applications/Oxcart.app/Contents/Helpers/oxcart mcp --client claude-code

对于 Codex,codex mcp add oxcart -- /Applications/Oxcart.app/Contents/Helpers/oxcart mcp --client codex 会为 Codex CLI 和 IDE 扩展注册服务器。

为每个智能体设置权限级别

各级别允许的操作
级别智能体可以
Read only(只读)查看容器、日志、端口、项目和镜像;诊断故障
Manage (default)Also start, stop and restart, run commands, Compose up and down, run sandboxes without network, with images already on your Mac
Full(完整权限)还可构建、移除和清理,并允许沙盒访问网络
Block(阻止)不可执行任何操作:不列出工具,拒绝所有调用,并向智能体说明原因

Every call is logged on your Mac and shown on the MCP Integrations page; nothing leaves the Mac. The levels govern what Oxcart's tools do for an agent. They are not a sandbox: an agent that can run shell commands can still run docker itself, so pair them with your agent's own command permissions.

提供配置步骤的智能体

Claude Code, Claude Desktop, Codex, Cursor, VS Code with Copilot, Devin Desktop, Zed, Gemini CLI, GitHub Copilot CLI, OpenCode, Cline, Junie, JetBrains AI Assistant, Goose, Kiro, Amp, Warp and LM Studio, plus a step for any other MCP client. The steps come from your installed copy of Oxcart (/Applications/Oxcart.app/Contents/Helpers/oxcart agent setup), with your Mac's real paths, so they work offline and match your version.

MCP 之外的智能体容器工作流

  • Dev Containers:在 Dev Container 中运行智能体,让其 shell、工具和网络留在项目容器内。Oxcart 可运行 Dev Containers CLI;参见 Mac 上的 Dev Containers 和 Testcontainers。
  • 快速迭代:智能体会不断运行和拆除容器。Oxcart 实测 docker run --rm 为 42 ms,停止并移除 20 个容器为 77 ms,是我们测试的三款运行时中最快的(比较页面)。
  • Compose 服务栈:智能体的 compose 工具可在 Manage 级别启动和停止项目;参见 Apple 芯片上的 Docker Compose。

常见问题

Mac 上有面向 Docker 容器的 MCP 服务器吗?

有。Oxcart 内置 oxcart mcp,这是本地 stdio MCP 服务器,提供 13 个工具,用于状态、诊断、日志、端口、镜像、exec、Compose、构建、沙盒和清理。它不监听任何网络端口,也不需要令牌。

如何让 Claude Code 连接 Docker 容器?

将 Oxcart 的设置语句粘贴到 Claude Code,或运行 claude mcp add -s user oxcart -- /Applications/Oxcart.app/Contents/Helpers/oxcart mcp --client claude-code。随后 Claude Code 会列出 oxcart 服务器,并可调用其工具。

支持 Codex、Cursor 和带 Copilot 的 VS Code 吗?

Oxcart 为 18 款具名客户端提供配置步骤,包括 Codex、Cursor、带 Copilot 的 VS Code、Claude Desktop、Zed、Gemini CLI、GitHub Copilot CLI、Cline、Goose、Kiro、Amp、Warp 和 LM Studio,也为其他 MCP 客户端提供通用步骤。其中 Claude Code 已完成端到端运行验证。

智能体能删除我的容器或卷吗?

Not by default. New agents start at Manage: they can start, stop and restart containers, run commands in them and bring Compose projects up and down with images already on your Mac, but not pull, build or delete. Removing containers, images and volumes and cleaning up need Full. Agents set up with an earlier version of Oxcart keep their level, and you can lower an agent to Read only, raise it to Full, or Block it. At Full, cleanup first returns a preview and a token, and deletes only what that preview listed. The levels govern Oxcart's tools; they are not a sandbox, so an agent with shell access can still run the docker CLI directly.

为什么不直接让智能体运行 docker 命令?

可以,但智能体需要读取大量原始输出。回答“这个容器为什么停止?”时,Oxcart 的 diagnose 工具需要 159 个 token,而 docker inspect 加 docker logs --tail 300 需要 2,014 个,缩减 13×。每个任务各运行一次 Claude Code 会话的参考测试中,查找日志错误用时从 31.0 s 降至 4.2 s。

MCP 服务器会把我的数据发送到其他地方吗?

不会。它只与本地引擎套接字通信,自身不建立网络连接。每次调用都写入 Mac 上的活动日志。工具启动或构建需要镜像的内容时,仍会像 docker run 一样从镜像仓库拉取镜像。

智能体能在一次性容器中运行代码吗?

可以,使用 sandbox 工具:它创建一次性容器,内存限制为 2 GiB,进程数限制为 1,024。默认无网络,只有智能体处于 Full 级别且请求网络访问时才会启用。

来源与方法

  • 回答大小:2026-10-10 使用五个测试容器测量;token 数按字符数 ÷ 4 估算。
  • 会话:Claude Code 2.1.296,使用 claude-opus-5-5,Oxcart 0.1.0,每个任务、每组各运行一次。
  • 速度数据:Oxcart 0.1.2,2026-10-10,Apple M5 Max,8 个 CPU 和 12 GiB;对比运行时于同日较早时间,使用同一台 Mac、同一套测试工具和 docker 29.4 客户端测量。

在你自己的项目中试用 Oxcart

免费试用 60 天。之后购买一个许可证,终身包含所有更新,无需订阅。

配备 Apple silicon 的 Mac · Windows 11 (x64)

继续阅读

版本更新说明

Oxcart 26.11.6

最新版本

Containers see the changes you make to files on your Mac as they happen.

  • Edit a file in a shared folder on your Mac, and tools that watch it in a container, such as Vite, webpack and nodemon, reload right away. Polling is not needed.
  • When no containers are running and you haven't used Docker for two minutes, Oxcart gives the memory it was using back to macOS. The next docker command starts it again in under a second. This doesn't happen while Kubernetes is turned on.
  • You can bring your images, volumes and networks over from another Docker app. Choose Import from Another Runtime… in the More (…) menu on the Containers page, or run oxcart import. Containers themselves aren't copied: start them again with docker compose up -d or docker run, and they use the imported volumes and networks.
  • Bug fixes and optimizations.
  • Updated Linux and system components, with the latest security fixes. A Windows virtual machine that is suspended when you update starts fresh afterwards.

需要 macOS 26.0 或更高版本

Oxcart 26.11.5

You can now turn on GPU acceleration for a Windows 11 virtual machine you already have.

  • Open the virtual machine's settings and turn on GPU acceleration under Display. Oxcart restarts Windows once, and the Windows desktop and Direct3D 10 and 11 apps then render on your Mac's GPU.
  • Turning GPU acceleration off puts back the standard display driver, and suspending works again.

需要 macOS 26.0 或更高版本

Oxcart 26.11.4

Bug fixes and optimizations.

  • Virtual machines start again after updating Oxcart while it is open.

需要 macOS 26.0 或更高版本

Oxcart 26.11.3

Windows virtual machines can now use your Mac's GPU.

  • Turn on GPU acceleration when you create a Windows 11 virtual machine, on the first step of New Virtual Machine. The Windows desktop and Direct3D 10 and 11 apps then render on your Mac's GPU instead of its processor.
  • A virtual machine with GPU acceleration can't be suspended or snapshotted while it runs. Shut it down instead. Existing virtual machines are not changed.
  • GPU acceleration is new. After a lot of opening and closing windows, the Windows screen can go black for about a second while Oxcart frees graphics memory.
  • Updated Linux and system components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.11.2

Oxcart can now run Kubernetes for you.

  • Turn on Kubernetes in Settings › Resources to get a local single-node cluster that kubectl can use right away.
  • Services in the cluster are reachable from your Mac at 127.0.0.1, and images you build with Docker run in the cluster without pushing them to a registry.
  • Updated Linux and system components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.11.1

Bug fixes and optimizations.

  • A simpler toolbar in the VM window.
  • Updated Linux and system components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.11.0

Clearer Windows audio, a network that comes back, and a VM toolbar that stays out of your way.

  • Clear Windows audio. Choppy, garbled sound in Windows VMs is fixed.
  • Networking that recovers. Turn a Windows VM's network off and on again, and it reconnects without a restart.
  • A toolbar that stays out of the way. It no longer covers the top of your VM. Move the pointer to the top center and click the small tab when you want it.
  • Simpler Oxcart Tools for Windows. One CD now holds everything, and the installer handles the drivers and any restart for you.
  • A more dependable clipboard in Windows VMs.
  • A license agreement to accept the first time you open Oxcart on your Mac.
  • Updated Linux, container and Docker components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.10.0

Virtual machines are here. Windows 11, Linux and macOS run on your Mac, built into Oxcart beside your containers and covered by the license you already have.

  • Windows 11 in about 5 minutes, hands off. Choose your Windows 11 ARM installer and walk away: Oxcart installs Windows, its drivers and Oxcart Tools by itself, on a VM with real TPM 2.0 and Secure Boot. You bring the installer and the license.
  • Linux in under a minute. Ubuntu, Debian and Fedora start with your Mac username, your SSH key and passwordless sudo already set up; Fedora is ready in about 30 seconds. Every further VM from the same image starts from an instant copy that takes only the space it changes. Ubuntu Desktop, Fedora Workstation and any arm64 Linux installer work too.
  • macOS on macOS. Oxcart restores the newest macOS your Mac supports and, with Automatic setup, creates your account and installs Oxcart Tools.
  • Every VM is a real Mac app. Each one has its own window, Dock icon and ⌘-Tab entry, and keeps running after you quit Oxcart. The Retina display follows the window as you resize it or go full screen, ⌘C and ⌘V work in Linux and Windows, and text, images and files move between your Mac and the guest by copy, paste and drag.
  • Snapshots that capture the moment. Snapshot a running VM with its open apps and return to that exact moment later. Snapshots and clones take almost no space until the guest changes, and a restore lands whole even if your Mac loses power halfway.
  • Your Mac's folders, network and USB. Share Mac folders with any guest, reach your Mac by name and publish ports from the VM. Hand a USB device to Windows for flashers, programmers and dongles; development boards' serial ports show up in Windows under their own IDs.
  • First-class for coding agents. VMs join containers in Oxcart's MCP server with 22 tools of their own, so an agent you connect can create, start, snapshot and clone VMs, run commands and copy files in the guest, forward ports, connect USB devices and disk images, and read the screen and type in any guest, even one without Oxcart Tools, all within the permission level you set for each agent. The oxcart vm command covers every operation, with JSON output for scripts and CI.
  • Encrypted VMs, when you want them. Keep a VM's disks and secrets behind a password of your own, with AES-256 encryption built into Oxcart, so an encrypted disk flushes as fast as a plain one.
  • Disk space you can see. Choose where a VM lives, on your Mac or an external drive, and see what it takes now and what it can grow to against the space you have. Reclaim Space hands back what a guest frees right away, and Disk Usage shows each downloaded system so you can remove the ones you no longer need.
  • VMs that move with you. Each VM is a single item in Finder you can keep on any drive. Export it as one .oxvm file to another Mac, and bring over Linux and macOS VMs from another Mac virtualization app.
  • Ready when you are. Chosen VMs start when you log in, run headless with no window at all, and suspend when you close them, so you pick up exactly where you left off.
  • Oxcart Help. Help › Oxcart Help (⌘?) explains every setting, what it does and what changing it affects, with a ? beside each one. Coding agents read the same help through MCP.
  • More reliable published ports. A container connection that a service closes mid-transfer now ends cleanly instead of waiting.
  • New version numbers. Releases are now numbered by year and month, so this one is 26.10.0.

需要 macOS 26.0 或更高版本

Oxcart 0.1.8

Oxcart 现已支持 Windows,购买后可终身享有所有更新。

  • Oxcart 也能在 Windows 上运行。一份许可证最多可用于 5 台设备,Mac 与 Windows 可任意组合。
  • 终身包含每次更新。
  • 截至 2026 年 12 月 31 日,Oxcart 售价为 $5。
  • 编程智能体可以检查容器、读取实时统计数据和资源压力、跟踪日志、追踪耗时较长的镜像拉取和构建,并按你设置的限制运行容器。
  • 重新创建容器时会保留其卷和网络别名。
  • Oxcart 的辅助程序在“登录项”中显示为 Oxcart。
  • 全面提升可靠性。

需要 macOS 26.0 或更高版本

Oxcart 0.1.7

更快的共享文件夹、更快的网络,以及可编辑的容器环境。

  • 共享文件夹大幅提速。在共享文件夹中克隆仓库、安装软件包和构建,速度最高可达原来的 3×。
  • 网络更快。发布端口和容器连接可传输近两倍的数据,同时减少 CPU 占用。
  • 按需启用加密。Mac 与容器之间的流量加密是可选的:可在 Settings › Resources › Encrypt container connections 中开启。
  • 环境变量更易查看和修改。在容器的 Overview 中查看变量,通过 Edit and Recreate 修改变量,还能一次粘贴整个 .env 文件。
  • Run Container 面板操作更顺畅。按 Return 会移至下一行,不会启动容器。
  • 故障排查更清晰。当 VPN 或防火墙拖慢连接时,Oxcart 会告知你。
  • 共享文件夹更可靠,能正确报告权限错误,并在 Mac 上的文件发生变更后及时更新内容。

需要 macOS 26.0 或更高版本

Oxcart 0.1.6

编程智能体可以修复所发现的问题,另有全面的问题修复与安全加固。

  • 新添加的智能体可以使用 Mac 上已有的镜像来启动、停止和重启容器,在容器内运行命令,以及启动 Compose 项目。拉取、构建和删除需要 Full 权限,可在 MCP Integrations 中为每个智能体分别设置。
  • 设置时会为每个智能体提供可直接使用的配置条目,运行 oxcart mcp check 可确认其是否正常工作。
  • 回答更准确:智能体能识别服务是否因其依赖的服务停机而停机、网页是否确实能加载,以及故障的原因和修复方法。
  • Start at login 会在登录时将 Oxcart 启动到菜单栏,随时可用。
  • Oxcart 启动时会检查更新,并向 oxcart.cc 发送一条简短的联络请求。Settings › Privacy 中会完整显示其中包含的内容。
  • 容器从启动之初就能发现所在网络中的其他服务。
  • 修复了特权容器、Rosetta 检查和设置过程中的安全防护问题。
  • Oxcart 应用会在执行任何删除数据或停止正在运行的任务的操作前征求确认。
  • 全面加强安全防护并提升可靠性。

需要 macOS 26.0 或更高版本

Oxcart 0.1.5

Oxcart 支持运行本地 Kubernetes 和特权容器,并提供十种语言。

  • 在 Settings › Resources › Kubernetes and networking 中开启特权容器,即可运行 kind、k3d、minikube(Docker 驱动)和 Docker-in-Docker,并使用 docker run --privileged 和 --device。此功能默认关闭。Oxcart 的防护机制会阻止每个容器访问 Oxcart 的磁盘、内核、其他容器的数据,以及 Oxcart 与 Mac 之间的通信通道。
  • 支持 IPv6 容器网络,此功能也默认关闭,适用于使用 IPv6 创建的网络,例如 kind 的双栈网络。
  • Oxcart 已翻译为简体中文、日语、德语、法语、西班牙语、巴西葡萄牙语、韩语、俄语和土耳其语。Settings › General › Language 中的语言设置仅对 Oxcart 生效。

需要 macOS 26.0 或更高版本

Oxcart 0.1.4

许可证功能与细节改进。

  • 通过安全邮件链接激活许可证。
  • 在 Settings 中管理许可证和 Mac。
  • 离线验证许可证。
  • 性能提升、界面优化与问题修复。

需要 macOS 26.0 或更高版本

Oxcart 0.1.3

空闲时回收内存。

  • 没有容器运行时回收 VM 内存。
  • 保留容器、镜像、卷和网络。

需要 macOS 26.0 或更高版本

Oxcart 0.1.2

命令行工具集成。

  • 在 Oxcart 自带的 Docker 工具与已安装的 Docker 工具之间切换。
  • 界面优化。

需要 macOS 26.0 或更高版本

Oxcart 0.1.1

内置 Docker 工具与智能体控制。

  • 自带 Docker CLI 29.9、Compose 5.6 和 Buildx 0.38。
  • Docker 上下文集成与安全的钥匙串凭据存储。
  • MCP 智能体连接,支持为各智能体设置权限或阻止访问。

需要 macOS 26.0 或更高版本

Oxcart 0.1.0

适用于 Apple 芯片的 Docker 兼容容器。

  • 兼容 Docker CLI、Compose 和 Buildx。
  • 自带运行时组件,可离线设置。
  • 按项目和 Git 分支整理端口。
  • MCP 集成,默认仅允许只读访问。
  • 经过验证的自动更新。

需要 macOS 26.0 或更高版本