developer-tools

Docker MCP Server

by Swartdraak

Docker MCP Server — AI-driven Docker container management and automation; manage containers, images, networks, and volum

An MCP server that enables AI assistants to manage Docker containers, images, networks, and volumes through a standardized interface. It supports comprehensive operations like container lifecycle management and image pulling while ensuring correct handling of command and environment variable arrays.

github stars

0

Full container lifecycle managementDirect Docker API integration

best for

  • / Developers automating Docker workflows
  • / DevOps teams managing containerized applications
  • / Learning Docker through conversational interface

capabilities

  • / Create and run Docker containers
  • / Pull images from registries
  • / Start and stop containers
  • / View container logs and details
  • / List and manage Docker images
  • / Remove containers and cleanup resources

what it does

Provides direct control over Docker operations through AI assistants, allowing you to manage containers, images, and other Docker resources without switching to command line.

about

Docker MCP Server is a community-built MCP server published by Swartdraak that provides AI assistants with tools and capabilities via the Model Context Protocol. Docker MCP Server — AI-driven Docker container management and automation; manage containers, images, networks, and volum It is categorized under developer tools. This server exposes 37 tools that AI clients can invoke during conversations and coding sessions.

how to install

You can install Docker MCP Server in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Docker MCP Server is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Docker MCP Server

npm version npm downloads CI CodeQL License: MIT Node.js Version TypeScript Docker Semantic Versioning

A comprehensive, production-ready, industry-standard compliant MCP (Model Context Protocol) Server that enables full Docker management capabilities for AI assistants like GitHub Copilot and Claude. Featuring 37 powerful tools covering containers, images, networks, volumes, and system operations.

📋 Table of Contents

About

Docker MCP Server is a Model Context Protocol server that bridges AI assistants with Docker, enabling natural language Docker operations. Built with TypeScript and following industry best practices, it provides a complete Docker management solution for AI-powered development workflows.

Why Docker MCP Server?

  • 🤖 AI-Native: Designed specifically for AI assistants (GitHub Copilot, Claude)
  • 🔧 Complete Coverage: 37 tools covering all essential Docker operations
  • 🌐 Remote Support: Connect to Docker on any host via TCP, HTTPS, or SSH tunnel
  • 🔒 Security First: Full TLS/SSL support with certificate authentication
  • 📦 Production Ready: Comprehensive error handling, type safety, and testing
  • 📚 Well Documented: Extensive documentation with examples for every feature
  • 🚀 Easy to Use: Simple installation and configuration

Use Cases

  • AI-Assisted DevOps: Let AI assistants manage your Docker infrastructure
  • Container Orchestration: Create, manage, and monitor containers through natural language
  • Development Automation: Automate Docker workflows with AI assistance
  • Remote Management: Securely manage Docker on remote hosts
  • Learning & Exploration: Explore Docker capabilities with AI guidance

Quick Start

For npm Users (Recommended)

# Install globally
npm install -g @swartdraak/docker-mcp-server

# Or use with npx (no installation needed)
npx @swartdraak/docker-mcp-server

For Developers

# Clone the repository
git clone https://github.com/Swartdraak/Docker-MCP.git
cd Docker-MCP

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

✨ Features

Core Capabilities

  • 37 Docker Tools: Complete coverage of Docker operations including connection validation
  • Remote Docker Support: Connect to Docker on remote hosts via TCP, HTTP, HTTPS, or SSH tunnel
  • Secure Connections: Full TLS/SSL support for secure remote Docker management
  • Container Management: Create, run, start, stop, restart, pause, unpause, rename, remove, exec, stats, logs
  • Image Operations: List, pull, build, push, tag, remove, prune
  • Network Management: List, create, remove, inspect, connect, disconnect
  • Volume Management: List, create, remove, inspect, prune
  • System Operations: Info, version, connection validation, prune (containers, images, volumes, networks)
  • Proper Array Handling: Correctly handles command, entrypoint, and environment variables
  • VS Code Integration: Works seamlessly with GitHub Copilot
  • Industry Standard: Uses MCP SDK and Docker best practices
  • TypeScript: Full type safety and modern JavaScript features

Recent Enhancements

  • 🌐 Remote Docker Host Support: Connect to Docker on any remote host
  • 🔒 TLS/HTTPS Support: Secure connections with certificate authentication
  • 🔑 Environment-based Configuration: Easy setup via DOCKER_HOST, DOCKER_TLS_VERIFY, DOCKER_CERT_PATH
  • 🚇 SSH Tunnel Support: Secure remote access without exposing Docker API

What's New in v2.0

  • 🚀 25 New Tools: Added extensive container, image, network, and volume management
  • 🔧 Container Exec: Execute commands in running containers
  • 📊 Container Stats: Real-time CPU, memory, network, and I/O metrics
  • 🏗️ Image Building: Build images from Dockerfile with build args
  • 🔄 Advanced Lifecycle: Restart, pause, unpause, rename containers
  • 🌐 Full Network CRUD: Create, inspect, connect, disconnect, remove networks
  • 💾 Full Volume CRUD: Create, inspect, remove volumes
  • 🧹 Resource Cleanup: Prune unused containers, images, volumes, networks
  • ⚙️ System Info: Get Docker daemon information and version

Installation

Via npm (Recommended)

npm install -g @swartdraak/docker-mcp-server

From Source

Prerequisites

  • Node.js 18 or higher
  • Docker installed and running
  • npm or yarn package manager

Setup

  1. Clone the repository:
git clone https://github.com/Swartdraak/Docker-MCP.git
cd Docker-MCP
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage

Standalone Mode

Run the server directly:

npm start

Remote Docker Configuration

The MCP server supports connecting to remote Docker hosts using environment variables:

Connect to Remote Docker via TCP

DOCKER_HOST=tcp://192.168.1.100:2375 npm start

Connect to Remote Docker via HTTPS with TLS

DOCKER_HOST=https://192.168.1.100:2376 \
DOCKER_TLS_VERIFY=1 \
DOCKER_CERT_PATH=~/.docker/certs \
npm start

Connect via SSH Tunnel

First, set up an SSH tunnel:

ssh -NL localhost:2375:/var/run/docker.sock user@remote-host

Then connect to the tunneled Docker:

DOCKER_HOST=tcp://localhost:2375 npm start

VS Code Integration

To integrate with VS Code and GitHub Copilot, add the following to your MCP settings file:

For Local Docker (~/.vscode/mcp-settings.json or in your workspace settings):

{
  "mcpServers": {
    "docker": {
      "command": "node",
      "args": ["/path/to/Docker-MCP/dist/index.js"]
    }
  }
}

For Remote Docker over TCP:

{
  "mcpServers": {
    "docker": {
      "command": "node",
      "args": ["/path/to/Docker-MCP/dist/index.js"],
      "env": {
        "DOCKER_HOST": "tcp://192.168.1.100:2375"
      }
    }
  }
}

For Remote Docker with TLS:

{
  "mcpServers": {
    "docker": {
      "command": "node",
      "args": ["/path/to/Docker-MCP/dist/index.js"],
      "env": {
        "DOCKER_HOST": "https://192.168.1.100:2376",
        "DOCKER_TLS_VERIFY": "1",
        "DOCKER_CERT_PATH": "/home/user/.docker/certs"
      }
    }
  }
}

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

{
  "mcpServers": {
    "docker": {
      "command": "node",
      "args": ["/path/to/Docker-MCP/dist/index.js"]
    }
  }
}

Alternative using npx (after publishing to npm):

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["@swartdraak/docker-mcp-server"]
    }
  }
}

Testing Your Connection

Connection Test Utility

Before using the MCP server, you can test your Docker connection with the included test utility:

# Test local Docker connection
node test-connection.js

# Test remote Docker via TCP
DOCKER_HOST=tcp://192.168.1.100:2375 node test-connection.js

# Test remote Docker via TLS
DOCKER_HOST=https://192.168.1.100:2376 \
DOCKER_TLS_VERIFY=1 \
DOCKER_CERT_PATH=~/.docker/certs \
node test-connection.js

# Test SSH tunnel connection
DOCKER_HOST=tcp://localhost:2375 node test-connection.js

The test utility will:

  • ✓ Validate your configuration
  • ✓ Check TLS certificates (if applicable)
  • ✓ Test connection to Docker daemon
  • ✓ Verify Docker operations (list containers, images, networks, volumes)
  • ✓ Display system information
  • ✓ Provide troubleshooting recommendations

validate_connection Tool

Once the MCP server is running, you can also use the validate_connection tool from your AI assistant:

"Validate my Docker connection"

This tool performs runtime connectivity tests and returns:

  • Connection status
  • Docker version and API information
  • System information
  • Test results for common operations

Manual Testing

You can also test your connection directly with Docker CLI:

# Set environment variables
export DOCKER_HOST=tcp://192.168.1.100:2375

# Test commands
docker version
docker info
docker ps

For detailed setup instructions, troubleshooting, and platform-specific guides, see:

  • CONFIGURATION.md - MCP server configuration examples
  • REMOTE_SETUP.md - Comprehensive remote connection setup guide (includes Windows 11 specific instructions)

Available Tools (37 Total)

Container Operations (15 tools)

list_containers

List all Docker containers (running or all)

{
  "all": true
}

`cre


FAQ

What is the Docker MCP Server MCP server?
Docker MCP Server is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Docker MCP Server?
This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
MCP server reviews

Ratings

4.510 reviews
  • Shikha Mishra· Oct 10, 2024

    Docker MCP Server is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Piyush G· Sep 9, 2024

    We evaluated Docker MCP Server against two servers with overlapping tools; this profile had the clearer scope statement.

  • Chaitanya Patil· Aug 8, 2024

    Useful MCP listing: Docker MCP Server is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Sakshi Patil· Jul 7, 2024

    Docker MCP Server reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Ganesh Mohane· Jun 6, 2024

    I recommend Docker MCP Server for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Oshnikdeep· May 5, 2024

    Strong directory entry: Docker MCP Server surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Dhruvi Jain· Apr 4, 2024

    Docker MCP Server has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Rahul Santra· Mar 3, 2024

    According to our notes, Docker MCP Server benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Pratham Ware· Feb 2, 2024

    We wired Docker MCP Server into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Yash Thakker· Jan 1, 2024

    Docker MCP Server is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.