Docker MCP server
MCP server for managing Docker in natural language: containers, images, networks and volumes, including remote hosts over SSH
Install
"mcpServers": {
"mcp-server-docker": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}Install from PyPI via uv.
This is third-party code. Review the repository files before installing.
What it does
The server gives the agent tools for Docker containers, images, networks and volumes: create, run, stop, remove, build, pull and push. The docker_compose prompt runs a plan and apply loop: the agent describes which containers it will bring up and acts only after you approve. Container logs and stats are exposed as resources. With an ssh:// DOCKER_HOST the server connects to a remote daemon.
Who it is for. Server admins and developers who want to run and debug containers through an agent.
Good fit when
- You want a multi-container app brought up from a description
- You need logs and stats for a running container
- You want to manage Docker on a remote server without manual SSH
Not a fit when
- Containers need secrets: the authors explicitly advise against passing them to the model
- You need privileged containers or --cap-add: the server does not support them
Example request
Deploy WordPress with a MySQL container and expose WordPress on port 9000Limitations
Docker is not a secure sandbox, so containers created by the model can affect the host. --privileged, --cap-add and --cap-drop are not supported. Resources are templates and do not enumerate running containers.
How to disable. Remove the mcp-server-docker block from your MCP client config.
MCP
- Transport
- stdio
- Authentication
- not required
| Environment variables | |
|---|---|
| DOCKER_HOST | Docker daemon address, for example ssh://user@host |
Security check
- Full Docker daemon access, which effectively means host control
- Can remove containers, images and volumes
- Can connect to remote hosts over SSH
README in short
Docker MCP server manages Docker in natural language: composing containers, debugging running ones and managing volumes. Installation is described for Claude Desktop via uvx from PyPI or a self-built Docker image with the socket mounted. The README lists tools, resources and the docker_compose prompt. Separate warnings cover secrets and the fact that Docker is not a sandbox.
FAQ
How do I connect to Docker on another server?
Set DOCKER_HOST like ssh://user@host in the server env.
What if I lose the chat for a project?
Starting docker_compose again with the same project name gives the agent the status of created containers, volumes and networks, which helps with cleanup.
Related
Kubernetes MCP
MCP Server Kubernetes
MCP server for managing a Kubernetes cluster through kubectl and Helm, with a non-destructive mode
HashiCorp's official MCP server for the Terraform Registry and HCP Terraform: providers, modules, policies and workspaces
CLI for full-cycle CI/CD to Kubernetes: image builds, Helm-based deploys and container registry cleanup
Terraform Skill
Terraform & OpenTofu Skill for AI Agents
A Terraform and OpenTofu best-practices skill: tests, modules, state, CI/CD and security scanning for AWS, Azure and GCP