Manages Docker containers across multiple homelab hosts, providing tools for container lifecycle management (start, stop, restart, pause/unpause), log retrieval, resource monitoring (CPU, memory, network, I/O), container search and inspection, and Docker system operations including disk usage analysis and resource pruning.
homelab-mcp-server
MCP (Model Context Protocol) server for managing Docker infrastructure across multiple homelab hosts. Designed for use with Claude Code and other MCP-compatible clients.
Features
Multi-host support: Manage containers across Unraid, Proxmox, bare metal servers, and more
Auto-detect local Docker: Automatically adds local Docker socket if available
Container lifecycle: Start, stop, restart, pause/unpause containers
Log retrieval: Fetch logs with time filters, grep, and stream selection
Resource monitoring: Real-time CPU, memory, network, and I/O statistics
Smart search: Find containers by name, image, or labels across all hosts
Detailed inspection: Full container configuration and state information
Dual transport: stdio for Claude Code, HTTP for remote access
Tools
Tool | Description |
| List containers with filtering by state, name, image, labels |
| Start/stop/restart/pause/unpause containers |
| Retrieve container logs with time and grep filters |
| Get CPU, memory, network, I/O statistics |
| Detailed container configuration and state |
| Check connectivity and container counts per host |
| Search containers by name, image, or labels |
| Get Docker version, resources, and system info per host |
| Get Docker disk usage (images, containers, volumes, cache) |
| Remove unused Docker resources (requires force=true) |
| Get host CPU, memory, disk usage via SSH |
Installation
Configuration
Create a config file at one of these locations (checked in order):
Path in
HOMELAB_CONFIG_FILEenv var./homelab.config.json(current directory)~/.config/homelab-mcp/config.json~/.homelab-mcp.json
Example Config
Copy homelab.config.example.json as a starting point:
Note: If
/var/run/docker.sockexists and isn't already in your config, it will be automatically added as a host using your machine's hostname. This means the server works out-of-the-box for local Docker without any configuration.
Host Configuration Options
Field | Type | Description |
| string | Unique identifier for the host |
| string | Hostname or IP address |
| number | Docker API port (default: 2375) |
| "http" | "https" | Connection protocol |
| string | Path to Docker socket (for local connections) |
| string[] | Optional tags for filtering |
Enabling Docker API on Hosts
Unraid
Docker API is typically available at port 2375 by default.
Standard Docker (systemd)
Edit /etc/docker/daemon.json:
Or override the systemd service:
β οΈ Security Note: Exposing Docker API without TLS is insecure. Use on trusted networks only, or set up TLS certificates.
Usage
With Claude Code
Add to ~/.claude/claude_code_config.json:
Or if your config is in one of the default locations, you can skip the env entirely:
Then in Claude Code:
HTTP Mode
For remote access or multi-client scenarios:
Environment variables for HTTP mode:
PORT: Server port (default: 3000)HOST: Bind address (default: 127.0.0.1)
CLI Help
Example Interactions
List containers
Check logs
Resource monitoring
Development
Architecture
License
MIT