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 "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-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 --> Host2. 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
Official Sevalla MCP — full PaaS API access through just 2 tools.
34 production API tools over one hosted MCP endpoint.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/thargy/docker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server