Your homelab, legible to AI agents — a read-only MCP server that rides along with your monitor
i keep a monitoring container on my homelab — it reads nvidia-smi, the docker api, systemd and /proc, and turns it into one page. the boring kind of dashboard: what's using the gpu, what it costs, what's filling the disk
i keep a monitoring container on my homelab — it reads nvidia-smi, the docker api, systemd and /proc, and turns it into one page. the boring kind of dashboard: what's using the gpu, what it costs, what's filling the disk.
last month i started running agents on the box, and i hit a wall that i think most people will hit: the agent couldn't see my homelab. it could run commands, but it couldn't see — which model is holding the 3090, why the temperature is climbing, what the month cost in energy. i'd have to paste screen output into the chat by hand, and the agent was guessing about the rest.
the data was already there. the monitor was reading all of it, every few seconds, into a sqlite database. what was missing was just a standard way to hand it over.
so i added a read-only MCP server to the same container. it comes up on port 9810, and the whole setup is one line:
claude mcp add --transport http homelab http://YOUR-HUB:9810/mcp
nineteen named tools, all read-only: hosts, containers, services, per-card gpu state and which process is on which card, per-process ram, the model servers, installed models, energy cost, benchmark runs, disk treemaps, history, alerts. that's the same coverage the dashboard has — the server is just the same database with an MCP face on it.
what this actually gets you:
- "which model is eating vram right now, and on which card?" — it reads the per-card split, not one pooled number. on my 3x3090 box a 63gb model shows as 22.5 / 22.1 / 18.8.
- "what did the last week of inference cost me?" — it has the power integration, so it's a measured number, not a guess.
- "is anything down?" — the uptime checks and alerts are tools too.
- "what's filling the disk on the pi?" — the treemap, on demand, over the same ssh connection everything else uses.
a few things i'm deliberately not doing:
- no writes. both directions are question and answer. the agent can look around the lab, it can't restart anything. (the dashboard itself has controls, but the mcp surface is read-only on purpose — an agent that can see your lab is already trusted, and i didn't want to make it responsible.)
- no extra install on the remote boxes. the monitor already polls them over ssh with nothing persisted, and the mcp server just reads what the monitor has.
- no cloud. the server is on your lan, same as the dashboard. point a local ollama agent at it and nothing leaves the house.
the monitor is open source, mit, one container: github.com/SikamikanikoBG/homelab-monitor — and the mcp part is on by default (enable_mcp=0 turns it off). if you run a homelab and you're pointing agents at it, i'd be curious what you'd ask it first.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.