
Docker MCP Server
Community server to manage Docker containers, images, volumes, and Compose stacks via agents.
Add to your client
Copy the config for your MCP client and paste it into its config file.
uvx mcp-server-dockerPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"docker-mcp-server": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Before you start
- A running Docker daemon (local via the Docker socket, or a remote daemon reachable over SSH)
- Python with the `uv`/`uvx` package manager (or Docker, to run the server itself as a container)
- No API key required — it uses your local Docker engine permissions
- An MCP-capable client such as Claude Desktop
About Docker MCP Server
Docker MCP Server is a community server that gives an MCP client control over a Docker daemon. It exposes tools to manage the full lifecycle of containers, images, networks, and volumes, so an agent can run, inspect, stop, and remove containers using natural language.
Beyond one-off container commands, it ships a docker_compose prompt that drives a plan-then-apply workflow: you describe a stack in plain language, the agent proposes the containers/networks/volumes to create, and applies them idempotently. Container stats and logs are exposed as MCP resources so the agent can inspect running workloads.
The server is written in Python and runs over stdio (typically launched with uvx mcp-server-docker). It can talk to a local Docker daemon via the socket or a remote daemon over SSH. Note the project deliberately omits privileged options (--privileged, --cap-add/--cap-drop) and warns against putting sensitive data in container configs. It is licensed GPL-3.0.
Tools & capabilities (19)
list_containersList Docker containers, including stopped ones.
create_containerCreate a container from an image without starting it.
run_containerCreate and start a container in one step.
recreate_containerStop, remove, and re-create a container (used by the compose flow).
start_containerStart an existing stopped container.
stop_containerStop a running container.
remove_containerRemove a container.
fetch_container_logsRetrieve logs from a container.
list_imagesList local Docker images.
pull_imagePull an image from a registry.
push_imagePush an image to a registry.
build_imageBuild an image from a Dockerfile/context.
remove_imageRemove a local image.
list_networksList Docker networks.
create_networkCreate a Docker network.
remove_networkRemove a Docker network.
list_volumesList Docker volumes.
create_volumeCreate a Docker volume.
remove_volumeRemove a Docker volume.
When to use it
- Use it when you want to spin up a container (e.g. a Postgres or Redis instance) for local development by just describing it.
- Use it when you want to compose a multi-container stack from a natural-language description via the docker_compose prompt.
- Use it when you need to inspect running containers, pull their logs, or check stats while debugging.
- Use it when you want an agent to clean up unused containers, images, networks, or volumes.
- Use it when you want to manage a remote Docker host over SSH from your local agent.
Quick setup
- 1Ensure Docker is installed and the daemon is running (or you have SSH access to a remote daemon).
- 2Add the server to your client config: command `uvx` with args `mcp-server-docker`.
- 3Alternatively run it as a container and mount the Docker socket (`/var/run/docker.sock`) so it can reach the daemon.
- 4For a remote host, configure the SSH connection / DOCKER_HOST so the server targets the right daemon.
- 5Restart your MCP client, then verify by asking the agent to run list_containers.
Security notes
Full access to the Docker daemon is effectively root-equivalent on the host, so only connect it to a Docker context you trust the agent to control. When containerized it requires mounting the Docker socket, which grants broad host privileges.
Docker MCP Server FAQ
Does it need an API key?
No. It talks directly to your local Docker daemon and inherits your Docker permissions. There is no token to configure.
Can it manage a remote Docker host?
Yes. It supports connecting to a remote Docker daemon over SSH, so you can drive a remote host from a local agent.
Can it run privileged containers?
No. The server intentionally does not support privileged options like --privileged or --cap-add/--cap-drop, and it warns against storing sensitive data in container configurations.
How does the docker_compose feature work?
It's an MCP prompt that runs a plan-and-apply loop: you describe the stack in natural language, the agent proposes the containers/networks/volumes, and applies them idempotently, recreating containers as needed.
Alternatives to Docker MCP Server
GitHub's official server for repos, issues, PRs, and Actions — local Docker or hosted remote.
Official AWS Labs server that lets agents call any AWS API via the AWS CLI surface.
Grafana's official server for dashboards, Prometheus/Loki queries, alerts, and incidents.
Compare Docker MCP Server with: