homelab-mcp
Click on "Deploy 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-mcplist all LXC containers on node pve"
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
Coleccion de servidores MCP (Model Context Protocol) para gestionar un homelab con Proxmox, Linux, Windows, Docker, npm y Python.
Cada dominio corre como proceso independiente via stdio, se integra con Claude Code y cualquier cliente MCP compatible.
Estructura
homelab-mcp/
├── homelab_mcp/
│ ├── config.py # Configuracion centralizada (.env + multi-nodo)
│ ├── base.py # Factory del servidor MCP + logging
│ ├── logging_conf.py # Setup de logging
│ ├── utils/
│ │ ├── paths.py # safe_path — sandbox de rutas
│ │ ├── subprocess_safe.py # run_safe — ejecucion con whitelist
│ │ ├── responses.py # ok() / error() / needs_confirmation()
│ │ └── claude_md_parser.py # Extrae config Proxmox de CLAUDE.md
│ ├── proxmox_mcp/server.py # Multi-nodo (pve, pve2, pve3...)
│ ├── linux_mcp/server.py
│ ├── windows_mcp/server.py
│ ├── docker_mcp/server.py
│ ├── npm_mcp/server.py
│ └── python_mcp/server.py
├── bin/
│ └── auto-config-from-claude.sh # Genera .env + proxmox_nodes.json
├── scripts/ # Lanzadores individuales y paralelo
├── tests/
├── .env.example
└── pyproject.tomlRelated MCP server: nandi-proxmox-mcp
Instalacion
git clone https://github.com/CTRQuko/homelab-mcp.git
cd homelab-mcp
cp .env.example .env # edita los valores reales
pip install -e .
# Con herramientas de desarrollo:
pip install -e ".[dev]"
# Solo tests:
pip install -e ".[test]"Auto-config desde CLAUDE.md
Si ya tienes configuracion Proxmox en ~/.claude/CLAUDE.md y tokens en un fichero de secrets:
bash bin/auto-config-from-claude.shEsto genera automaticamente:
.envcon el nodo primario y todas las variablesproxmox_nodes.jsoncon todos los nodos detectados
Solo necesitas verificar que los valores son correctos.
Variables de entorno (.env)
# Proxmox API token (nodo primario)
PROXMOX_HOST=192.168.1.X
PROXMOX_USER=user@pam
PROXMOX_TOKEN_NAME=my-token
PROXMOX_TOKEN_VALUE=REEMPLAZAR
# Multi-nodo (opcional): fichero JSON con todos los nodos
# Generado por: bash bin/auto-config-from-claude.sh
# PROXMOX_NODES_FILE=proxmox_nodes.json
# Sandbox Linux (read/write dentro de esta ruta)
LINUX_BASE_PATH=/srv/homelab
# Sandbox Windows
WINDOWS_BASE_PATH=C:/homelab
# npm / Python sandboxes
NPM_BASE_PATH=.
PYTHON_BASE_PATH=.
# Docker socket (opcional)
DOCKER_HOST=unix:///var/run/docker.sock
# Nivel de log: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFOMulti-nodo Proxmox
Con PROXMOX_NODES_FILE=proxmox_nodes.json, los tools de Proxmox aceptan alias de nodo:
list_lxc("node1")→ conecta al primer nodolist_lxc("node2")→ conecta al segundo nodolist_lxc("node3")→ conecta al tercer nodo
Sin el fichero JSON, todo usa el nodo unico de PROXMOX_HOST.
Ejecucion manual
homelab-proxmox-mcp
homelab-linux-mcp
homelab-windows-mcp
homelab-docker-mcp
homelab-npm-mcp
homelab-python-mcpIntegracion en mcp.json
{
"mcpServers": {
"homelab-proxmox": {
"command": "homelab-proxmox-mcp",
"args": []
},
"homelab-linux": {
"command": "homelab-linux-mcp",
"args": []
},
"homelab-windows": {
"command": "homelab-windows-mcp",
"args": []
},
"homelab-docker": {
"command": "homelab-docker-mcp",
"args": []
},
"homelab-npm": {
"command": "homelab-npm-mcp",
"args": []
},
"homelab-python": {
"command": "homelab-python-mcp",
"args": []
}
}
}Tools disponibles
Proxmox MCP
Tool | Descripcion |
| Lista nodos del cluster |
| CPU, memoria, uptime del nodo |
| VMs QEMU/KVM del nodo |
| Contenedores LXC del nodo |
| Estado de VM o LXC |
| Arrancar VM/LXC (requiere |
| Parar VM/LXC (requiere |
| Reiniciar VM/LXC (requiere |
Linux MCP
Tool | Descripcion |
| Leer fichero dentro del sandbox |
| Escribir fichero dentro del sandbox |
| Listar directorio |
| Comprobar existencia |
| Comando whitelisted (ls, cat, df, du, grep, find, head, tail...) |
Windows MCP
Tool | Descripcion |
| Leer fichero dentro del sandbox |
| Escribir fichero dentro del sandbox |
| Listar directorio |
| Comprobar existencia |
| PS de solo lectura (Get-*, Test-Path...) |
Docker MCP
Tool | Descripcion |
| Listar contenedores |
| Inspeccionar configuracion |
| Ultimas N lineas de logs |
| Reiniciar contenedor (requiere |
npm MCP
Tool | Descripcion |
| Dependencias desactualizadas |
| Vulnerabilidades |
| Arbol de dependencias |
Python MCP
Tool | Descripcion |
| Version Python del servidor |
| Ejecutar tests |
| Linting con ruff |
| Paquetes instalados |
Tests
pytest83 tests cubriendo todos los MCPs, utilidades y configuracion.
Seguridad
Sandboxes por MCP
MCP | Variable .env | Default | Aplicado en |
Linux |
|
|
|
Windows |
|
|
|
npm |
|
|
|
Python |
|
|
|
Docker | — | — | No aplica (trabaja con nombres de contenedores) |
Proxmox | — | — | No aplica (trabaja con la API autenticada) |
Medidas de seguridad
Sandbox de rutas: Linux, Windows, npm y Python MCP validan que todas las rutas se resuelvan dentro del directorio base configurado. Path traversal (
../..) es rechazado usandoPath.relative_to().Whitelist de comandos:
run_command(Linux) solo permite binarios explicitamente listados. Los comandos se parsean conshlexy se ejecutan sinshell=True.PowerShell restringido: Solo verbos de lectura (
Get-*,Test-Path). Se bloquean pipes (|), punto y coma (;), ampersand (&), backticks, subexpresiones ($()), verbos destructivos (Remove-*,Set-*,Invoke-*, etc.) y binarios peligrosos (rm,del,cmd, etc.). Se ejecuta con-ExecutionPolicy Restricted -NonInteractive.Docker con confirmacion:
restart_containerrequiereconfirm=Trueexplicito. Sin el devuelve un aviso de confirmacion.Proxmox con confirmacion:
start_vm,stop_vmyrestart_vmrequierenconfirm=Trueexplicito. Se valida configuracion antes de conectar.Sin secretos hardcodeados: Todo por
.env, nunca en el codigo.
Limitaciones conocidas
run_safeno soporta rutas absolutas con espacios como nombre de binario (e.g.C:\Program Files\...). Esto es intencional: usa nombres simples (python,ls).run_powershellpasa el comando como string a-Command; la validacion cubre la mayoria de vectores pero un escape creativo de PowerShell podria evadirla en teoria.No hay autenticacion entre el cliente MCP y el servidor; la seguridad recae en el control de acceso al proceso.
Ejemplo mcp.json alternativo (con python -m)
Si prefieres invocar los servidores con python -m en lugar del entrypoint:
{
"mcpServers": {
"proxmox": {
"command": "python",
"args": ["-m", "homelab_mcp.proxmox_mcp.server"],
"env": { "PYTHONPATH": "/path/to/homelab-mcp" },
"type": "stdio"
},
"linux": {
"command": "python",
"args": ["-m", "homelab_mcp.linux_mcp.server"],
"env": { "PYTHONPATH": "/path/to/homelab-mcp" },
"type": "stdio"
},
"docker": {
"command": "python",
"args": ["-m", "homelab_mcp.docker_mcp.server"],
"env": { "PYTHONPATH": "/path/to/homelab-mcp" },
"type": "stdio"
},
"windows": {
"command": "python",
"args": ["-m", "homelab_mcp.windows_mcp.server"],
"env": { "PYTHONPATH": "/path/to/homelab-mcp" },
"type": "stdio"
},
"npm": {
"command": "python",
"args": ["-m", "homelab_mcp.npm_mcp.server"],
"env": { "PYTHONPATH": "/path/to/homelab-mcp" },
"type": "stdio"
},
"python": {
"command": "python",
"args": ["-m", "homelab_mcp.python_mcp.server"],
"env": { "PYTHONPATH": "/path/to/homelab-mcp" },
"type": "stdio"
}
}
}Contributing
See CONTRIBUTING.md for guidelines.
License
Available Tools
4 toolsget_container_logsB
Devuelve las últimas líneas de logs de un contenedor.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre o ID del contenedor. | |
| tail | No | Número de líneas a devolver (máx 1000). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description has the full burden of behavioral disclosure. It only states it returns logs but fails to indicate whether it is a read-only operation, any rate limits, or what happens if the container does not exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that is front-loaded and contains no unnecessary words, making it highly concise and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description covers the basic purpose, it lacks details on the output format or specific limitations beyond those implied by the tail parameter. Given the presence of an output schema, the description is minimally adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the description adds no additional meaning beyond the schema. The parameters 'name' and 'tail' are adequately described in the input schema, leading to a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool returns the last lines of logs of a container, effectively distinguishing it from sibling tools like list_containers, inspect_container, and restart_container.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, such as the container needing to exist or be running, nor any conditions under which it should be avoided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_containerB
Inspecciona un contenedor (configuración completa).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre o ID del contenedor. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool inspects a container and returns full configuration, but does not mention any side effects, authorization requirements, or response format. The output schema exists but is not referenced in the description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no unnecessary words. It is concise, but could be slightly improved by adding usage context without sacrificing brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of an output schema, the description only covers the basic purpose. It lacks context on when to use, behavioral details, and how it relates to siblings, making it incomplete for an agent to effectively decide.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single parameter 'name'. The description repeats the schema info ('Nombre o ID del contenedor') without adding new meaning, so it meets the baseline but adds no extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Inspects a container (full configuration)' clearly states the action (inspect), the resource (container), and the scope (full configuration). It distinguishes itself from sibling tools like list_containers (lists containers) and get_container_logs (retrieves logs).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, nor does it indicate when not to use it. The agent must infer usage from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_containersB
Lista contenedores Docker.
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Si True incluye contenedores parados. Por defecto solo running. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description implies a read-only operation ('list'), but does not explicitly state safety or any potential side effects. Since no annotations are provided, the description carries the full burden, but the behavior is clear enough for a list operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence that is front-loaded and contains no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one parameter and an existing output schema, the description is adequate. It covers the core purpose, though it could mention the default behavior (only running containers) already present in schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the single parameter 'all' has a clear description in the schema. The tool description does not add additional meaning beyond the schema, so baseline score is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists Docker containers, which is a specific verb+resource. However, it does not differentiate from sibling tools like inspect_container or get_container_logs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description does not provide context about selecting this tool over siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
restart_containerA
Reinicia un contenedor por nombre o ID.
REQUIERE confirm=True para ejecutar. Sin confirmación devuelve un aviso.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre o ID del contenedor. | |
| confirm | No | Debe ser True para ejecutar el restart. Por defecto False (dry run). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It discloses the confirm safety mechanism and dry-run behavior. However, it omits details like container runtime prerequisites or side effects, so transparency is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loading the action and then the key requirement. No wasted words, though the language (Spanish) could affect understandability in a mixed environment.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists but is not detailed in the description. The provided context (confirm requirement) is sufficient for a simple restart tool, but it lacks specifics on return values or error conditions, making it adequate but incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both parameters. The description adds 'by name or ID' to the name param and reiterates the confirm behavior. This adds marginal value beyond the schema, warranting a baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'restart a container by name or ID,' using a specific verb and resource. It distinguishes itself from sibling tools (list, inspect, logs) which are read-only.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly requires confirm=True to execute, indicating a dry-run behavior without it. This provides clear usage context but does not exclude alternatives or note when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.4.0- First observed
get_container_logs - First observed
inspect_container - First observed
list_containers - First observed
restart_container
TDQS
Scored across 4 tools
Each tool targets a distinct operation on Docker containers: listing, inspecting, retrieving logs, and restarting. No functional overlap exists.
All tool names follow a consistent verb_noun snake_case pattern (e.g., list_containers, inspect_container), making the set predictable.
With 4 tools, the set is slightly small but well-scoped for basic container management and monitoring. It could benefit from a few more operations, but it remains focused.
The tools cover observation (list, inspect, logs) and one action (restart), but lack fundamental operations like start, stop, or remove containers, leaving notable workflow gaps.
Maintenance
Related MCP Connectors
Create, deploy, and operate MCP servers directly from your GitHub repositories.
A MCP server built for developers enabling Git based project management with project and personal…
Search 77,000+ MCP servers ranked by real adoption data to find the right one for any task.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP servers for managing homelab infrastructure. Monitor Docker/Podman containers, Ollama AI models, Pi-hole DNS, Unifi networks, and Ansible inventory.40MIT
- AlicenseNot gradedqualityAmaintenanceAn open-source MCP server for managing Proxmox environments, including nodes, virtual machines, and containers. It enables users to perform inventory checks, status monitoring, and control operations directly through MCP-compatible tools.123MIT
- AlicenseNot gradedqualityDmaintenanceA Python-based MCP server for interacting with Proxmox hypervisors, enabling management of nodes, VMs, containers, and executing commands via QEMU Guest Agent.7MIT
- AlicenseNot gradedqualityCmaintenanceMCP server giving AI assistants full control of a Proxmox homelab, enabling management of VMs, containers, Docker projects, media stack, and monitoring via natural language.204MIT