Provides comprehensive Docker integration including container lifecycle management (list, inspect, start, stop, restart), log streaming, resource monitoring, image management, Docker Compose operations, and AI-powered container diagnostics with configurable permission levels and safety controls.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Docker MCP Servershow me all running containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
docker-mcp
A Model Context Protocol (MCP) server for Docker integration. Give your AI assistant eyes and hands on your containers.
Status: Planning Author: Claude (claude@arktechnwa.com) + Meldrey License: MIT Organization: ArktechNWA
Why?
Your AI assistant can write Dockerfiles, but it can't see if your containers are running. It can suggest fixes, but can't tail the logs to see the actual error. It's blind to your container ecosystem.
docker-mcp connects Claude to your Docker daemon — safely, with granular permissions.
Philosophy
Safety by default — Read-only container inspection
User controls exposure — Whitelist containers, permission levels
Never hang — Docker commands can hang, we timeout
Structured output — JSON for machines, summaries for AI
Fallback AI — Haiku for log analysis and troubleshooting
Features
Perception (Read)
List containers (running, stopped, all)
Container inspection (config, state, network)
Container logs (with streaming)
Image listing and inspection
Network and volume listing
Resource usage stats
Action (Write)
Start/stop/restart containers
Execute commands in containers
Create/remove containers
Pull images
Compose operations
Analysis (AI-Assisted)
"Why did this container crash?"
Log pattern analysis
Resource usage anomalies
Permission Model
Permission Levels
Level | Description | Default |
| List, inspect, logs, stats | ON |
| Start, stop, restart, pause, unpause | OFF |
| Execute commands in containers | OFF |
| Create/remove containers | OFF |
| Pull, build, remove images | OFF |
| Create/remove volumes | OFF |
| Create/remove networks | OFF |
| System prune, info | OFF |
Container Filtering
Rules:
Blacklist always wins
Pattern matching with
*wildcardsApplies to container names and image names
Exec Safety
Bypass Mode
Full Docker access. You own the consequences.
Authentication
Docker socket access:
Or TCP:
Tools
Containers
docker_ps
List containers.
Returns:
docker_inspect
Get detailed container information.
docker_logs
Get container logs.
docker_stats
Get resource usage.
Returns:
Lifecycle
docker_start
Start container(s). Requires lifecycle permission.
docker_stop
Stop container(s). Requires lifecycle permission.
docker_restart
Restart container(s). Requires lifecycle permission.
docker_pause / docker_unpause
Pause/unpause container(s). Requires lifecycle permission.
Exec
docker_exec
Execute command in container. Requires exec permission.
Returns:
Images
docker_images
List images.
docker_pull
Pull image. Requires images permission.
Compose
docker_compose_ps
List compose services.
docker_compose_up
Start compose services. Requires create + lifecycle permissions.
docker_compose_down
Stop compose services. Requires lifecycle permission.
docker_compose_logs
Get compose logs.
Analysis
docker_diagnose
AI-powered container diagnosis.
Returns:
NEVERHANG Architecture
Docker commands can hang. docker logs -f never returns. docker exec in a stuck container hangs forever.
Timeouts
Read operations: 30s
Lifecycle operations: 60s
Exec operations: 30s (configurable)
Compose operations: 120s
Streaming
Logs stream in chunks
Stats stream updates
Client can cancel anytime
Process Management
Track spawned docker commands
Kill hung processes
Clean up partial operations
Circuit Breaker
3 failures in 60s → 5 minute cooldown
Docker daemon health checks
Socket connectivity monitoring
Fallback AI
Optional Haiku for log analysis.
When used:
docker_diagnosewithuse_ai: trueCrash analysis
Resource anomaly detection
Configuration
~/.config/docker-mcp/config.json:
Claude Code Integration
Installation
Requirements
Node.js 18+
Docker daemon (socket or TCP access)
Docker Compose (for compose features)
Optional: Anthropic API key for fallback AI
Security Considerations
Socket access = root — Docker socket grants root-equivalent access
Use container filtering — Blacklist sensitive containers
Exec command filtering — Block dangerous patterns
Read-only default — Only enable write permissions explicitly
No secret exposure — Environment variables filtered from output
Credits
Created by Claude (claude@arktechnwa.com) in collaboration with Meldrey. Part of the ArktechNWA MCP Toolshed.