zigbee2mqtt-mcp: health checks and upkeep for your Zigbee mesh
Administers the Zigbee2MQTT bridge itself: health reports, mesh topology, weak links, low batteries, OTA updates, pairing and binding, with tiered writes.
Project and installation docs
View projecthttps://github.com/alexpfau/zigbee2mqtt-mcp
Once a home has enough Zigbee devices, switching lights is the easy part. The time goes on the sensor with a weak signal, the batteries about to die, the device that keeps rejoining. Home Assistant lets an agent control devices but doesn’t expose the Zigbee2MQTT bridge underneath. zigbee2mqtt-mcp covers that layer. It talks straight to Zigbee2MQTT’s MQTT bridge API, so it works whether you run Home Assistant, Node-RED, openHAB or nothing at all.
What it does
- Whole-network audit:
z2m_health_reportchecks everything in one call, andz2m_list_devicesfilters and sorts by link quality, battery and pending updates. - Topology:
z2m_network_mapmaps the mesh with parents, depth, link quality and orphaned devices. - Device upkeep: device details and bindings, re-interviews, reporting intervals, options, renames and groups.
- Pairing and binding:
z2m_permit_joinopens a pairing window, andz2m_bindbinds a remote directly to a light so it works even when the bridge is down. - Firmware and restarts:
z2m_check_updateslooks for OTA updates; flashing firmware, removing devices and restarting the bridge only appear infullmode.
Who it’s for
- People with dozens of Zigbee devices who want a regular “replace these batteries, fix these weak links” report from an agent.
- Installers maintaining other people’s smart homes who need to pin down network problems fast.
Setup
Needs Node.js 22+ and network access to the MQTT broker Zigbee2MQTT uses. For Claude Desktop:
{
"mcpServers": {
"zigbee2mqtt": {
"command": "npx",
"args": ["-y", "zigbee2mqtt-mcp"],
"env": {
"Z2M_MQTT_URL": "mqtt://192.168.1.10:1883"
}
}
}
}
Point Z2M_MQTT_URL at the broker, not at the Zigbee2MQTT frontend port.
Our take
This is the most carefully built small project we found in home automation. No database and no daemon: it starts and stops with the session. Every request carries a transaction ID, so concurrent calls can’t cross wires. Writes come in three tiers, off, safe and full, and tools above the active tier aren’t registered at all, while removal and OTA flashing also need confirm: true on every call. Note that the default safe tier can already actuate anything on the mesh through z2m_set_state, locks, valves and sirens included; use off if that worries you. While a pairing window is open, any nearby Zigbee device can join. MIT licensed.