Docker MCP Server

Powerful Docker management for AI assistants

README.md

Docker MCP Server

Powerful Docker management for AI assistants

A comprehensive Model Context Protocol (MCP) server that empowers AI assistants like Cursor, Claude Desktop, and other MCP-compatible clients to seamlessly manage Docker containers, images, networks, volumes, and registries through natural language interactions.

Why Docker MCP Server?

  • Zero Configuration - Works out of the box with npx, no installation needed
  • Safety First - Two-step confirmation for destructive operations
  • Cross-Platform - Works on Windows, Linux, and macOS with automatic Docker socket detection
  • Comprehensive - Full Docker API coverage including Compose, registries, and system operations
  • AI-Native - Designed specifically for AI assistants with clear, structured responses

Features

Container Management

  • Full lifecycle control: Create, start, stop, restart, kill, and remove containers
  • Monitoring: Real-time logs, statistics, and container inspection
  • Advanced operations: Pause/unpause, exec commands, and resource management

Image Management

  • Registry operations: Pull, push, tag, and remove images
  • Build support: Build images from Dockerfiles with full configuration
  • Inspection: Detailed image history, layers, and metadata

Network Management

  • Network operations: Create, remove, and inspect Docker networks
  • Container connectivity: Connect/disconnect containers from networks
  • Network discovery: List and filter networks with advanced options

Volume Management

  • Volume operations: Create, remove, and inspect volumes
  • Data persistence: Manage persistent storage for containers
  • Volume inspection: Detailed volume information and mount points

System Operations

  • System information: Docker daemon info, version, and capabilities
  • Resource cleanup: Prune unused images, containers, volumes, and networks
  • Event monitoring: Real-time Docker event stream

Container Execution

  • Command execution: Run commands in running containers
  • Interactive sessions: Create and manage exec instances
  • Output streaming: Real-time command output and logs

Registry Integration

  • Docker Hub: Search repositories, list tags, authenticate, pull/push images
  • GitHub Container Registry (GHCR): Full authentication and image management
  • Multi-registry support: Seamlessly work with multiple registries

Docker Compose Support

  • Multi-container management: Start, stop, restart compose services
  • Service monitoring: View logs and status of compose services
  • Build operations: Build compose services with dependency management
  • Configuration validation: Parse and validate docker-compose.yml files

Safety Features

  • Two-step confirmation for all destructive operations
  • Resource preview: See what will be deleted before confirmation
  • Dual confirmation methods:
    • Confirm parameter (default): Works everywhere, simple and reliable
    • MCP Elicitation API (advanced): Interactive form-based confirmation for better UX

Installation

Via npx (Recommended)

npx @alisaitteke/docker-mcp

Local Installation

npm install -g @alisaitteke/docker-mcp

Or install locally in your project:

npm install @alisaitteke/docker-mcp

Quick Start

With Cursor

  1. Add to your Cursor MCP configuration (usually in .cursor/mcp.json or similar):
{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["@alisaitteke/docker-mcp"]
    }
  }
}
  1. Restart Cursor and start managing Docker with AI!

With Claude Desktop

  1. Add to your Claude Desktop configuration:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: `~/.config/Claude/claude_desktop_config.

Tools 4

container_managementFull lifecycle control including create, start, stop, restart, kill, and remove containers.
image_managementRegistry operations including pull, push, tag, remove, and build images from Dockerfiles.
compose_managementManage multi-container services using docker-compose files.
system_operationsMonitor Docker daemon, prune unused resources, and stream events.

Try it

List all currently running containers and their status.
Stop and remove all containers that are currently stopped.
Build the Dockerfile in the current directory and tag it as 'my-app:latest'.
Show me the logs for the 'web-server' service in my docker-compose file.
Prune all unused Docker volumes and networks to free up space.

Frequently Asked Questions

What are the key features of Docker MCP Server?

Full lifecycle control for containers including start, stop, and restart. Comprehensive image management with build, pull, and push capabilities. Native Docker Compose support for multi-container service orchestration. Real-time monitoring of logs, statistics, and Docker events. Safety-first design with two-step confirmation for destructive operations.

What can I use Docker MCP Server for?

Developers managing local development environments via natural language. Automating cleanup of unused Docker resources to maintain system performance. Quickly inspecting container logs and status during debugging sessions. Streamlining CI/CD tasks by triggering image builds and pushes through AI.

How do I install Docker MCP Server?

Install Docker MCP Server by running: npx @alisaitteke/docker-mcp

What MCP clients work with Docker MCP Server?

Docker MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Docker MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare