Docker

Manage Docker containers, images, and compose stacks.

Works with: Claude DesktopClaude CodeCursor
Quick install
npx -y docker-mcp

How to install the Docker MCP server

Add this to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": [
        "-y",
        "docker-mcp"
      ]
    }
  }
}

Add this to your Claude Code MCP configuration:

npx -y docker-mcp

Add this to your Cursor MCP configuration:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": [
        "-y",
        "docker-mcp"
      ]
    }
  }
}

The Docker MCP server gives Claude direct access to your Docker daemon. List running containers, inspect their configs, manage images, run compose stacks. For developers running anything containerised, this turns container ops into prompts.

The community server is the de-facto standard. It tracks the Docker Engine API closely, so anything you can do with the Docker CLI, you can do via the MCP server.

Why use it

Container debugging is full of small lookups: “what containers are running?” “What’s in the logs of the api container?” “Why is this image 2GB?” Each one is a CLI command and a tab switch. The MCP server collapses them into prompts.

For Claude Code workflows, this is what makes “deploy and verify” loops feel native. Build the image, push it, restart the container, check the logs, all without leaving the conversation.

What it actually does

Container ops: list, inspect, create, start, stop, restart, remove. Image ops: pull, list, tag, remove, inspect history. Compose: up, down, list services, view logs. Volumes and networks: create, list, inspect, remove. Logs: stream from any container with filters.

Practical patterns:

  • “What containers are running and what ports do they expose?”
  • “Pull the latest postgres:16 image and start a one-off container with these env vars.”
  • “Show me the last 100 lines of logs from the api container, filtered to level=error.”

Gotchas

This server is privileged by definition. Docker access on a typical machine is essentially root. Don’t run untrusted Claude prompts against it, and don’t expose the server to environments where prompts could be injected from external sources.

Container churn confuses the server. If Claude inspects a container that has just been removed, the next call may fail. Most prompts handle this gracefully but it’s worth knowing if you see weird transient errors.

Pair with Filesystem for Dockerfile and compose file edits, and GitHub for committing and pushing changes. Combined, you can iterate on a containerised service end-to-end from a single conversation.

For production cluster management rather than local development, look at the Kubernetes server or your cloud provider’s MCP (AWS, GCP, Azure).

Docker MCP server: FAQs

Is the Docker MCP server official?

No. Docker hasn't shipped a first-party server yet, but the community implementation at QuantGeekDev/docker-mcp is mature and widely used. It wraps the Docker Engine API directly.

Does it need root or admin access?

It needs whatever permissions your local Docker daemon does. On Linux, that usually means a user in the docker group. On macOS or Windows, Docker Desktop handles permissions for you.

Can it pull images and start containers?

Yes. Full Docker Engine API surface: list, inspect, create, start, stop, remove containers; pull and tag images; manage volumes and networks. Use with caution — Claude can absolutely break things if a prompt is misinterpreted.

Does it support docker-compose?

The community server has compose-aware commands. You can run `up`, `down`, and inspect compose project state. The interface is less polished than the raw Docker API, but it works.

Is there a remote-Docker mode?

Yes. Set the DOCKER_HOST environment variable and the server connects over TCP or SSH like the regular Docker CLI. Useful for managing fleet-of-VMs setups, but be careful — remote Docker access is privileged.