Provides comprehensive Docker management capabilities including listing, monitoring, and controlling containers and Dockge stacks, reading and writing compose files, managing volumes and networks, and executing commands in containers.
Enables monitoring of OPNsense firewall status and restarting services through the OPNsense API.
Provides tools for checking ZFS pool health, managing datasets, retrieving alerts, and creating snapshots through the TrueNAS API.
Homelab MCP Server
A remote MCP (Model Context Protocol) server for managing homelab infrastructure. Provides Claude with tools to monitor and manage Docker containers, OPNsense firewall, and TrueNAS storage.
Features
4 Capability Levels: From read-only monitoring to full management control
Docker Management: List, monitor, control containers and Dockge stacks
OPNsense Integration: Monitor firewall status and restart services
TrueNAS Integration: Check pool health, manage datasets, create snapshots
System Monitoring: CPU, memory, disk usage on the host
Quick Start
1. Prerequisites
Docker and Docker Compose installed on target host (Wharf)
OPNsense API credentials (optional)
TrueNAS API key (optional)
Node.js 20+ (for local development)
2. Setup
3. Configuration
Edit .env with your settings:
4. Build and Deploy
5. Configure Claude Desktop
Add to your Claude Desktop MCP settings:
For remote deployment via HTTPS, see the deployment section in the plan document.
Capability Levels
Level | Name | Capabilities |
1 | Monitor | Read-only: container status, logs, stats, system info, service health |
2 | Operate | Level 1 + start/stop/restart containers and services |
3 | Configure | Level 2 + read compose files, configs, volumes, networks |
4 | Manage | Level 3 + write configs, create/remove containers, exec commands |
Recommendation: Start with Level 1 and increase as needed.
Available Tools
Level 1 - Monitor
docker_list_containers- List all containersdocker_container_logs- Get container logsdocker_container_stats- Get container CPU/memory statssystem_info- Get host system infoopnsense_status- Get OPNsense statustruenas_status- Get TrueNAS pool statustruenas_alerts- Get TrueNAS alerts
Level 2 - Operate
docker_restart_container- Restart a containerdocker_start_container- Start a containerdocker_stop_container- Stop a containeropnsense_service_restart- Restart OPNsense service
Level 3 - Configure
docker_read_compose- Read docker-compose.ymldocker_list_volumes- List Docker volumesdocker_list_networks- List Docker networksdocker_inspect_container- Inspect container detailstruenas_list_datasets- List ZFS datasetstruenas_dataset_info- Get dataset details
Level 4 - Manage
docker_write_compose- Write docker-compose.ymldocker_compose_up- Deploy a stackdocker_compose_down- Remove a stackdocker_exec- Execute command in containertruenas_create_snapshot- Create ZFS snapshot
Development
Security Notes
The API key should be kept secret and rotated periodically
Start with the lowest capability level you need
For Level 4, the
/opt/stacksmount must be:rwinstead of:roThe container requires access to the Docker socket for container management
OPNsense and TrueNAS APIs use self-signed certificates by default
Troubleshooting
Container won't start
Tools failing
Permission issues
If you need Level 4 (write access to stacks), update the volume mount:
License
MIT
Contributing
Issues and pull requests welcome!