MCP Docker Server Documentation
A Model Context Protocol (MCP) server that exposes Docker functionality to AI assistants like Claude. Manage containers, images, networks, and volumes through a type-safe, documented API with safety controls.
Features
- 36 Docker Tools: Complete container, image, network, volume, and system management
- 5 AI Prompts: Intelligent troubleshooting, optimization, networking debug, and security analysis
- 2 Resources: Real-time container logs and resource statistics
- Type Safety: Full type hints with Pydantic validation and mypy strict mode
- Safety Controls: Three-tier safety system (safe/moderate/destructive) with configurable restrictions
- Comprehensive Testing: Extensive test coverage with unit and integration tests
- Modern Python: Built with Python 3.11+, uv package manager, and async-first design
Canonical Docs
The project docs live in three Markdown sources. Each section in this site links directly to them:
- README.md — Overview, features, install flow, tools/prompts/resources
- CONFIGURATION.md — All environment variables for Docker, transports, safety, and server settings
- SECURITY.md — Threat model, OAuth/TLS guidance, deployment checklist
Quick Start
See Installation Instructions in the main README for a complete setup guide including:
- Prerequisites (Python 3.11+, Docker, uv/pip)
- Installation methods (uvx, uv, pip)
- Configuration for Claude Desktop (Linux/macOS/Windows)
- Platform-specific Docker socket URLs
Safety System
Three-tier classification: SAFE (read-only) → MODERATE (create/modify) → DESTRUCTIVE (delete).
Control via environment variables: SAFETY_ALLOW_DESTRUCTIVE_OPERATIONS, SAFETY_ALLOW_PRIVILEGED_CONTAINERS, etc.
See README.md for complete safety system documentation.
What’s Available
- 36 Docker Tools - Container, image, network, volume, and system management
- 5 AI Prompts - Troubleshooting, optimization, networking debug, security audit, compose generation
- 2 Resources - Container logs and stats streaming
For complete list see README.md.
Example Usage
List All Containers
# Using the MCP tool
result = await client.call_tool("docker_list_containers", {
"all": True,
"filters": {"status": ["running"]}
})
Troubleshoot a Container
# Using the AI prompt
prompt = await client.get_prompt("troubleshoot_container", {
"container_id": "my-container"
})
# Returns detailed diagnostics and recommendations
Stream Container Logs
# Using the resource
logs = await client.read_resource("container://logs/my-container")
# Pass tail/follow arguments via your MCP client options
Documentation Sources
- README.md: Overview, onboarding, tool/prompt/resource catalog
- CONFIGURATION.md: Canonical environment variable reference (Docker, transports, safety, TLS)
- SECURITY.md: OAuth/TLS configuration, IP filtering, audit trail, production hardening guide
For questions or issues, open a ticket in the GitHub repository.
Contributing
Contributions are welcome! Please see the GitHub repository for:
- Filing issues and bug reports
- Submitting pull requests
- Reviewing code and documentation
License
MIT License - see LICENSE for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- MCP Documentation: modelcontextprotocol.io
Version: 1.1.0 Last Updated: 2025-11-14 Python: 3.11+ Docker: API version 1.41+