Docker MCP Server
## what it does
tl;dr: there is no Anthropic Docker MCP. @modelcontextprotocol/server-docker was never published — the old catalog page referenced a package that doesn’t exist. The community server most people install is ckreiling/mcp-server-docker (743 stars, Python, GPL-3.0). It uses the Docker Python SDK to talk to your local daemon via /var/run/docker.sock.
Install
PyPI (recommended)
uvx mcp-server-docker
(uvx is the runner from Astral’s uv. pipx run mcp-server-docker works too.)
Docker (server-in-a-container)
docker build -t mcp-server-docker https://github.com/ckreiling/mcp-server-docker.git
{
"mcpServers": {
"mcp-server-docker": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/var/run/docker.sock:/var/run/docker.sock",
"mcp-server-docker:latest"
]
}
}
}
The Docker socket is mounted so the MCP server can drive the host daemon. That’s the same socket your docker CLI uses.
Claude Desktop config (uvx)
{
"mcpServers": {
"docker": {
"command": "uvx",
"args": ["mcp-server-docker"]
}
}
}
Tools (17)
Containers: list_containers, create_container, run_container, recreate_container, start_container, fetch_container_logs, stop_container, remove_container
Images: list_images, pull_image, push_image, build_image, remove_image
Networks: list_networks, create_network, remove_network
Volumes: list_volumes, create_volume, remove_volume
Resources: docker://containers/{container_id}/logs, docker://containers/{container_id}/stats.
Connect to a remote Docker daemon
The server reads DOCKER_HOST like the Docker CLI does. For SSH access to a remote host:
{
"mcpServers": {
"docker": {
"command": "uvx",
"args": ["mcp-server-docker"],
"env": { "DOCKER_HOST": "ssh://user@host.example.com" }
}
}
}
Gotchas
- GPL-3.0. The license is a copyleft. Fine for internal tools, but it leaks into anything you distribute that links against it. If you ship a product that embeds the MCP, talk to counsel.
- The server intentionally does not expose
--privilegedor--cap-add/--cap-drop. If you need either, fork it. - Mounting
/var/run/docker.sockis full-host access. Any prompt that gets the model to “try a privileged container” or “run with the host network” is root on your machine. Treat this MCP likesudo.
Alternatives
friendlygeorge/docker-mcp-server— MIT, 12 tools, agent-first (health checks, auto-restart, Compose lifecycle, log streaming)L337-org/docker-mcp— multi-host (local socket or remote TCP/TLS/SSH), 156 tools, supports Swarm / Buildx / Scoutdocker/hub-mcp— official Docker Hub registry API; not a daemon driver
Related
- AWS MCP — for ECS/EKS instead
- MCP Servers Explained
## compatibility
## exposed tools
## embed this badge
