zigbee2mqtt-mcp
MCP server by alexpfau Community
Administers a Zigbee2MQTT estate through its MQTT bridge API. It covers mesh health, weak links, stale batteries, OTA updates, pairing and device management. Aimed at people running Zigbee2MQTT who want more than basic device control.
Install zigbee2mqtt-mcp
Built from the published package, never by AI.
claude mcp add zigbee2mqtt-mcp -e Z2M_MQTT_URL=YOUR_Z2M_MQTT_URL -- npx -y zigbee2mqtt-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"zigbee2mqtt-mcp": {
"env": {
"Z2M_MQTT_URL": "YOUR_Z2M_MQTT_URL"
},
"args": [
"-y",
"zigbee2mqtt-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"zigbee2mqtt-mcp": {
"env": {
"Z2M_MQTT_URL": "YOUR_Z2M_MQTT_URL"
},
"args": [
"-y",
"zigbee2mqtt-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"zigbee2mqtt-mcp": {
"env": {
"Z2M_MQTT_URL": "YOUR_Z2M_MQTT_URL"
},
"args": [
"-y",
"zigbee2mqtt-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add zigbee2mqtt-mcp --env Z2M_MQTT_URL=YOUR_Z2M_MQTT_URL -- npx -y zigbee2mqtt-mcp{
"mcpServers": {
"zigbee2mqtt-mcp": {
"env": {
"Z2M_MQTT_URL": "YOUR_Z2M_MQTT_URL"
},
"args": [
"-y",
"zigbee2mqtt-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add zigbee2mqtt-mcp npx -y zigbee2mqtt-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the zigbee2mqtt-mcp block.
About
zigbee2mqtt-mcp is an MCP server for administering a Zigbee2MQTT network. It covers mesh health, weak links, devices that keep rejoining, stale batteries, firmware updates, pairing, binding, reporting intervals and device options. These are the tasks normally done in the Zigbee2MQTT frontend.
The server connects directly to the Zigbee2MQTT MQTT bridge API, so it works with Home Assistant, Node-RED, openHAB or without any of them. It keeps only the latest payload per topic in memory and runs over stdio. Writes are gated by a write mode and, for irreversible actions, an explicit confirm argument. It is aimed at Zigbee2MQTT operators.
Written from the project's README and checked against it.
Tools it gives your assistant
z2m_health_reportRuns a whole-estate audit in one call.z2m_network_mapShows mesh topology with parent, depth, link quality and orphan detection.z2m_list_devicesFilters and sorts devices by type, availability, link quality, battery or pending update.z2m_get_deviceShows exposes, settable options, endpoints, bindings, reportings and current state.z2m_bridge_infoReports version, coordinator, channel, PAN ID, permit_join and runtime stats.z2m_permit_joinOpens the network for pairing for a set window. Available in safe mode.z2m_configure_reportingConfigures reporting intervals for a device. Available in safe mode.z2m_bindBinds devices together. Its clear action requires confirm: true.z2m_ota_updateFlashes device firmware. Full mode only and requires confirm: true.z2m_get_logsReturns bridge logs and lifecycle events, buffered or watched live.
What you need
- Node.js 22 or newer
- Network access to the MQTT broker used by Zigbee2MQTT
- Zigbee2MQTT 2.x
| Setting | Needed | What it is |
|---|---|---|
Z2M_Environment variable, secret | Required | MQTT broker URL used by Zigbee2MQTT, e.g. mqtt://192.168.1.10:1883. Supports mqtt://, mqtts://, ws:// and wss://. This is the broker, not the Zigbee2MQTT frontend port. |
Z2M_Environment variable | Optional | MQTT broker username, if the broker requires authentication. |
Z2M_Environment variable, secret | Optional | MQTT broker password, if the broker requires authentication. |
Z2M_Environment variable | Optional | Zigbee2MQTT base topic. Must match mqtt.base_topic in configuration.yaml. Defaults to zigbee2mqtt. |
Z2M_Environment variable | Optional | Tool exposure tier: off (read-only), safe (default; adds non-destructive writes such as pairing, options, rename and binding) or full (adds device removal, OTA flashing, Touchlink and bridge restart). |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Is my Zigbee network healthy?
- Which devices have the weakest signal?
- Which batteries need replacing?
Good to know
- Destructive tools such as device removal, OTA flashing and bridge restart need Z2M_WRITE_MODE=full and confirm: true.
- The default safe mode can actuate locks, valves and sirens through z2m_set_state.
- Early release. Developed and tested on a 50-device EmberZNet estate.
- Other adapters, TLS and WebSocket brokers, and large estates are unverified.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to zigbee2mqtt-mcp
All alternatives →Standardizes lab test names to LOINC codes and units to UCUM, and symptoms and diagnoses to ICPC-3, offline and with no API key. Built for people who want their health records on their own machine and queryable by an AI agent over MCP.
RuView is a WiFi sensing platform and MCP server that uses low-cost ESP32 sensors to detect people, breathing and heart rate. It is for developers and operators who want room sensing without cameras or wearables.
ToolUniverse is an MCP server that gives AI assistants access to more than 2,700 scientific tools for life science, research and literature. It is aimed at AI scientists, researchers and developers building research systems.
Mirobody is a self-hosted engine that turns lab reports, wearable data and genetic files into a single health record. Its built-in MCP server lets an AI assistant query that record and trace each number back to its source file. It is for people who want their health data on their own machine.
ScanSci PDF gets academic papers for AI agents. Give it a DOI, arXiv ID, article link, reference list or research question, and it searches candidate sources and tries to fetch accessible full texts. It is for students, researchers and labs.
Searches CNKI and Web of Science through an MCP server, returning records with impact factors. It can also open a paper in the user's signed-in browser and read its full text. Built for researchers who want AI answers on science topics backed by the source article.
Compare with Mirobody, Ruview or tooluniverse
zigbee2mqtt-mcp: common questions
Does it need Home Assistant?
No. The server talks directly to the Zigbee2MQTT MQTT bridge API, so it works with Home Assistant, Node-RED, openHAB or no integration at all.
Can it change my network by default?
The default write mode is safe. Irreversible tools are only registered in full mode and also need confirm set to true on each call.
Which Zigbee adapters are supported?
The project was developed and tested on an EmberZNet adapter. Texas Instruments, deCONZ and other adapters are stated as unverified.
How do I install zigbee2mqtt-mcp?
In Claude Code run claude mcp add zigbee2mqtt-mcp -e Z2M_MQTT_URL=YOUR_Z2M_MQTT_URL -- npx -y zigbee2mqtt-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is zigbee2mqtt-mcp the official server?
zigbee2mqtt-mcp is a community project by alexpfau, not verified by a company domain.
Is zigbee2mqtt-mcp free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is zigbee2mqtt-mcp safe to use?
It scores 80 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to zigbee2mqtt-mcp?
Similar MCP servers: Mirobody, Ruview, tooluniverse, Mirobody.
Does zigbee2mqtt-mcp work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
