docker-mcp-server
This server provides comprehensive Docker management capabilities for AI agents, enabling full control over containers, images, Compose stacks, health checks, and fleet monitoring — running directly on the Docker socket without external dependencies or API keys.
Container Lifecycle Management
List containers with filters (state, label, name), inspect detailed config/state
Start, stop, restart, remove, recreate, and run new containers with full options (env, ports, volumes, restart policy, command override)
Set restart policy on a running container without recreating it
Image Management
List, pull, build (from Dockerfile), and remove Docker images
Docker Compose Orchestration
Bring up/down stacks (
compose_up/compose_down) with optional build and volume removalList service states (
compose_ps), tail logs (compose_logs), and restart services
Health Checks & Self-Healing
Run HTTP, TCP, or exec health probes (auto-detects from container HEALTHCHECK)
Poll until a container becomes healthy or times out (
watch_health)Dynamically set restart policies to keep containers running
Logs & Debugging
Stream logs with tail count, timestamp filtering, and follow mode
Search logs across multiple containers using regex pattern matching
Execute commands inside running containers with stdout/stderr/exit code output
Fleet Monitoring & Alerting
Health status, uptime, and restart counts for all running containers
Real-time CPU, memory, and network I/O usage across all containers, sortable by metric
Stream Docker events (start, stop, die, OOM, health_status) over a configurable time window
Alert when containers exceed CPU%, memory%, or restart count thresholds
Single-call monitor dashboard combining health, top resource consumers, recent events, and threshold violations
Infrastructure
List Docker networks and volumes with optional filters
Provides tools for managing Docker containers, images, Compose stacks, health checks, logs, and more, enabling agents to keep containers running and perform operations through the Docker API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@docker-mcp-serverlist running containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@supernova123/docker-mcp-server
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 server | ckreiling/mcp-server-docker | docker/hub-mcp | |
License | MIT | GPL-3.0 | Apache-2.0 |
Runs locally | ✅ No API keys, no paid plan | ✅ | ❌ Requires Docker Hub auth |
Last updated | Active | Jun 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 filter | Basic | Basic |
Fleet monitoring | ✅ 6 fleet tools (status, stats, events, logs, thresholds, dashboard) | ❌ | ❌ |
Agent positioning | ✅ Built for agents | Generic Docker | Registry API |
Related MCP server: Docker MCP Server
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, uptime
5. Watch: watch_events(window=60) → detect crashes, restarts, health changes
6. Debug: search_logs(pattern="ERROR", containers=["myapp"])
7. Rollback: recreate_container(name="myapp", image="myapp:v1") if v2 failsIf 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:
I Cut My Docker MCP Server From 50 to 12 Tools — why fewer tools = better agent UX
MCP Server Performance Optimization — benchmarking tool execution latency
Building an MCP Server From Scratch — the full development process
What 6,000 npm Downloads Taught Me — distribution and growth data
The MCP Server Naming Playbook — how naming affects discoverability
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
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/friendlygeorge/docker-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server