docker-mcp
Provides tools for inspecting, orchestrating, and troubleshooting Docker Engine and Docker Compose environments, including container lifecycle management, compose stacks, images, volumes, networks, and system-level operations.
Click on "Deploy 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-mcpshow me all running containers and their resource usage"
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.
Docker MCP Server (docker-mcp)
Model Context Protocol (MCP) server providing high-leverage tools for inspecting, orchestrating, and troubleshooting Docker Engine and Docker Compose environments.
Built on @thargy/mcp-server-core following John Ousterhout’s Deep Module philosophy (A Philosophy of Software Design).
1. Architectural Vision: Deep Module vs. Tool Bloat
Traditional MCP servers map 1:1 to Docker CLI verbs, resulting in 25+ shallow tools that bloat LLM context windows (consuming 4,000+ prompt tokens per turn) and increase hallucinations.
docker-mcp exposes exactly 6 consolidated, high-leverage tools with polymorphic typed action discriminators, consuming <1,000 tokens:
graph LR
subgraph Clients ["MCP Clients"]
Claude["Claude Desktop (Stdio)"]
Agent["Antigravity / Coding Agents"]
Gateway["mcp-gateway (SSE / Streamable HTTP)"]
end
subgraph DeepModule ["docker-mcp (Deep Module)"]
T1["docker_containers"]
T2["docker_compose"]
T3["docker_images"]
T4["docker_volumes"]
T5["docker_networks"]
T6["docker_system"]
Seam["IDockerClient Seam"]
Engine["DockerodeClient / InMemoryDockerClient"]
end
subgraph Host ["Docker Infrastructure"]
Socket["/var/run/docker.sock"]
RemoteTCP["tcp://remote-host:2376"]
RemoteSSH["ssh://user@remote-host"]
end
Clients --> DeepModule
DeepModule --> Seam
Seam --> Engine
Engine --> HostRelated MCP server: Docker MCP Server
2. Consolidated MCP Tool Catalog
Tool | Actions | Capabilities & Highlights |
|
| Name/status regex filtering, real-time CPU/RAM calculation, multiplexed stdout/stderr log extraction, command execution, safe timeouts. |
|
| Multi-container stack discovery via labels/directories, lifecycle orchestration, healthcheck readiness verification. |
|
| Image inventory, virtual size formatting, tag resolution, dangling image cleanup. |
|
| Persistent volume catalog, driver inspection, orphan volume pruning. |
|
| Bridge, overlay, and macvlan network topology inspection and subnet resolution. |
|
| Daemon healthcheck, engine version, disk usage breakdown, system-wide reclamation. |
3. Quickstart & Configuration
Environment Variables
Variable | Default | Description |
|
| HTTP / SSE listen port |
|
| Bind address |
| optional | Secret token for Bearer authentication over HTTP / SSE |
|
| Path to local Unix Docker socket |
| optional | Remote Docker TCP URL (e.g. |
| optional | Enable TLS certificate verification ( |
| optional | Path to client TLS certificates ( |
Running with Stdio (Claude Desktop / Local CLI)
{
"mcpServers": {
"docker": {
"command": "node",
"args": ["/Users/craigdean/Repos/docker-mcp/dist/src/index.js"],
"env": {
"DOCKER_SOCKET": "/var/run/docker.sock"
}
}
}
}Running with Docker Compose & mcp-gateway
docker compose up -d --buildAccess HTTP SSE at http://localhost:3008/docker/mcp or http://localhost:3008/docker/sse.
4. Testing & Code Quality
100% of unit tests execute against InMemoryDockerClient without requiring access to a live Docker socket.
# Run unit tests
npm test
# Run test coverage (>85% required)
npm run test:coverage
# TypeScript compile check
npm run types:checkLicense
MIT © 2026 Craig Dean
This server cannot be deployed
Maintenance
Related MCP Connectors
327 dev tools via REST API and MCP. Generate Dockerfiles, schemas, K8s, APIs, and more.
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables remote Docker management over SSH via a local MCP server, providing tools to manage containers, images, Compose, and system resources.1GPL 3.0
- AlicenseNot gradedqualityCmaintenanceA comprehensive MCP server that provides advanced Docker operations through a unified interface with 16 MCP tools and 25+ CLI aliases, enabling secure container lifecycle management, multi-container orchestration, registry publishing, and system maintenance.57 npm15ISC
- AlicenseBqualityDmaintenanceProvides MCP tools for setting up and managing Hephaestus development environment with Docker containers, including starting/stopping services, initializing databases, and troubleshooting.7MIT
- AlicenseAqualityCmaintenanceWraps the Docker Engine API as MCP tools for container and image management. Reduces token consumption by providing typed tools with default summaries and field selection.17634 npmMIT