# Docker — MCP Server

> List containers, inspect images and manage your Docker environment with AI.

**Source:** https://mcpplaygroundonline.com/mcp-servers/docker  
**Transport:** stdio  
**Requires auth:** No

---

## What it does

Docker's MCP integration exposes the Docker Engine API as MCP tools. Models can list all containers (running or stopped), inspect container configuration and resource usage, read stdout/stderr logs, run one-off commands inside a container, pull images, inspect image layers and manage Docker Compose stacks. It connects through the Docker socket on your machine, so Docker Desktop (or Docker Engine on Linux) must be running. The server is part of Docker's official MCP Catalog and is open source. It requires no API key — just a running Docker installation.

## Tools exposed

- list_containers — list running and stopped containers with status
- inspect_container — get detailed config, mounts, ports and resource limits
- get_logs — stream stdout/stderr logs from a container
- exec_command — run a command inside a running container
- list_images / pull_image — manage local Docker images
- docker_compose — start, stop and inspect Docker Compose services

## Example queries you can run

- "List all running containers and how long they have been up."
- "Show me the last 50 lines of logs from the "api" container."
- "Which containers are using more than 500MB of memory right now?"
- "Run "npm test" inside the "app" container and show me the output."

## Details

- **Recommended model:** anthropic/claude-sonnet-4.5 — Claude Sonnet 4.5 handles multi-step DevOps reasoning and log analysis well. Use Haiku for simple container listing; Opus for complex Compose debugging.
- **Transport:** stdio
- **Authentication:** Not required — No API key required. Docker Desktop or Docker Engine must be running. The server connects via the Docker socket (/var/run/docker.sock).
- **Official source:** [docker/mcp-servers on GitHub](https://github.com/docker/mcp-servers)

## Frequently asked questions

### What is the Docker MCP server?

It is an official open-source MCP server from Docker that lets AI models interact with your local Docker environment. Agents can list containers, read logs, run commands inside containers and manage images — all from a natural language chat.

### Do I need Docker Desktop or just Docker CLI?

Either works. The server connects to the Docker socket, which Docker Desktop, Docker Engine (Linux) and Docker CLI all expose. On macOS, Docker Desktop is the easiest path.

### Is the Docker MCP server free?

Yes. The server itself is free and open source. Docker Desktop is free for personal use and small businesses. AI model usage is billed by your model provider.

### Can the AI agent start or stop my containers?

Yes — start, stop, restart and remove tools are available. Always confirm before the agent takes a destructive action. For read-only monitoring workflows, you can restrict access at the Docker socket level.

### How is Docker MCP different from running docker CLI commands?

The CLI requires you to know the exact commands. Docker MCP lets you describe what you want in plain English and the AI agent figures out the right Docker API calls, chains multiple operations, and explains the results in a readable format.

---

_Test this server across 40+ models on MCP Playground: https://mcpplaygroundonline.com/mcp-servers/docker — free, no install._
