- Published on
Docker MCP Server
- Authors

- Name
- Ali Sait Teke
- @alisaitteke
Docker MCP Server

An MCP (Model Context Protocol) server that gives AI assistants like Cursor and Claude Desktop direct control over Docker. List and manage containers, images, networks, volumes, run Compose stacks, and work with Docker Hub or GHCR—all through natural language, with no extra config beyond adding the server to your MCP settings.
What is it?
Instead of switching to the terminal for every docker ps or docker compose up, you ask your AI: “List my running containers,” “Pull the latest nginx image,” or “Start the compose project in ./api.” The server talks to your local Docker daemon (or a remote one via DOCKER_HOST) and runs the right operations, with optional two-step confirmation for destructive actions.
Key Features
- Containers: Create, start, stop, restart, remove; view logs and stats; exec into running containers.
- Images: Pull, push, tag, remove; build from Dockerfile; inspect layers and history.
- Networks & volumes: Create, remove, inspect; connect containers to networks.
- Docker Compose: Up, down, ps, logs, build, restart; validate and parse
docker-compose.yml. - Registries: Docker Hub (search, tags, auth, pull/push) and GitHub Container Registry.
- Safety: Two-step confirmation for remove/kill/prune; preview before destructive ops.
- Cross-platform: Works on Linux, macOS, and Windows with automatic socket/path detection.
Quick Start
1. Add to Cursor MCP config (e.g. .cursor/mcp.json):
{
"mcpServers": {
"docker": {
"command": "npx",
"args": ["@alisaitteke/docker-mcp"]
}
}
}
2. Restart Cursor and use your AI to run Docker commands.
Remote Docker (optional): set DOCKER_HOST, DOCKER_CERT_PATH, and DOCKER_TLS_VERIFY in the MCP server env.
Technologies
- TypeScript
- MCP (Model Context Protocol) SDK
- Dockerode (Docker API)
- js-yaml (Compose parsing)
- Zod (validation)
Installation
# Run with npx (recommended)
npx @alisaitteke/docker-mcp
# Or install globally
npm install -g @alisaitteke/docker-mcp
Links
Requires Node.js ≥18 and a running Docker daemon. The server uses your existing Docker socket or connection settings, so no extra services or accounts are needed.