homelab-mcp
Provides tools for listing Docker containers and retrieving their logs, enabling monitoring of container health and status on the homelab server.
Allows checking the status of the Jellyfin media server via systemd service status and journal errors, helping ensure it is running correctly.
Allows checking the status of the OpenVPN service via systemd service status and journal errors, helping ensure the VPN service is active.
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-mcpHow is the server? Any high load or recent errors?"
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
A local-network MCP server that lets an MCP client (Claude Code, Claude Desktop) inspect a Linux home server's health over the network — uptime, load, memory, disk space, Docker containers, systemd services, journal errors, and listening ports.
Built with FastMCP, the official Python MCP SDK's high-level server framework.
This server is strictly read-only. No tool it exposes can modify system state, restart a service, start/stop a container, or execute an arbitrary command. It exists purely so you can ask "why is my server using so much CPU right now?" or "did that container crash again?" from a Claude client, without SSHing in yourself.
Security model
Bearer token auth. Every request must include
Authorization: Bearer <token>. The token lives inHOMELAB_MCP_TOKEN(loaded from a.envfile, never committed) and is checked withhmac.compare_digestto avoid timing attacks. Missing or wrong tokens get a401.Read-only by design. Every tool is implemented with a safe, non-mutating API (
psutil,shutil.disk_usage,docker-py) or, where a subprocess is unavoidable (systemctl,journalctl), a fixed argument list withshell=Truenever used and any user-supplied parameter validated against a strict allowlist/regex before it touches the command line.No rate limiting or lockout. This server does not throttle or lock out repeated failed auth attempts. Do not expose it on the open internet, even with the token in place. Run it behind Tailscale or WireGuard, or bind it to a LAN-only / loopback interface via
HOMELAB_MCP_HOST. Treat the bearer token like a password: anyone who has it and can reach the port has full read access to your server's health data.
Related MCP server: infra-mcp
Setup
Requires Python 3.11+ and uv (or plain
pip).
git clone https://github.com/VedantDesai11/homelab-mcp.git
cd homelab-mcp
cp .env.example .env
# edit .env: set HOMELAB_MCP_TOKEN to a strong random value, e.g.
# python3 -c "import secrets; print(secrets.token_urlsafe(32))"
uv sync
# or: pip install -e .Running locally
uv run homelab-mcp
# or: uv run python -m homelab_mcp.serverBy default it binds 0.0.0.0:8811. Override with HOMELAB_MCP_HOST /
HOMELAB_MCP_PORT in .env or the environment. The server exits
immediately with a clear error if HOMELAB_MCP_TOKEN is unset.
The MCP endpoint is served at http://<host>:<port>/mcp over Streamable
HTTP.
Running via systemd
For a persistent deployment on the home server itself:
Copy the project to
/opt/homelab-mcp(or wherever you like) and runuv syncthere so/opt/homelab-mcp/.venvexists.Copy
.env.exampleto/opt/homelab-mcp/.envand fill in a real token.Run the installer as root:
sudo ./deploy/install.shThis creates a dedicated non-root
homelab-mcpsystem user (if it doesn't already exist), installsdeploy/homelab-mcp.serviceto/etc/systemd/system/, reloads systemd, and enables + starts the service (restarts automatically on failure).The installer also adds the service user to the
systemd-journalgroup (sorecent_journal_errorscan read the journal) and, if adockergroup exists on the host, to that too (solist_containers/container_logscan reach the Docker socket). If either group doesn't exist yet -- e.g. Docker isn't installed -- the installer skips it and says so; the corresponding tools will just report that data source as unavailable rather than failing the whole server.
Connecting Claude Code / Claude Desktop
Add an MCP server entry pointing at the running instance, with the bearer token as a header. For example, in Claude Code's MCP config:
{
"mcpServers": {
"homelab": {
"url": "http://your-server-hostname:8811/mcp",
"headers": {
"Authorization": "Bearer <your HOMELAB_MCP_TOKEN>"
}
}
}
}If you're on Tailscale, use the server's Tailscale hostname/IP so the connection never leaves your tailnet.
Tools
Tool | Description |
| Uptime, load average (1/5/15m), memory used/total, CPU count and utilization. |
| Total/used/free/percent disk space for a given mount path. |
| Name, image, status, and port mappings for all Docker containers (running and stopped). |
| Tail of logs for one named Docker container. |
| All systemd service units with their load/active/sub state. |
| Detailed |
| Recent journal entries at or above a given syslog priority. |
| Listening TCP/UDP sockets: local address, port, and owning process where permitted. |
What it looks like in practice
Once connected, the MCP client picks whichever tools are relevant to your question and calls them directly -- no manual tool selection needed.

Here's the same session as text, from Claude Code:
You: Use the homelab MCP server to check system status, disk usage, list systemd services, and check for recent journal errors.
Claude: I'll check system status, disk usage, services, and recent errors on the homelab server.
Called homelab 4 times
System status — healthy. Uptime ~28.6 days, load average near 0, memory 20.7% used (1.6GB/8GB), CPU idle.
Disk (/) — 354GB/501GB used, 70.7% full, 121GB free. Not critical, but worth watching.
Services — 188 systemd units. Two failed:
fwupd.service(firmware update daemon) andfwupd-refresh.service(fwupd metadata refresh). Everything else notable (docker, jellyfin, pihole-FTL, ssh, openvpn, NetworkManager) is active/running fine.Journal errors — retrieved cleanly (once the service user was added to the
systemd-journalgroup by the installer -- see below).Want me to look closer at the fwupd failures via
service_status?
Four tool calls (system_status, disk_usage, list_services,
recent_journal_errors), one natural-language question, zero SSH
sessions.
Gotcha we hit getting here: on the first run, recent_journal_errors
failed with a permissions error -- the dedicated homelab-mcp service
user isn't in the adm/systemd-journal groups by default, so
journalctl denied access even though the process itself was running
fine. deploy/install.sh now adds the service user to systemd-journal
automatically (see Running via systemd above),
so a fresh install via the installer shouldn't hit this. If you set the
service up by hand instead, run:
sudo usermod -aG systemd-journal homelab-mcp
sudo systemctl restart homelab-mcpDevelopment
uv sync --group dev
uv run pytestTests mock psutil, docker-py, and subprocess so the suite never
touches the real system, a real Docker daemon, or spawns real
subprocesses.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceThis MCP server provides read-only Linux system diagnostics tools for inspecting system information, processes, and log snapshots. It enables AI models to analyze Linux system health, troubleshoot issues, and review security through workflow prompts and HTTP transport with API key authentication.MIT
- AlicenseBqualityDmaintenanceMCP server that gives Claude Code real-time visibility into local infrastructure — Docker containers and system health.21MIT
- Alicense-qualityAmaintenanceMCP server that exposes live host metrics (CPU, memory, processes, network) to Cursor/Claude via /proc and optional eBPF, enabling system monitoring dashboards and natural language queries.MIT
- Flicense-qualityCmaintenanceRead-only diagnostic MCP server that exposes system stats, Docker status, OOM events, container logs, Sidekiq queues, and local Chatwoot health checks for Claude to review a Hetzner server.
Related MCP Connectors
Uptime, SSL, DNS and domain monitoring you can talk to from Claude or any MCP client.
Operate your Linux servers from your LLM. Every action runs through an auditable allowlist.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VedantDesai11/homelab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server