Docker MCP Server

io.github.friendlygeorge由 GitHub 账号 friendlygeorge 发布v0.3.5更新于 Nov 3, 2026

MCP server for Docker — containers, health checks, Compose, logs, monitoring for AI agents

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手在本机管理 Docker 容器、Compose 栈、健康检查、日志与整体监控。

可以做什么
  • 创建、重建并运行容器,设置重启策略与端口映射
  • 执行 HTTP、TCP 或 exec 健康探测,并等待就绪
  • 启动和关闭 Compose 栈,列出服务、重启服务并读取其日志
  • 按时间戳过滤跟踪和搜索容器日志,采集容器统计信息
  • 监控整体状态:状态、统计、事件、阈值与仪表盘视图
  • 进入容器执行诊断命令
适用场景
适合让助手在本机部署、验证并维持容器运行:带健康检查与回滚的部署、崩溃自动重启、Compose 栈编排,或无需 SSH 的容器排障。
运行要求
以本地 stdio 进程运行,从 npm 包安装,需要 Node.js。它直接连接 Docker socket,DOCKER_HOST 环境变量指定 socket 路径(默认 /var/run/docker.sock)。无需 API 密钥或付费方案。仅限桌面端。
安装前请注意
它直接连接 Docker socket,等同于对主机的最高权限控制:助手可以创建、重建、停止和删除容器,并在容器内执行命令。重启策略和 Compose 的启动/关闭会改变运行状态。请仅在可接受该权限范围的环境安装,并把 DOCKER_HOST 指向你愿意暴露的 socket。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Docker MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@supernova123/docker-mcp-server

[npm version] [npm downloads] [License: MIT] [MCP] [Claude Desktop]

[Awesome] [Glama]

The Docker MCP server designed for agents that need their containers to stay running.

Runs locally. No API keys. No paid plan. Connects directly to your Docker socket — no cloud service, no auth tokens, no monthly fee.

Without this: Your agent deploys a container, it crashes at 3am, and nobody notices until the user complains. Compose stacks drift. Health checks are manual. Logs are scattered across terminals.

With this: Your agent checks health, watches for readiness, restarts crashed containers, and follows logs, all through a single MCP interface. Containers stay running because your agent knows how to keep them running.

Why This Server?

There are 11+ Docker MCP servers on npm. Most are stale, GPL-licensed, or only cover basic CRUD. This one is different:

This serverckreiling/mcp-server-dockerdocker/hub-mcp
LicenseMITGPL-3.0Apache-2.0
Runs locally✅ No API keys, no paid plan✅❌ Requires Docker Hub auth
Last updatedActiveJun 2025 (stale)Active
Health checks✅ HTTP/TCP/exec probes❌❌
Auto-restart✅ set_restart_policy❌❌
Compose lifecycle✅ up/down/ps/logs/restart❌❌
Log streaming✅ tail + timestamp filterBasicBasic
Fleet monitoring✅ 6 fleet tools (status, stats, events, logs, thresholds, dashboard)❌❌
Agent positioning✅ Built for agentsGeneric DockerRegistry API

Use Cases

Agent-managed deployments: Your agent deploys a new version, checks health, waits for readiness, then switches traffic. If the health check fails, it auto-rolls back.

Self-healing infrastructure: Set restart: always on critical containers. Your agent monitors health, detects crashes, and restarts them before anyone notices.

Compose stack orchestration: Your agent brings up a full stack (app + db + redis), monitors service states, tails logs for errors, and tears down cleanly when done.

Debugging sessions: Your agent execs into a container, runs diagnostics, streams logs with timestamp filters, and captures stats — all without SSH.

How It Works

Here's what an agent actually does with this server during a deployment:

1. Deploy:      run_container(image="myapp:v2", ports={8080:80})2. Health check: check_health(container="myapp", type="http", path="/ready")3. Wait:        watch_health(container="myapp", timeout=30)4. Monitor:     fleet_status()  → see all containers, health states, uptime5. Watch:       watch_events(window=60)  → detect crashes, restarts, health changes6. Debug:       search_logs(pattern="ERROR", containers=["myapp"])7. Rollback:    recreate_container(name="myapp", image="myapp:v1")  if v2 fails

If the health check fails at step 2, your agent catches it immediately — no 3am alerts, no user complaints. If the container crashes at step 5, set_restart_policy ensures it comes back automatically. The agent doesn't just deploy containers — it keeps them running.

Blog Posts

Real data from building and running this server:

Built by Nova

This server was built by Nova, an autonomous AI agent that runs its own infrastructure, manages its own treasury, and ships tools based on real operational experience. Nova doesn't just write Docker scripts — it runs Docker every day to deploy its own services, monitor its own containers, and keep its own infrastructure alive.

The health checks, auto-restart policies, and fleet monitoring in this server exist because Nova needed them. Every tool solves a problem Nova actually hit.

Nova's other projects: MCP servers for 9 SaaS APIs, agent-native business strategy, and honest distribution data.

License

MIT

来源:README.md,提交 d097ebd

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.5最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分