MCP Directory

Docker MCP Server

Community server to manage Docker containers, images, volumes, and Compose stacks via agents.

Verified
stdio (local)
No auth
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
uvx mcp-server-docker

Paste 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_containers

List Docker containers, including stopped ones.

create_container

Create a container from an image without starting it.

run_container

Create and start a container in one step.

recreate_container

Stop, remove, and re-create a container (used by the compose flow).

start_container

Start an existing stopped container.

stop_container

Stop a running container.

remove_container

Remove a container.

fetch_container_logs

Retrieve logs from a container.

list_images

List local Docker images.

pull_image

Pull an image from a registry.

push_image

Push an image to a registry.

build_image

Build an image from a Dockerfile/context.

remove_image

Remove a local image.

list_networks

List Docker networks.

create_network

Create a Docker network.

remove_network

Remove a Docker network.

list_volumes

List Docker volumes.

create_volume

Create a Docker volume.

remove_volume

Remove 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

  1. 1Ensure Docker is installed and the daemon is running (or you have SSH access to a remote daemon).
  2. 2Add the server to your client config: command `uvx` with args `mcp-server-docker`.
  3. 3Alternatively run it as a container and mount the Docker socket (`/var/run/docker.sock`) so it can reach the daemon.
  4. 4For a remote host, configure the SSH connection / DOCKER_HOST so the server targets the right daemon.
  5. 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.

Featured
Verified
stdio (local)
API key
Go
7 tools
Updated 3 days agoRepo

Official AWS Labs server that lets agents call any AWS API via the AWS CLI surface.

Verified
stdio (local)
API key
Python
3 tools
Updated 5 days agoRepo

Grafana's official server for dashboards, Prometheus/Loki queries, alerts, and incidents.

Verified
stdio (local)
API key
Go
18 tools
Updated 6 days agoRepo