Docker MCP Server

Manage containers, images, and volumes from Claude Desktop using the Docker socket

Community backend devops community

The Docker MCP server connects Claude to your local Docker daemon via the Docker socket. It lets AI agents list running containers, start and stop them, exec commands inside containers, pull images, and inspect logs — without ever leaving your chat interface.

This is useful for debugging containerised applications: tell Claude "check why the postgres container keeps restarting" and it will fetch the logs, inspect the config, and suggest a fix.

Prerequisites

Installation & Configuration

Add this block to your claude_desktop_config.json:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-docker"]
    }
  }
}

Config file location:

Available Tools (6)

Use Cases

Tips & Gotchas

Gotcha: On Linux, Claude Desktop runs as your user. If that user isn't in the docker group, the server will fail to connect to the socket with a permissions error. Run sudo usermod -aG docker $USER and log out/back in.
Gotcha: exec_in_container runs commands as the container's default user (often root). Be intentional about which containers you grant Claude access to.
Tip: Combine with the Filesystem MCP server to let Claude inspect a service's config files and its Docker logs in one conversation.

Source & Documentation

GitHub Repository: https://github.com/modelcontextprotocol/servers/tree/main/src/docker

Protocol: Model Context Protocol (MCP) — modelcontextprotocol.io

MCP Setup Pack — $15
20 ready-to-paste server configs + installer + doctor script
Get the Pack →
← Back to MCP Server Directory