Skip to main content
Glama
homelab-mcp

homelab-mcp

by Chain-P

homelab-mcp

Raspberry-Pi-Homelab-Status, bereitgestellt als MCP-Server – sodass man einen MCP-Client (Claude Code, Claude Desktop) fragen kann: „Wie läuft das Homelab?“ und echte systemd-Dienstzustände, Festplattenauslastung, CPU-Temperatur und den LAN-Game-Server-Feed direkt zurückbekommt, anstatt sich per SSH einzuloggen und manuell nachzusehen.

Konzeptionell schreibgeschützt: Jedes Tool fragt lediglich Zustände ab; nichts wird neu gestartet, gestoppt oder neu gebootet.

Claude Code fragt, ob zero-bot läuft, und erhält echten systemd-Status zurück

Architektur

Weil sich die systemd-Units, die Festplatte und der Temperatursensor tatsächlich auf dem Pi befinden, läuft der Server auf dem Pi selbst – nicht auf dem Rechner, auf dem der MCP-Client läuft. Der MCP-Client erreicht ihn über SSH-getunneltes stdio: SSH stellt lediglich einen lokalen stdio-Prozess einem entfernten Client bereit, ohne dass spezielle MCP-seitige Unterstützung nötig wäre.

MCP client (laptop) --ssh--> homelab-mcp server (on the Pi) --> systemctl / /sys/class/thermal / /proc/uptime
                                                            \--> HTTP GET to the LAN game-server status feed (192.168.1.111:8091)

Siehe Chain-P/homelab für die ausführliche Dokumentation des Pi-/Homelab-Setups, das dieses Projekt abfragt.

Related MCP server: Oraclarr

Tools

Tool

Beschreibung

system_summary()

Einmaliger Health-Check: Hostname, Uptime, Load Average, Festplattenauslastung, CPU-Temperatur und der Status jedes bekannten Dienstes.

service_status(name)

Detaillierter systemd-Status für einen Dienst: tracker-app, coinbot, zero-bot oder zero-two.

disk_usage(path="/")

Gesamt-/belegte/freie Bytes und prozentuale Auslastung für einen Dateisystempfad.

game_server_status()

Leitet den vorhandenen Game-Server-Status-Feed der Windows-Box weiter (Minecraft/Zomboid/Terraria-Host).

service_status akzeptiert nur die vier oben genannten bekannten Unit-Namen – das MCP-Tool-Schema selbst lehnt alles andere ab, bevor der Tool-Body überhaupt ausgeführt wird.

Anforderungen

  • Python 3.10+ (das System-Python des Pi ist 3.9, daher uv weiter unten)

  • Linux mit systemctl und einem Sensor unter /sys/class/thermal/thermal_zone0/temp

  • SSH-Schlüsselzugriff auf den Host, auf dem dieses Projekt läuft

Installation & Ausführung (auf dem Pi)

curl -LsSf https://astral.sh/uv/install.sh | sh   # installs uv, no root needed
uv python install 3.12
git clone https://github.com/Chain-P/homelab-mcp.git
cd homelab-mcp
uv venv --python 3.12 venv
venv/bin/pip install -e .
venv/bin/homelab-mcp   # smoke test — should hang waiting on stdio, Ctrl+C to stop

In einem MCP-Client konfigurieren

Da der Server auf dem Pi läuft und der Client woanders, rufe ihn per SSH auf:

{
  "mcpServers": {
    "homelab": {
      "command": "ssh",
      "args": ["pi@zero.local", "/home/pi/homelab-mcp/venv/bin/homelab-mcp"]
    }
  }
}

Dann frag den Client so etwas wie: „Wie läuft das Homelab?“ oder „Läuft tracker-app?“

Entwicklung

Tests mocken jede Hardware-/systemd-Abhängigkeit (subprocess.run, /sys/class/thermal/..., /proc/uptime, den HTTP-Aufruf des Game-Servers), sodass sie in CI und auf dem Pi identisch laufen – kein echter systemd-Zustand erforderlich:

pip install -e ".[dev]"
ruff check .
pytest

Roadmap

  • Log-Tailing für die bekannten Dienste.

  • Ein Tool, das Zustände verändert (einen Dienst neu starten) – bewusst nicht in v1; zuerst nur lesend, alles, was den Zustand verändert, separat und explizit absichern.

Lizenz

MIT

Available Tools

4 tools
disk_usageA

Get disk usage (total/used/free bytes, percent used) for a filesystem path on the Pi.

NameRequiredDescriptionDefault
pathNo/

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. The verb 'Get' makes the read-only nature clear and the returned quantities are explicitly disclosed; however, invalid-path behavior and path-vs-mount-point semantics are not addressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that conveys the action, target, and output payload with no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter read-only tool with no output schema, the description provides enough to select and invoke it: what it computes, the input path, and the returned totals/percent. The notable gaps are usage routing and path edge-case behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds that 'path' is a filesystem path on the Pi, but it leaves important details unspecified, such as whether the path should be a directory or mount point and what path formats are accepted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('disk usage'), and specifies the return content (total/used/free bytes, percent used) for a filesystem path on the Pi. This clearly differentiates it from the sibling service/status/system tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states what the tool does but gives no guidance about when to choose it over system_summary, service_status, or game_server_status, and lists no prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

game_server_statusA

Get the current game-server status feed from the LAN Windows box (Minecraft/Zomboid/Terraria host).

NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. The verb 'Get' implies a non-destructive read operation, and the mention of a 'status feed' gives some sense of outputs, but it does not disclose what the feed contains, how current it is, or any network/latency implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single efficient sentence that front-loads the action and resource, then adds parenthetical clarity about the host types. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless status-retrieval tool, the description is largely complete: it states what is being retrieved and from where. It could optionally mention the format or content of the status feed, but the absence of parameters and output schema makes the description adequate for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, so parameter semantics are trivially satisfied. The description still adds useful context about what resource the parameterless call accesses, matching the baseline of 4 for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and names a precise resource: the current game-server status feed from the LAN Windows box, explicitly identifying Minecraft/Zomboid/Terraria. This clearly distinguishes it from siblings like service_status, disk_usage, and system_summary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: when the agent needs the current game-server status feed. It does not explicitly name alternatives or exclusions, but the resource scope is specific enough to avoid real confusion with the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

service_statusA

Get detailed systemd status (active state, uptime, memory) for one known homelab service.

Args: name: Which service to query: tracker-app, coinbot, zero-bot, or zero-two.

NameRequiredDescriptionDefault
nameYes

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It clearly indicates a read-only operation via Get and enumerates the returned data: active state, uptime, and memory. It does not mention error behavior or prerequisites, but for a simple status query this is a minor gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: a single front-loaded summary sentence followed by a focused parameter explanation. There is no redundant or fluffy content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter tool with an enum constraint and no output schema, the description is nearly complete: it states the input options, the output fields, and the scope. It could mention the response format or failure behavior, but those are minor for this level of complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. The Args section defines name as the service to query and lists the four valid values, which adds real semantic meaning beyond the bare enum. It does not explain what each service is, but that is not necessary for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: Get detailed systemd status for one known homelab service, including active state, uptime, and memory. This clearly states what the tool does. It does not explicitly distinguish itself from sibling tools, but the resource scope is specific enough to make the purpose clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus its siblings like disk_usage, game_server_status, or system_summary. The phrase one known homelab service adds scope but does not explain selection criteria, exclusions, or alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

system_summaryA

One-shot homelab health check: hostname, uptime, load average, disk usage, CPU temp, and every service's status.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently lists the types of information gathered and signals non-interactive, one-shot behavior, but it does not explicitly state whether the operation is read-only, whether it may require elevated permissions (e.g., for CPU temp), or how it handles unavailable data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that immediately communicates the tool's purpose and then concisely lists its contents. There is no filler, repetition, or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and no output schema, the description does enough by enumerating what the agent can expect in the result. It is sufficient for a simple health-check call, though it could be slightly richer by noting the status format or that services include game_server_status, a sibling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is no parameter semantic burden on the description. The baseline of 4 for parameterless tools applies: there is nothing the description must add about arguments, and the empty schema is not a gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as a one-shot homelab health check and enumerates the data it returns: hostname, uptime, load average, disk usage, CPU temp, and service statuses. It implies differentiation from the sibling tools by covering aggregate health rather than a single subsystem, though it does not explicitly name siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'one-shot homelab health check' implies this is the tool to use for a quick overall snapshot, but the description gives no explicit guidance on when to use it versus service_status, disk_usage, or game_server_status. It provides context but no exclusion criteria or alternative routing.

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.

  1. 4 tool updatesv0.1.0
    • First observeddisk_usage
    • First observedgame_server_status
    • First observedservice_status
    • First observedsystem_summary

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation3/5

Most tools have clear targets, but system_summary overlaps with service_status and disk_usage by bundling both into one health check. game_server_status is distinct, though it could also be considered part of the overall summary. Descriptions are clear enough to avoid serious misselection.

Naming Consistency4/5

All tool names use clear snake_case noun phrases like service_status, disk_usage, and game_server_status. The pattern is consistent in style, with system_summary being a slight semantic deviation but still readable and predictable.

Tool Count4/5

Four tools is on the smaller side but well-scoped for a focused homelab status/health server. Each tool provides a meaningful query with no redundant bloat.

Completeness4/5

The domain is read-only homelab monitoring, and the set covers per-service status, disk usage, game-server status, and an aggregated health summary. Logs or service controls are absent but not essential for the apparent purpose.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A locally-run, read-only MCP server that lets an LLM client diagnose a self-hosted *arr media stack by aggregating across Sonarr, Radarr, Prowlarr, qBittorrent, Tdarr, and Profilarr.
    209 PyPI
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Lets MCP clients (Claude Code, Claude Desktop) inspect a Linux home server's health over the network: uptime, load, memory, disk, Docker containers, systemd services, journal errors, and listening ports. Read-only, bearer-token secured.
    MIT