Docker MCP
by QuantGeekDev
Manage containers and images directly from your AI coding agent
devops Go Intermediate Self-hostable No API key Verified
π
Updated: 2w ago
Description
Docker MCP turns your AI assistant into a hands-on infrastructure operator. Instead of switching to a terminal to run docker commands, check container logs, or spin up a compose stack, you can ask your agent to handle it conversationally. The server connects to your local Docker daemon and exposes the most common operations as MCP tools, covering the full lifecycle from pulling images to running containers and tearing down stacks.
The real value shows up during development workflows where containers are a constant companion. Debugging a failing service? Ask your agent to pull the logs. Need to test against a fresh database? Have it spin up a Postgres container. Working through a multi-service architecture? Your agent can bring up an entire compose stack, check which containers are running, and exec into any of them to inspect state. All of this happens without leaving your editor or memorizing docker CLI flags.
Built in Go and distributed as a signed Docker image with a full SBOM, Docker MCP follows the security practices you would expect from an official Docker project. It runs as a local process communicating via stdio, so your Docker socket stays under your control. There is no remote API, no cloud dependency, and no data leaving your machine beyond what Docker itself needs.
β Best for
Developers who use Docker daily and want their AI agent to manage containers, images, and compose stacks without switching to a terminal
βοΈ Skip if
You do not use Docker in your workflow or only deploy to managed cloud services
π‘ Use cases
- Manage development containers without leaving your AI coding environment
- Debug failing services by pulling and analyzing container logs with AI
- Spin up temporary databases or services for testing during development
- Orchestrate multi-container stacks through compose up and down commands
π Pros
- β Official Docker project with signed images and full SBOM
- β No API key required, works entirely with your local Docker daemon
- β Covers containers, images, and compose in a single server
- β Distributed as a Docker image, so no runtime dependencies to install
π Cons
- β Requires Docker Desktop or Docker Engine to be installed and running
- β Intermediate difficulty: understanding Docker concepts is a prerequisite
- β No support for Docker Swarm or remote Docker hosts yet
π§ Exposed tools (10 tools)
| Tool | Category | Description |
|---|---|---|
| compose_up | compose | Start services defined in a docker-compose file |
| compose_down | compose | Stop and remove services from a docker-compose file |
| list_containers | containers | List all running and stopped containers |
| run_container | containers | Run a new container from an image |
| stop_container | containers | Stop a running container |
| container_logs | containers | Retrieve logs from a container |
| exec_in_container | containers | Execute a command inside a running container |
| build_image | images | Build a Docker image from a Dockerfile |
| list_images | images | List all locally available Docker images |
| pull_image | images | Pull an image from a container registry |
β‘ Installation
Prerequisites:
- β’ go
claude mcp add docker -- docker run -i --rm docker/mcp-serverπ‘ Tips & tricks
Run the server using its own Docker image to avoid installing any dependencies:
docker run -i --rm docker/mcp-server. Make sure your Docker daemon is running
before adding the server to your MCP client. For compose operations, your
docker-compose.yml needs to be in the working directory or you should specify
the full path. Grant your agent permission to stop containers carefully in
production-adjacent environments.
Quick info
- Author
- QuantGeekDev
- License
- Runtime
- Go
- Transport
- stdio
- Category
- devops
- Difficulty
- Intermediate
- Self-hostable
- β
- API key
- No API key needed
- Docker
- β
- Version
- 0.0.0
- Updated
- Feb 8, 2026
Client compatibility
- β Claude Code
- β Cursor
- β VS Code Copilot
- β Gemini CLI
- β Windsurf
- β Cline
- β JetBrains AI
- β Warp
Platforms
π macOS π§ Linux πͺ Windows