Provides tools for reloading Caddy reverse proxy configurations.
Enables management of Cloudflare DNS records, including listing all records for a specific zone.
Provides comprehensive management of Docker containers, images, and Compose stacks, including monitoring performance, viewing logs, and pruning unused resources.
Allows for monitoring and management of server resources on Hetzner dedicated servers, including disk usage, CPU and RAM metrics, and system uptime via SSH.
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/Hetzner MCP Servershow all running containers and the current system resource usage"
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/Hetzner MCP Server
MCP (Model Context Protocol) server for managing Docker containers, Compose stacks, and server resources on a Hetzner dedicated server via SSH. Also includes Cloudflare DNS record management.
Tools
Containers
list_containers -- List running (or all) Docker containers
container_logs -- Get recent logs from a container
container_stats -- Get CPU, memory, and network I/O for a container
restart_container -- Restart a container
stop_container -- Stop a running container
start_container -- Start a stopped container
Stacks
list_stacks -- List all Docker Compose stacks found under /opt/
stack_status -- Get status of a Compose stack
System
system_info -- Docker system info (disk usage, image/container counts)
disk_usage -- Server disk usage for all mount points and key directories
system_resources -- CPU, RAM, load average, uptime, top processes
list_images -- List Docker images sorted by size
prune_system -- Prune unused Docker resources (not volumes)
Caddy
caddy_reload -- Reload the Caddy reverse proxy configuration
Cloudflare DNS
list_dns_records -- List all DNS records for a Cloudflare zone
Setup
cd docker-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Configure
cp run-mcp.sh.example run-mcp.sh
chmod +x run-mcp.sh
# Edit run-mcp.sh and set your credentialsPrerequisites
SSH access to the Hetzner server (configured in
~/.ssh/configas an alias)Docker installed on the remote server
(Optional) Cloudflare API credentials for DNS management
Environment Variables
Variable | Required | Description |
| Yes | SSH host alias (default: |
| No | Cloudflare Zone ID (for DNS tools) |
| No | Cloudflare account email |
| No | Cloudflare Global API Key |
Claude Code Configuration
Add to ~/.mcp.json:
{
"mcpServers": {
"docker": {
"command": "/path/to/docker-mcp/run-mcp.sh",
"type": "stdio"
}
}
}License
MIT -- see LICENSE
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.