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.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
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
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
- Quick Start
- Features
- Installation
- Usage
- Available Tools
- Testing Your Connection
- Development
- Troubleshooting
- Contributing
- Documentation
- License
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
- 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
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 49 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.
Use Cases▌
Extended AI Capabilities
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Context Enhancement
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Workflow Automation
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Implementation Guide▌
Prerequisites
- ›Claude Desktop 0.7.0+ or Cursor IDE with MCP support
- ›Basic understanding of MCP architecture and capabilities
- ›Access credentials for integrated services (if required)
- ›Willingness to experiment and iterate on configuration
Time Estimate
15-60 minutes depending on server complexity
Installation Steps
- 1.Install MCP server: npm install -g [package-name] or via GitHub
- 2.Add server configuration to ~/.claude/mcp.json
- 3.Provide required credentials and configuration
- 4.Restart Claude Desktop to load new server
- 5.Test basic functionality with simple prompts
- 6.Explore capabilities and experiment with use cases
- 7.Document successful patterns for reuse
Troubleshooting
- ⚠MCP server not loading: Check config syntax, verify installation
- ⚠Connection errors: Check network, firewall, credentials
- ⚠Feature not working: Read server docs, check required parameters
- ⚠Performance issues: Monitor resource usage, check for network latency
- ⚠Conflicts with other servers: Check port assignments, namespace collisions
Best Practices▌
✓ Do
- +Read server documentation thoroughly before setup
- +Start with simple use cases to validate functionality
- +Test in non-production environment first
- +Monitor resource usage and performance
- +Keep servers updated for bug fixes and new features
- +Document configuration for team members
- +Use environment variables for sensitive configuration
✗ Don't
- −Don't grant overly permissive access to MCP servers
- −Don't skip reading security considerations in docs
- −Don't expose sensitive data without proper controls
- −Don't run untrusted MCP servers without code review
- −Don't ignore error messages—investigate root cause
💡 Pro Tips
- ★Combine multiple MCP servers for powerful workflows
- ★Create custom MCP servers for your specific needs
- ★Share successful configurations with team
- ★Use MCP inspector for debugging
- ★Join MCP community for tips and troubleshooting
Technical Details▌
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
- Model Context Protocol (MCP)
- JSON-RPC 2.0
- stdio or HTTP transport
Compatibility
- Claude Desktop
- Cursor IDE
- Custom MCP clients
When to Use This▌
✓ Use When
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid When
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.
Integration▌
- →Tool composition: Chain multiple MCP tools in workflows
- →Context augmentation: Provide AI with relevant external data
- →Action delegation: Let AI execute tasks on external systems
- →Bidirectional sync: Keep AI context and external systems in sync
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.5★★★★★49 reviews- ★★★★★Olivia Thomas· Dec 28, 2024
Docker MCP Server is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Shikha Mishra· Dec 20, 2024
Docker MCP Server has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Hiroshi Singh· Dec 20, 2024
Docker MCP Server is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
- ★★★★★Amina Robinson· Dec 16, 2024
Docker MCP Server reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Layla White· Nov 23, 2024
We evaluated Docker MCP Server against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Ava Chawla· Nov 19, 2024
Docker MCP Server reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Yuki Reddy· Nov 11, 2024
We wired Docker MCP Server into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Fatima Nasser· Nov 7, 2024
Docker MCP Server is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Fatima Chen· Oct 26, 2024
Strong directory entry: Docker MCP Server surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Layla Farah· Oct 14, 2024
Docker MCP Server has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
showing 1-10 of 49