Skip to main content
Glama
homelab-mcp

homelab-mcp

by Chain-P

homelab-mcp

Raspberry Pi homelab の状態を MCP サーバーとして公開します。つまり、MCP クライアント (Claude Code、Claude Desktop) に「homelab の調子はどう?」と尋ねるだけで、SSH でログインして手作業で確認する代わりに、実際の systemd サービスのヘルス、ディスク使用量、CPU 温度、LAN のゲームサーバーフィードを直接取得できます。

設計上読み取り専用です。すべてのツールは状態を照会するだけで、何かを再起動、停止、リブートすることはありません。

Claude Code が zero-bot が実行中かどうかを尋ね、実際の systemd の状態を取得している様子

アーキテクチャ

サーバーは MCP クライアントが動作するマシンではなく、Pi 自体 上で動作します。systemd ユニット、ディスク、温度センサーが実際に存在する場所だからです。MCP クライアントは SSH トンネル経由の stdio でサーバーに接続します。SSH はローカルの stdio プロセスをリモートクライアントに公開するだけで、MCP 側の特別なサポートは必要ありません。

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)

このプロジェクトが照会する Pi/homelab 構成の詳細な解説については、Chain-P/homelab を参照してください。

Related MCP server: Oraclarr

ツール

ツール

説明

system_summary()

ワンショットのヘルスチェック: ホスト名、稼働時間、ロードアベレージ、ディスク使用量、CPU 温度、既知の全サービスの状態。

service_status(name)

1 つのサービス (tracker-app、coinbot、zero-bot、zero-two) の詳細な systemd 状態。

disk_usage(path="/")

ファイルシステムパスの合計/使用済み/空きバイト数と使用率。

game_server_status()

Windows ボックスの既存のゲームサーバー状態フィード (Minecraft/Zomboid/Terraria ホスト) をプロキシします。

service_status は上記の既知の 4 つのユニット名のみを受け付けます。MCP ツールのスキーマ自体が、ツール本体が実行される前にそれ以外を拒否します。

要件

  • Python 3.10+ (Pi のシステム Python は 3.9 のため、下記の uv を使用)

  • systemctl と /sys/class/thermal/thermal_zone0/temp センサーを備えた Linux

  • このサーバーが動作するホストへの SSH キーアクセス

インストールと実行 (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

MCP クライアントでの設定

サーバーは Pi 上にあり、クライアントは別の場所で実行されるため、SSH 経由で呼び出します:

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

次に、クライアントに「homelab の調子はどう?」や「tracker-app は動いている?」などと尋ねます。

開発

テストはすべてのハードウェア/systemd 依存関係 (subprocess.run、/sys/class/thermal/...、/proc/uptime、ゲームサーバーの HTTP 呼び出し) をモックするため、CI と Pi の両方で同じように実行されます。実際の systemd の状態は必要ありません:

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

ロードマップ

  • 既知のサービスのログテーリング。

  • 変更を加えるツール (サービスの再起動) — 意図的に v1 には含めていません。まず読み取り専用にし、状態を変更するものは別途、明示的にゲートします。

ライセンス

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