Enables deployment and management of multi-service homelab stacks through Ansible playbooks, with support for system-level configuration, cross-service orchestration, and idempotent operations across multiple hosts.
Integration for test coverage reporting and CI/CD pipeline integration.
Supports Consul as a backend for Terraform state management in high-availability configurations.
Provides comprehensive container management including deployment, lifecycle control (start/stop/restart), status monitoring, log retrieval, and removal of Docker containers across homelab infrastructure.
Supports etcd as a backend for Terraform state management in high-availability configurations.
Integration for CI/CD workflows and repository management.
Enables automated deployment of Home Assistant for smart home automation with Pi GPIO integration, Pi Camera module support, Zigbee/Z-Wave hub capabilities, and energy monitoring.
Supports Intel Neural Compute Stick (NCS2) AI accelerator detection and optimization for AI inference workloads on homelab systems.
Provides automated deployment and management of Jellyfin media server through service templates.
Enables deployment and management of K3s lightweight Kubernetes clusters for container orchestration across homelab infrastructure.
Supports Kubernetes cluster deployment and management through K3s for container orchestration.
Provides reverse proxy configuration with SSL support as part of complete AI homelab stack deployments.
Enables deployment and management of Ollama local LLM server with Pi-optimized configurations for 4GB/8GB RAM, model recommendations based on available resources, and thermal/performance tuning for sustained workloads.
Supports ONNX model format for AI accelerator inference workloads including MemryX MX3, Coral TPU, Hailo-8, and Intel NCS2.
Provides automated deployment of Pi-hole network-wide ad blocking with support for both Docker Compose and Terraform deployments, including travel hotspot configuration.
Integration for running unit and integration tests with coverage reporting.
Python-based MCP server implementation with comprehensive infrastructure management capabilities.
Supports PyTorch model format for Hailo-8 AI accelerator inference workloads.
Provides optimized deployment and management of services on Raspberry Pi 4/5 with AI accelerator support, GPIO integration, Pi Camera module support, and thermal/performance optimization.
Uses SQLite for network topology mapping, device tracking, and change history management.
Supports TensorFlow and TensorFlow Lite model formats for AI accelerator inference, particularly for Coral Edge TPU and Hailo-8 accelerators.
Provides enterprise-grade infrastructure as code with full state management, idempotent deployments, drift detection, multi-backend support (local, S3, Consul, etcd), and clean resource lifecycle management for homelab services.
Enables deployment and management of TrueNAS network-attached storage with ZFS optimization.
Uses YAML for service template definitions including configuration for Ollama, Frigate NVR, Home Assistant, Pi-hole, Jellyfin, K3s, and TrueNAS.
Supports YOLOv5 object detection models for real-time AI inference with accelerators like MemryX MX3 and Coral TPU, achieving 80+ FPS on Raspberry Pi.
Supports Zigbee USB dongle integration through Home Assistant for smart home hub capabilities.
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., "@Homelab MCP Serverinstall Frigate NVR on my Raspberry Pi with Coral TPU detection"
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.
π Homelab MCP Server
AI-Powered VM Infrastructure Management with Advanced Service Installation Framework
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to manage, deploy, and monitor homelab infrastructure through automated service installation, Terraform state management, and VM operations.
π Quick Start
β¨ Key Features
π€ AI-Driven Service Installation
49 MCP Tools for complete infrastructure lifecycle management
Service Templates for Jellyfin, Pi-hole, Ollama, Home Assistant, and more
Proxmox Integration with full API access and 400+ community scripts for discovery
Terraform Support with state management and clean resource tracking
Automated Deployment with requirement validation and health checking
One-Command Installation: "Install Pi-hole on my homelab server"
π§ VM Infrastructure Management
SSH-based Discovery: Gather comprehensive hardware/software information from any system
Automated User Setup: Configure
mcp_adminwith passwordless access and selective permissionsContainer Operations: Deploy, manage, and remove Docker/LXD containers with state tracking
Network Mapping: Intelligent device discovery, topology analysis, and change tracking
ποΈ Enterprise-Grade Infrastructure as Code
Terraform Integration: Full state management with local/S3 backends
Idempotent Deployments: Safe to run multiple times with automatic drift detection
Clean Resource Management: Proper destroy workflows that remove only what was created
Multi-Backend Support: Local files, S3-compatible storage, Consul/etcd for HA
β‘ Ultra-Fast Development
uv Package Manager: 600x faster dependency installation (0.07s vs 45s with pip)
Reproducible Builds: Lock files ensure consistent deployments across environments
Zero Configuration: Dependencies and virtual environments handled automatically
π Available Tools (41 Total)
π οΈ Service Management Tools (4)
list_available_services
List all available service templates for homelab deployment.
install_service
Deploy services with automated configuration and validation.
plan_terraform_service
Generate Terraform execution plans to preview infrastructure changes without applying them.
destroy_terraform_service
Cleanly destroy Terraform-managed services and remove all associated resources.
π¦ Featured Services Available
Ollama - Local LLM Server
Self-hosted LLM deployment for privacy-focused AI applications
Model support for tinyllama, phi, mistral, and other open-source models
API integration for chat interfaces and custom applications
Resource-efficient operation suitable for homelab environments
Home Assistant - Smart Home Automation
GPIO integration for Raspberry Pi sensors and control
Zigbee/Z-Wave hub capabilities with USB dongles
Energy monitoring and automation rules
Mobile app integration for remote access
SSH & Admin Tools (5)
start_interactive_shell
Start an interactive web-based shell session on a remote system:
Full TTY support with xterm.js browser-based terminal
Perfect for interactive scripts like Proxmox community scripts that require user input
Persistent sessions with automatic cleanup after 30 minutes of inactivity
Secure access through API key authentication
Returns a URL to open the shell in your browser
Example use case: Run Proxmox community scripts interactively, navigate the filesystem, edit files, or debug issues with a full terminal experience.
Note: Uses registered SSH credentials or accepts username/password. Sessions are isolated and automatically cleaned up.
ssh_discover
SSH into a remote system and gather comprehensive system information including:
CPU details (model, cores, architecture)
Memory usage (total, available, used)
Storage information (disk usage, mount points)
Network interfaces (IPs, MAC addresses, link status)
Hardware discovery: USB devices, PCI devices (network cards, GPUs), block devices (drives, partitions)
Operating system information and uptime
Note: When using username mcp_admin, the tool automatically uses the MCP's SSH key if available. No password is required after running setup_mcp_admin on the target system.
setup_mcp_admin
SSH into a remote system using admin credentials and set up the mcp_admin user with:
User creation (if not exists)
Sudo group membership with passwordless access
SSH key authentication (using MCP's auto-generated key)
Selective group permissions (only adds groups for installed services like docker, lxd)
Parameters:
hostname: Target system IP or hostnameusername: Admin username with sudo accesspassword: Admin passwordforce_update_key(optional, default: true): Force update SSH key even if mcp_admin already has other keys
verify_mcp_admin
Verify SSH key access to the mcp_admin account on a remote system:
Tests SSH key authentication
Verifies sudo privileges
Returns connection status
Network Discovery Tools (6)
discover_and_map
Discover a device via SSH and store it in the network site map database.
bulk_discover_and_map
Discover multiple devices via SSH and store them in the network site map database.
get_network_sitemap
Get all discovered devices from the network site map database.
analyze_network_topology
Analyze the network topology and provide insights about the discovered devices.
suggest_deployments
Suggest optimal deployment locations based on current network topology and device capabilities.
get_device_changes
Get change history for a specific device.
Infrastructure CRUD Tools (7)
deploy_infrastructure
Deploy new infrastructure based on AI recommendations or user specifications:
Deploy Docker containers, LXD containers, or systemd services
Configure networking, storage, and environment variables
Validate deployment plans before execution
update_device_config
Update configuration of an existing device:
Modify service configurations
Update network settings
Change security configurations
Adjust resource allocations
decommission_device
Safely remove a device from the network infrastructure:
Analyze dependencies and critical services
Execute migration plans to move services
Graceful shutdown and removal
scale_services
Scale services up or down based on resource analysis:
Horizontal scaling of containers/VMs
Resource allocation adjustments
Load balancing configuration
validate_infrastructure_changes
Validate infrastructure changes before applying them:
Basic, comprehensive, and simulation validation levels
Dependency checking
Risk assessment
create_infrastructure_backup
Create a backup of current infrastructure state:
Full or partial backups
Device-specific backups
Configuration and data backup options
rollback_infrastructure_changes
Rollback recent infrastructure changes:
Restore from backups
Selective rollback capabilities
Validation before rollback
VM Management Tools (6)
deploy_vm
Deploy a new VM/container on a specific device:
Support for Docker containers and LXD VMs
Configurable images, ports, volumes, environment variables
Platform-agnostic deployment
control_vm
Control VM state (start, stop, restart):
Manage VM lifecycle
Support for both Docker and LXD platforms
Real-time status updates
get_vm_status
Get detailed status of a specific VM:
Container/VM health information
Resource usage statistics
Network and storage details
list_vms
List all VMs/containers on a device:
Cross-platform inventory
Status and configuration overview
Multi-device support
get_vm_logs
Get logs from a specific VM/container:
Configurable log line limits
Support for Docker and LXD logs
Real-time log streaming
remove_vm
Remove a VM/container from a device:
Graceful or forced removal
Data preservation options
Cleanup of associated resources
Proxmox Community Scripts Integration (2)
Discover and get information about 400+ community-maintained Proxmox installation scripts:
search_proxmox_scripts
Search the Proxmox community scripts repository:
Search by keyword (docker, homeassistant, pihole, etc.)
Filter by category (containers, VMs, installers)
Optional metadata fetching for resource requirements
Access to 400+ community-maintained installation scripts
get_proxmox_script_info
Get detailed information about a specific script:
CPU, RAM, and disk requirements
OS and version specifications
Tags and categorization
Script preview and download URL with command to run
Note: Script execution is not automated because these scripts are interactive and require user input during installation. The AI can help you find the right script and show its requirements, then you run it manually from the Proxmox web shell where you can respond to prompts.
Scripts provided by: community-scripts/ProxmoxVE (MIT License)
Proxmox API Integration (8)
Direct Proxmox API access for comprehensive cluster management:
list_proxmox_resources
List all cluster resources:
VMs, LXC containers, nodes, storage, pools
Filter by resource type
Real-time status and metrics
Uses PROXMOX_HOST from environment
get_proxmox_node_status
Get detailed node information:
CPU usage and specifications
Memory usage and capacity
Uptime and load averages
Disk and network statistics
get_proxmox_vm_status
Get specific VM/container status:
Resource usage (CPU, memory, disk, network)
Configuration details
Current state (running, stopped, suspended)
Supports both QEMU VMs and LXC containers
manage_proxmox_vm
Control VM/container lifecycle:
Actions: start, stop, shutdown, restart, suspend, resume
Graceful shutdowns vs forced stops
Real-time operation status
create_proxmox_lxc
Create new LXC containers:
Choose from available OS templates
Configure CPU cores, RAM, and disk
Network configuration
Storage selection
create_proxmox_vm
Create new QEMU VMs:
ISO or template-based deployment
Hardware configuration (CPU, RAM, disk, network)
Boot order and BIOS settings
SCSI/VirtIO storage options
clone_proxmox_vm
Clone existing VMs or containers:
Full or linked clones
New VMID assignment
Name and description customization
Fast template-based deployments
delete_proxmox_vm
Remove VMs or containers:
Clean resource deallocation
Confirmation safeguards
Disk cleanup options
Authentication: Supports both API tokens (no expiration) and username/password (2-hour sessions). Configure via environment variables or pass credentials per-call.
ποΈ Terraform vs SSH Commands
Why Terraform Integration Matters
Aspect | SSH Commands | Terraform | Benefit |
State Tracking | β Manual | β Automatic | Know exactly what was created |
Idempotency | β Can break | β Safe reruns | Run deployments multiple times |
Clean Removal | β Orphaned resources | β Complete cleanup | Remove only what Terraform created |
Drift Detection | β Manual checks | β Automatic | Detect manual changes |
Rollback | β Manual process | β State-based | Revert to previous configurations |
Deployment Methods Available
π Ansible Configuration Management
Why Ansible for Multi-Service Deployments
Perfect for deploying multi-service homelab stacks with complex dependencies:
Capability | Docker Compose | Terraform | Ansible | Best For |
Single Host Services | β Excellent | β Good | β Good | Simple deployments |
Multi-Host Orchestration | β Limited | β Infrastructure | β Configuration | Complex setups |
System Configuration | β Container only | β Limited | β Full control | OS-level setup |
Service Dependencies | β Basic | β Resource deps | β Cross-service config | Interconnected services |
Idempotent Operations | β Yes | β Yes | β Yes | Safe re-runs |
Available Ansible Services
Ansible Tools
check_ansible_service- Verify Ansible deployment statusrun_ansible_playbook- Execute playbooks with tags/variables
Example: Complete AI Stack Deployment
Installation
Quick Start (Recommended)
Traditional pip Installation
For Development
Usage
Running the Server
The server communicates via stdio (stdin/stdout) using the MCP protocol.
SSH Key Management
The MCP server automatically generates an SSH key pair on first initialization:
Private key:
~/.ssh/mcp_admin_rsaPublic key:
~/.ssh/mcp_admin_rsa.pub
This key is used for:
Authenticating as
mcp_adminon remote systems after setupEnabling passwordless SSH access for system management
Automatic authentication when using
ssh_discoverwith usernamemcp_admin
Testing with JSON-RPC
You can test the server by sending JSON-RPC requests:
Integration with AI Assistants
This server is designed to work with AI assistants that support the Model Context Protocol.
π For detailed Claude setup instructions, see
Recommended configuration for Claude Desktop (using uv):
Alternative configuration (traditional Python):
Place this in:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.json
Typical Workflow
Initial Setup: The MCP automatically generates its SSH key on first run
Configure Remote System: Use
setup_mcp_adminwith admin credentials to:Create the
mcp_adminuser on the target systemInstall the MCP's public key for authentication
Grant sudo privileges
Verify Access: Use
verify_mcp_adminto confirm setup was successfulManage Systems: Use
ssh_discoverwith usernamemcp_adminfor passwordless access
Example workflow:
Handling Key Updates
If the mcp_admin user already exists but has a different SSH key, the setup_mcp_admin tool will automatically update it by default. You can control this behavior:
When force_update_key is true (default), the tool will:
Remove any existing MCP keys (identified by the
mcp_admin@comment)Add the current MCP's public key
Preserve any other SSH keys the user might have
π― Example Use Cases
Homelab Service Deployment
Enterprise Infrastructure Management
Hardware Discovery and Optimization
Development and Testing
Development
Project Structure
Running Tests
Unit Tests
Integration Tests
All Tests
Adding New Tools
Define the tool schema in
src/homelab_mcp/tools.py:
Implement the tool logic in the appropriate module
Add the execution case in
execute_tool()functionWrite tests for the new tool
Acknowledgments
Proxmox Community Scripts
This project integrates with the excellent community-scripts/ProxmoxVE repository to help users discover installation scripts for Proxmox VE containers and virtual machines.
Attribution:
Project: Proxmox VE Helper-Scripts
Repository: https://github.com/community-scripts/ProxmoxVE
Author: tteck (tteckster) and community contributors
License: MIT License
Website: https://helper-scripts.com
The Proxmox script integration tools (search_proxmox_scripts, get_proxmox_script_info) provide discovery and information about scripts from their repository. All scripts are copyright of their respective authors and distributed under the MIT License.
What we provide:
Script discovery and search functionality
Metadata parsing (CPU, RAM, disk requirements)
Download URLs and installation commands
We do not:
Host or redistribute their scripts
Modify their script content
Claim authorship of their work
Automate script execution (scripts are interactive and require user input)
All script information is fetched directly from their GitHub repository at runtime, ensuring you always get the latest versions with all community updates and security fixes.
Thank you to tteck and all contributors for maintaining this invaluable resource for the Proxmox community!
License
MIT License - see LICENSE file for details
Contributing
Fork the repository
Create a feature branch
Write tests for new functionality
Ensure all tests pass
Submit a pull request