Docker MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add docker-mcp-ef77 -- npx -y @swartdraak/docker-mcp-server
README.md

Manage Docker containers, images, networks, and volumes via AI assistants

Docker MCP Server

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 N

Tools (5)

docker_container_listList all Docker containers
docker_container_runRun a new Docker container
docker_image_listList all Docker images
docker_network_listList all Docker networks
docker_volume_listList all Docker volumes

Environment Variables

DOCKER_HOSTThe URL of the Docker daemon socket
DOCKER_TLS_VERIFYEnable TLS verification for remote Docker connections
DOCKER_CERT_PATHPath to the directory containing TLS certificates

Configuration

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

Try it

List all currently running containers and their status.
Pull the latest nginx image and start a new container named web-server on port 80.
Stop and remove the container named web-server.
Show me a list of all available Docker images on this host.
Prune all unused Docker volumes to free up disk space.

Frequently Asked Questions

What are the key features of Docker MCP Server?

37 powerful tools covering containers, images, networks, and volumes. Remote Docker support via TCP, HTTPS, or SSH tunnel. Full TLS/SSL support for secure remote management. Comprehensive container lifecycle management (start, stop, restart, exec, logs). Industry-standard MCP implementation with full type safety.

What can I use Docker MCP Server for?

AI-Assisted DevOps for managing infrastructure via natural language. Automating container orchestration workflows within development environments. Securely managing Docker instances on remote servers. Learning and exploring Docker capabilities with AI guidance.

How do I install Docker MCP Server?

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

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.

Need the old visual installer? Open Conare IDE.
Open Conare