Back to MCP Catalog

Docker Management MCP Server

Cloud PlatformsPython
Manage Docker containers with natural language
Available Tools

list_containers

Lists all Docker containers

create_container

Creates a new Docker container

run_container

Creates and starts a Docker container

recreate_container

Recreates an existing Docker container

start_container

Starts a stopped Docker container

fetch_container_logs

Retrieves logs from a Docker container

stop_container

Stops a running Docker container

remove_container

Removes a Docker container

list_images

Lists all Docker images

pull_image

Pulls a Docker image from a registry

push_image

Pushes a Docker image to a registry

build_image

Builds a Docker image from a Dockerfile

remove_image

Removes a Docker image

list_networks

Lists all Docker networks

create_network

Creates a Docker network

remove_network

Removes a Docker network

list_volumes

Lists all Docker volumes

create_volume

Creates a Docker volume

remove_volume

Removes a Docker volume

Docker Management is a powerful tool that allows you to control Docker containers, images, networks, and volumes using natural language commands. It enables server administrators, tinkerers, and AI enthusiasts to compose containers, introspect running containers, and manage persistent data with simple conversational instructions. With this MCP, you can deploy complex container setups like WordPress with MySQL backends, configure networking, and manage the entire Docker lifecycle without needing to remember specific Docker commands or syntax. The server implements a plan-and-apply workflow that lets you review changes before they're executed, ensuring safety and control.

Overview

Docker Management allows you to interact with Docker using natural language. You can create, manage, and monitor Docker containers, images, networks, and volumes through simple conversational commands.

Installation

There are two ways to install the Docker Management MCP:

Method 1: Install from PyPI with uv

  1. First, install uv if you don't have it already. Follow the installation instructions for your system at the uv documentation.

  2. Add the following to your MCP servers configuration file:

For Claude Desktop on MacOS (~/Library/Application\ Support/Claude/claude_desktop_config.json):

"mcpServers": {
  "mcp-server-docker": {
    "command": "uvx",
    "args": [
      "mcp-server-docker"
    ]
  }
}

For Claude Desktop on Windows (%APPDATA%/Claude/claude_desktop_config.json), use the same configuration.

Method 2: Install with Docker

  1. Clone the repository: git clone https://github.com/ckreiling/mcp-server-docker.git
  2. Build the Docker image: docker build -t mcp-server-docker .
  3. Add the following to your MCP servers configuration file:
"mcpServers": {
  "mcp-server-docker": {
    "command": "docker",
    "args": [
      "run",
      "-i",
      "--rm",
      "-v",
      "/var/run/docker.sock:/var/run/docker.sock",
      "mcp-server-docker:latest"
    ]
  }
}

Note: The Docker socket is mounted as a volume to allow the MCP server to connect to and control the local Docker daemon.

Usage

Docker Compose with Natural Language

The docker_compose prompt allows you to create and manage container setups using natural language. The workflow follows a plan-and-apply pattern:

  1. You describe the containers you want to deploy
  2. The system calculates a plan and presents it to you
  3. You either apply the plan or provide feedback for adjustments

Example prompts:

  • "Deploy an nginx container exposing it on port 9000"
  • "Deploy a WordPress container and a supporting MySQL container, exposing WordPress on port 9000"

When starting a new chat with this prompt, the system will receive the status of any containers, volumes, and networks created with the given project name, allowing you to manage or clean up existing deployments.

Resources

The server provides access to container resources:

  • Stats: CPU, memory, and other metrics for containers
  • Logs: Access container logs for debugging and monitoring

Security Considerations

Important security notes:

  • Do not configure containers with sensitive data like API keys or database passwords
  • Always review containers before creation, as Docker is not a secure sandbox
  • For security reasons, this MCP server doesn't support sensitive Docker options like --privileged or --cap-add/--cap-drop

Related MCPs

AWS CLI
Cloud PlatformsPython

Execute AWS CLI commands securely through AI assistants

Kubernetes
Cloud PlatformsGo

Connect to and manage Kubernetes clusters through natural language

Cloudflare
Cloud PlatformsTypeScript

A Model Context Protocol server for Cloudflare services

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.