Docker MCP Server — Claude Code MCP server: manage Docker
Hands your agent the Docker API: containers, images, networks, volumes, Swarm. Useful when you need to triage a crash or check disk usage from the chat.
claude mcp add docker-mcp-server -- uvx docker-mcp-serverWhat Docker MCP Server does
Every Docker operation shows up as its own typed tool. Each one is tagged as read-only or not, and anything destructive sits in a separate group, so a client can wave reads through and still stop to confirm a delete. Flip the whole server into read-only or no-destructive mode and tools that write never get registered at all.
Responses are capped instead of growing without limit: an oversized result comes back cut off with a truncated flag rather than quietly eating the agent's context. Logs and stats are exposed as resources, which is what lets you ask why a container died or how much space your volumes take. No configuration is needed for the basic case — the server finds the local Docker socket on its own. Several daemons, local plus a remote one over TCP, TLS or SSH, can live in one session, and you can mark some of them read-only.
Runs natively, as an .mcpb bundle, as a Claude plugin, or in a container, and sends no telemetry. You need a Docker daemon the host can reach, Python 3.14 or newer, and uv. On Intel Macs a native install through uvx, pip, the Claude plugin or the .mcpb bundle also wants Rust and OpenSSL 3.x, because cryptography has to be built from source there. The container image sidesteps that entirely — it ships a prebuilt Linux binary.
What it helps with
- find out why a container exited with an error
- check the state of Swarm services
- see how much disk the volumes are using
- compare test and production environments
- drive a remote daemon over SSH without shell access
Example prompts for the agent
- Why did the
apicontainer crash? Show me the recent logs and stats. - How much space do my volumes take, and which ones can I drop?
- Compare the image list on my local daemon with the remote one over SSH.
How to install Docker MCP Server
Platform CLI
claude mcp add docker-mcp-server -- uvx docker-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>
Platform CLI
codex mcp add docker-mcp-server -- uvx docker-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>
Config file
{
"mcpServers": {
"docker-mcp-server": {
"command": "uvx",
"args": [
"docker-mcp-server"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>
Config file
{
"servers": {
"docker-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"docker-mcp-server"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>
Platform CLI
gemini mcp add docker-mcp-server uvx docker-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Docker MCP Server
How do I install Docker MCP Server in Claude Code?
Run claude mcp add docker-mcp-server -- uvx docker-mcp-server. uv fetches and caches the package on first use.
What does Docker MCP Server do?
It exposes Docker operations to your agent through the Docker SDK and CLI: containers, images, networks, volumes, Swarm services, secrets, configs, nodes. Logs and stats come through as resources for monitoring.
What does the server need to run?
A running Docker daemon reachable from the host, Python 3.14 or newer, and uv. On Intel Macs a native install also needs Rust and OpenSSL 3.x.