Skip to main content
Glama

A self-hosted Model Context Protocol server that gives an AI assistant a safe, structured way to run a real multi-host homelab — Docker, Proxmox, systemd, files over SSH, Home Assistant, Cloudflare, OPNsense, and any HTTP API service you configure.

It ships 71 tools today, but the headline isn't the count. It's the security model: the assistant operates everything through server-side proxy tools, so API keys, SSH private keys, and tokens never enter its context.


Why this server

Most "let an LLM manage my infra" setups hand the model a credential and let it build curl commands. Every key then lives in the model's context, gets logged, and can leak into a transcript. This server is built the opposite way:

  • Credentials stay server-side. The model calls homelab_api_get("radarr", "/system/status"); the server attaches the key from an environment variable and returns only the response. The key is never seen. → Security model

  • Config-driven, not hard-wired. Hosts, services, allowlists, and tool sets are all defined in config.yaml and environment variables. Point it at your own homelab and the same tools operate it — no code changes. → Configuration

  • Capability tracks reachability. The same image runs at three trust levels: a full-power LAN-only instance, a read-only token-gated instance for public access, and a read-only LAN instance for untrusted clients — all from environment variables. → Deployment profiles

  • Writes are opt-in. Everything is read-biased by default; mutations are gated by per-path allowlists and an explicit confirmation flag.

Related MCP server: homelab-mcp

What it can do

A few representative tools — see the full catalog for all 71:

homelab_api_get("sonarr", "/series")        # call any configured API, key-safe
docker_ps(host="docker-server")             # manage ~40 containers
proxmox_snapshot_create(vmid=110)           # snapshot a VM before a change
ha_get_state("sensor.living_room_temp")     # read Home Assistant
loki_query('{container="caddy"} |= "404"')  # query logs with LogQL
read_file("/etc/caddy/Caddyfile", host="nas")
get_screenshot()                            # fetch the latest screenshot from any configured host, as an image

Tool families: Host/Shell · Docker · Systemd · Files (SFTP) · Screenshots · Proxmox · Home Assistant · Caddy/OPNsense · Cloudflare · Loki · Media · HTTP API proxy.

Tech stack

Python 3.12 · FastMCP for tool registration · Streamable HTTP (stateless) transport on Uvicorn + Starlette with custom auth middleware · Paramiko for SSH/SFTP · Requests for service APIs · packaged with Docker Compose, running non-root with read-only secret mounts.

The whole server is one server.py; a tool is just a decorated Python function. → Architecture & design

The homelab it drives

Built to run a real environment: a Proxmox cluster, an OPNsense router with a Caddy reverse-proxy plugin, a Docker host of ~40 containers, a NAS, Home Assistant, Grafana/Loki/InfluxDB observability, and Cloudflare Tunnel + Zero Trust Access for the few services that face the internet. Each host is one block in config.yaml. → More on the homelab

Quick start

Requirements: Docker + Docker Compose on the host that will run the server, and SSH key access to each machine you want to manage.

git clone https://github.com/MrGibbage/local-mcp-server
cd local-mcp-server

cp config.example.yaml config.yaml      # define your hosts + services
mkdir -p keys && cp ~/.ssh/id_rsa keys/ # SSH keys, mounted read-only

docker compose up -d

Connect a client (Claude Code shown; the server speaks Streamable HTTP at /mcp):

claude mcp add homelab --transport http http://<server-ip>:8090/mcp

Full walkthrough — keys, env vars, public access via Cloudflare Tunnel — is in docs/configuration.md and deployment.md.

Documentation

Page

What's inside

Architecture & design

Tech stack, design rationale, the homelab it drives

Configuration

config.yaml, the API proxy, allowlists, deployment profiles

Security model

How credentials stay out of the model's context

Tool catalog

All 71 tools, grouped

Deployment

Public access over Cloudflare Tunnel

License

MIT — © Skip Morrow

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to manage homelab infrastructure through automated service installation (Jellyfin, Pi-hole, Ollama, Home Assistant, Frigate NVR), VM operations, AI accelerator support (MemryX, Coral TPU, Hailo-8), and Terraform state management with SSH-based discovery and deployment.
      58
      5
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables assistants to operate a home lab through one authenticated HTTPS endpoint, including managing Proxmox VMs and containers, Home Assistant and ESPHome devices, Docker, shell access over SSH, Fully Kiosk tablets, and network discovery.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to manage Proxmox VMs and LXC containers, host port forwarding, internal dnsmasq DNS, and Caddy sites through natural language, including diff previews and rollback-aware reloads.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to inspect and safely operate a Linux VPS through typed DevOps tools governed by YAML allowlists, read-only defaults, dry-run plans, secret redaction, and tamper-evident auditing.
      MIT