# Docker MCP Server

Hands your agent the Docker API: containers, images, networks, volumes, Swarm. Useful when you need to triage a crash or check disk usage from the chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 9
- Author: L337-org
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/L337-org/docker-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/docker-mcp-server

## What it does

Every Docker operation shows up as its own typed tool. Each one is tagged as read-only or not, and anything destructive sits in a separate group, so a client can wave reads through and still stop to confirm a delete. Flip the whole server into read-only or no-destructive mode and tools that write never get registered at all.

Responses are capped instead of growing without limit: an oversized result comes back cut off with a `truncated` flag rather than quietly eating the agent's context. Logs and stats are exposed as resources, which is what lets you ask why a container died or how much space your volumes take. No configuration is needed for the basic case — the server finds the local Docker socket on its own. Several daemons, local plus a remote one over TCP, TLS or SSH, can live in one session, and you can mark some of them read-only.

Runs natively, as an `.mcpb` bundle, as a Claude plugin, or in a container, and sends no telemetry. You need a Docker daemon the host can reach, Python 3.14 or newer, and `uv`. On Intel Macs a native install through `uvx`, `pip`, the Claude plugin or the `.mcpb` bundle also wants Rust and OpenSSL 3.x, because `cryptography` has to be built from source there. The container image sidesteps that entirely — it ships a prebuilt Linux binary.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Works with: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add docker-mcp-server -- uvx docker-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>

### Codex

**Platform CLI**
```bash
codex mcp add docker-mcp-server -- uvx docker-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "docker-mcp-server": {
            "command": "uvx",
            "args": [
                "docker-mcp-server"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "docker-mcp-server": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "docker-mcp-server"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add docker-mcp-server uvx docker-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from docker-mcp-server <command>

## When to use it
- find out why a container exited with an error
- check the state of Swarm services
- see how much disk the volumes are using
- compare test and production environments
- drive a remote daemon over SSH without shell access

## Example prompts
- Why did the `api` container crash? Show me the recent logs and stats.
- How much space do my volumes take, and which ones can I drop?
- Compare the image list on my local daemon with the remote one over SSH.

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
