MCP server for homelab VM infrastructure management with service installation framework
Project description
Homelab MCP Server
AI-Powered Homelab Infrastructure Management via the Model Context Protocol
A Python MCP server that enables AI assistants to manage, deploy, and monitor homelab infrastructure. Tools span SSH discovery, VM management, service installation, network topology mapping, Proxmox operations, and credential management.
Key Features
- SSH Discovery -- Gather comprehensive hardware and software information from any system
- Service Installation -- Deploy Jellyfin, Pi-hole, Ollama, Home Assistant, and more from templates
- Proxmox Integration -- Full API access plus community script discovery
- VM/Container Lifecycle -- Deploy, control, and remove Docker and LXD workloads
- Network Mapping -- Discover devices, analyze topology, and track changes
- Terraform and Ansible -- State-managed deployments with drift detection and playbooks
- Credential Management -- Register servers once, connect without re-entering credentials
Quick Start
# Install uv (ultra-fast Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and run
git clone https://github.com/washyu/homelab_mcp.git
cd homelab_mcp
uv sync && uv run python run_server.py
For the full walkthrough (environment variables, MCP client configuration, first tool call), see the Setup Guide.
Documentation
| Guide | Description |
|---|---|
| Setup Guide | From zero to first tool call |
| Tool Reference | All tools with arguments and examples |
| Configuration | Environment variables and CLI options |
| Claude Desktop Setup | Claude Desktop integration guide |
How It Works
- Setup -- The server generates an SSH key pair on first run (
~/.ssh/mcp_admin_rsa) - Onboard a host -- Use
setup_mcp_adminto create a managed user on the target system - Verify -- Use
verify_mcp_adminto confirm passwordless SSH access - Manage -- Discover hardware, install services, control VMs, and map your network
The server communicates over stdio using the MCP protocol. Connect it to any MCP-compatible client (Claude Desktop, etc.) and interact through natural language.
MCP Client Configuration
{
"mcpServers": {
"homelab": {
"command": "uv",
"args": ["run", "python", "run_server.py"],
"cwd": "/path/to/homelab_mcp"
}
}
}
Development
# Install with dev dependencies
uv sync --group dev
# Run tests (unit only, no Docker required)
uv run pytest tests/ -m "not integration"
# Code quality
uv run ruff check src/ tests/
uv run mypy src/
See DEPLOYMENT.md for production deployment details.
Project Structure
src/homelab_mcp/
server.py # MCP server with JSON-RPC protocol
tool_schemas/ # Tool definitions (7 schema files)
tool_annotations.py # MCP annotation hints per tool
ssh_tools.py # SSH discovery and hardware detection
service_installer.py # Service installation framework
infrastructure_crud.py # Infrastructure lifecycle management
vm_operations.py # VM/container operations
sitemap.py # Network topology mapping
database.py # SQLite device tracking
service_templates/ # YAML service definitions
tests/ # Unit and integration tests
docs/ # Full documentation
Acknowledgments
Proxmox community script integration powered by community-scripts/ProxmoxVE (MIT License).
Contributing
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
MIT License -- see LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file homelab_mcp-1.3.0.tar.gz.
File metadata
- Download URL: homelab_mcp-1.3.0.tar.gz
- Upload date:
- Size: 879.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
638addbe7b1864cc1e05a293763aac7c4765c0a2fc6e648910649babfc016824
|
|
| MD5 |
3260d9a316b9a38da4d01509d8f006ec
|
|
| BLAKE2b-256 |
c20f0ea1ab730a03fde75ad5e48d3a0ef1b8031365e808c32a71d0941a8dab63
|
Provenance
The following attestation bundles were made for homelab_mcp-1.3.0.tar.gz:
Publisher:
main.yml on washyu/homelab_mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
homelab_mcp-1.3.0.tar.gz -
Subject digest:
638addbe7b1864cc1e05a293763aac7c4765c0a2fc6e648910649babfc016824 - Sigstore transparency entry: 1107157538
- Sigstore integration time:
-
Permalink:
washyu/homelab_mcp@9145ddb73f3e4ce7e9d6e9ba9b564db242bb9fad -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/washyu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@9145ddb73f3e4ce7e9d6e9ba9b564db242bb9fad -
Trigger Event:
push
-
Statement type:
File details
Details for the file homelab_mcp-1.3.0-py3-none-any.whl.
File metadata
- Download URL: homelab_mcp-1.3.0-py3-none-any.whl
- Upload date:
- Size: 159.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73a3e5492311c1a0931e4fecf61871b09af326f37ad467b6bab5b48f8e852c45
|
|
| MD5 |
282be29bbbaced0ff7b8094fb51e2fc6
|
|
| BLAKE2b-256 |
9382bd31975a4fe9f2e260f4a1d53d8343bdac9862c49245d9492e0799e70ed5
|
Provenance
The following attestation bundles were made for homelab_mcp-1.3.0-py3-none-any.whl:
Publisher:
main.yml on washyu/homelab_mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
homelab_mcp-1.3.0-py3-none-any.whl -
Subject digest:
73a3e5492311c1a0931e4fecf61871b09af326f37ad467b6bab5b48f8e852c45 - Sigstore transparency entry: 1107157542
- Sigstore integration time:
-
Permalink:
washyu/homelab_mcp@9145ddb73f3e4ce7e9d6e9ba9b564db242bb9fad -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/washyu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@9145ddb73f3e4ce7e9d6e9ba9b564db242bb9fad -
Trigger Event:
push
-
Statement type: