I kept opening the Zigbee2MQTT frontend to answer the same questions: what’s offline, which batteries are dying, which devices keep falling off the mesh, what has firmware updates pending. So I built an MCP server that exposes that layer to an AI assistant.
Why not just use a Home Assistant MCP server? If your Zigbee devices are in HA, an assistant can already control them. What HA doesn’t expose is the bridge itself: link quality, mesh topology, interview state, OTA availability, permit_join, bindings, reporting intervals and device options. That gap is the point of this.
There are at least two other Zigbee2MQTT MCP servers worth knowing about. mcp-server runs inside Zigbee2MQTT as an external extension (marked unstable), and loryanstrant/Zigbee2MQTT-MCP talks to the Zigbee2MQTT frontend WebSocket API and supports both stdio and HTTP. Mine takes a third route — external, stdio, talking only to the MQTT bridge API. Relevant if you run the HA add-on: you don’t have to modify the add-on, enable external JavaScript, or open a port. All three are worth a look.
The tool I actually use is z2m_health_report — one call returning offline devices, weak links, stale devices, low batteries, failed interviews, pending OTA, and devices repeatedly rejoining or changing network address. First run on my own network found 4 offline devices, 6 batteries under 20% and 5 pending firmware updates I didn’t know about.
Being upfront about maturity: v0.3.x and a few days old. Developed against exactly one estate — 50 devices, EmberZNet coordinator, Zigbee2MQTT 2.12. Other adapters (TI CC2652/CC1352, deCONZ/ConBee), TLS and WebSocket brokers, and large estates are unverified. About 16 of its 23 tools have been exercised against real hardware; the destructive ones I deliberately haven’t fired at my own live network.
Destructive tools (device removal, OTA flashing, Touchlink, bridge restart) are off by default behind a write-mode setting and additionally require an explicit confirmation argument. Every tool also declares MCP annotations, so a client can tell read-only from destructive without guessing.
npx zigbee2mqtt-mcp — MIT, TypeScript, two runtime dependencies. Also runs as a container.
GitHub: GitHub - alexpfau/zigbee2mqtt-mcp: MCP server for administering a Zigbee2MQTT estate: health reporting, mesh diagnostics, OTA updates, pairing, binding and device options over the MQTT bridge API. · GitHub
I’d particularly value testers on non-EmberZNet adapters, and anyone whose advanced.last_seen or availability settings differ from mine — the server detects those and degrades with a hint rather than silently returning nothing, but that logic has only met one configuration. Issues and PRs very welcome; please include your adapter type and Zigbee2MQTT version from z2m_bridge_info.