
用于管理 Zigbee2MQTT 庄园的 MCP 服务器:健康报告、网状诊断、OTA 更新、配对、绑定以及通过 MQTT 桥接 API 实现的设备选项。
概览
Zigbee2MQTT 庄园的模型上下文协议服务器。 大多数 Zigbee 集成已经允许助理开灯。这个是针对底层的:网状健康、弱环节、不断重新连接的设备、过期电池、固件更新、配对、绑定、报告间隔和设备选项——这些都是你通常打开 Zigbee2MQTT 前端来处理的。 它直接与 Zigbee2MQTT 桥接 API 通信,所以无论你使用 Home Assistant、Node-RED、openHAB 还是其他软件,都能正常工作。测试对象是 Zigbee2MQTT 2.x;有几个工具依赖只存在于该端点的桥接端点,包括桥接/健康、设备/绑定/清除以及 OTA 调度主题。 如果你已经运行了 Home Assistant,你的 Zigbee 设备会暴露在那里,助手可以控制它们。但 Home Assistant 不会暴露的是桥接器本身:链路质量、网状拓扑、访谈状态、OTA 可用性、permit_join、设备选项、绑定和报告配置。
概述(AI 翻译)
A Model Context Protocol server for administering a Zigbee2MQTT estate.
大多数 Zigbee 集成已经允许助理开灯。这个是针对底层的:网状健康、弱环节、不断重新连接的设备、过期电池、固件更新、配对、绑定、报告间隔和设备选项——这些都是你通常打开 Zigbee2MQTT 前端来处理的。
它直接与 Zigbee2MQTT 桥接 API 通信,因此无论你使用 Home Assistant、Node-RED、openHAB 还是其他工具,都能正常工作。测试对象是 Zigbee2MQTT 2.x;有几个工具依赖于仅存在于该端点的桥接端点,包括 bridge/health、device/binds/clear 以及 OTA 调度主题。
为什么会有这样的存在
如果你已经运行 Home Assistant,你的 Zigbee 设备会暴露在那里,助手可以控制它们。Home Assistant 不会暴露的是桥接器本身:链路质量、网格拓扑、访谈状态、OTA 可用性、permit_join、设备选项、绑定和报告配置。这台服务器正好填补了这个空白。
设计
- **没有数据库。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
zigbee2mqtt-mcp
A Model Context Protocol server for administering a Zigbee2MQTT estate.
Most Zigbee integrations already let an assistant turn a light on. This one is for the layer underneath: mesh health, weak links, devices that keep rejoining, stale batteries, firmware updates, pairing, binding, reporting intervals and device options — the things you normally open the Zigbee2MQTT frontend for.
It talks directly to the Zigbee2MQTT MQTT bridge API, so it works regardless of whether you use Home Assistant, Node-RED, openHAB or nothing at all. Tested against Zigbee2MQTT 2.x; several tools depend on bridge endpoints that only exist there, including bridge/health, device/binds/clear and the OTA scheduling topics.
Why this exists
If you already run Home Assistant, your Zigbee devices are exposed there and an assistant can control them. What Home Assistant does not expose is the bridge itself: link quality, mesh topology, interview state, OTA availability, permit_join, device options, bindings and reporting configuration. This server fills exactly that gap.
Design
- No database. Zigbee2MQTT publishes its bridge topics as retained messages, so a fresh subscription yields a complete picture in a few hundred milliseconds. The server keeps only the latest payload per topic in memory.
- No daemon. Pure stdio. It starts and dies with the MCP session.
- Correlated requests. Every
bridge/request/*carries atransactionid and is matched to itsbridge/response/*, so concurrent calls cannot cross wires. - Tiered writes. Destructive operations are gated behind a write mode and an explicit
confirmargument.
Install
Requires Node.js 22 or newer and network access to the MQTT broker that Zigbee2MQTT uses.
npx zigbee2mqtt-mcp
VS Code / GitHub Copilot
Add to your MCP configuration:
{
"servers": {
"zigbee2mqtt": {
"command": "npx",
"args": ["-y", "zigbee2mqtt-mcp"],
"env": {
"Z2M_MQTT_URL": "mqtt://192.168.1.10:1883",
"Z2M_MQTT_USERNAME": "mqtt",
"Z2M_MQTT_PASSWORD": "${input:z2mPassword}"
}
}
}
}
Claude Desktop
{
"mcpServers": {
"zigbee2mqtt": {
安装
npx -y zigbee2mqtt-mcp配置
{
"mcpServers": {
"zigbee2mqtt": {
"command": "npx",
"args": ["-y", "zigbee2mqtt-mcp"],
"env": {
"Z2M_MQTT_URL": "mqtt://192.168.1.10:1883"
}
}
}
}