homelab-mcp
homelab-mcp
将 Raspberry Pi homelab 状态以 MCP 服务器的形式暴露出来——这样你就可以向 MCP 客户端(Claude Code、Claude Desktop)询问“homelab 现在怎么样?”,并直接获得真实的 systemd 服务健康状态、磁盘用量、CPU 温度以及局域网游戏服务器信息,而不是 SSH 登录进去手动检查。
按设计为只读:每个工具都只查询状态,不会执行任何重启、停止或重启动操作。

架构
服务器运行在 Pi 本身上——而不是运行 MCP 客户端的机器上——因为 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
工具
工具 | 描述 |
| 一次性健康检查:主机名、运行时间、负载平均值、磁盘用量、CPU 温度,以及所有已知服务的状态。 |
| 单个服务的详细 systemd 状态: |
| 文件系统路径的总/已用/可用字节数及使用百分比。 |
| 代理 Windows 机器现有的游戏服务器状态数据源(Minecraft/Zomboid/Terraria 主机)。 |
service_status 只接受上面列出的四个已知单元名称——MCP 工具 schema 本身会在工具主体运行之前就拒绝任何其他名称。
要求
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路线图
为已知服务增加日志 tail(尾部跟踪)功能。
一个会改变状态的工具(重启服务)——刻意不包含在 v1 中;以只读为先,任何改变状态的操作都要单独且明确地加以管控。
许可证
MIT
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
- AlicenseAqualityCmaintenanceAn MCP server exposing 72 tools across 26 homelab services, enabling LLMs to monitor and manage infrastructure, media, storage, and networking with a single endpoint.16MIT
- AlicenseNot gradedqualityBmaintenanceA 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.Apache 2.0
- FlicenseNot gradedqualityBmaintenanceLets an LLM client monitor devices, services, disk usage, and uptime in a home network and home lab.
- FlicenseNot gradedqualityBmaintenanceMCP server for Raspberry Pi exposing tools for host health checks, shell execution, and Docker container restarts over authenticated HTTP.1
Related MCP Connectors
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
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/Chain-P/homelab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server