Zigbee2mqtt MCP logo

Zigbee2mqtt MCP

Administer Zigbee2MQTT through MQTT with mesh diagnostics, device management, pairing, OTA, logs, and health tools.

Install Zigbee2mqtt MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "zigbee2mqtt-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "zigbee2mqtt-mcp"
      ],
      "env": {
        "Z2M_MQTT_URL": "YOUR_VALUE_HERE",
        "Z2M_MQTT_USERNAME": "YOUR_VALUE_HERE",
        "Z2M_MQTT_PASSWORD": "YOUR_VALUE_HERE",
        "Z2M_BASE_TOPIC": "YOUR_VALUE_HERE",
        "Z2M_MQTT_CLIENT_ID": "YOUR_VALUE_HERE",
        "Z2M_WRITE_MODE": "YOUR_VALUE_HERE",
        "Z2M_LOG_LEVEL": "YOUR_VALUE_HERE",
        "Z2M_MQTT_REJECT_UNAUTHORIZED": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y zigbee2mqtt-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The zigbee2mqtt-mcp MCP server connects to the MQTT broker used by Zigbee2MQTT and exposes administration tools for bridge status, devices, groups, logs, and mesh diagnostics. It keeps retained bridge data in memory and correlates request and response messages for concurrent operations. Use it when an agent needs Zigbee2MQTT-level visibility or maintenance beyond ordinary device control. The server runs over stdio and requires Node.js 22 or newer.

Use cases

  • Audit Zigbee mesh health and identify orphaned or weakly connected devices
  • Inspect device options, bindings, reporting, and current state
  • Manage pairing, interviews, groups, and device configuration
  • Review bridge logs and diagnose MQTT or coordinator issues
  • Schedule OTA updates and other full-mode maintenance operations

Key features

  • MQTT bridge connectivity with retained-state caching
  • Device filtering, sorting, inspection, and configuration
  • Mesh topology and coordinator diagnostics
  • Health reports, bridge metadata, and live or buffered logs
  • Tiered read and write access with confirmation for destructive actions
  • Support for MQTT and secure MQTT, WebSocket, and secure WebSocket URLs

Tools9

What Zigbee2mqtt MCP lets your agent do. Expand a tool for its parameters.

Self-reported~195 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

24/25 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · zigbee2mqtt-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars38Stargazers on the source repository.
npm downloads527Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed9Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Zigbee2mqtt MCP works

What zigbee2mqtt-mcp MCP server does

The zigbee2mqtt-mcp MCP server gives an MCP client access to the administration layer of a Zigbee2MQTT deployment. It focuses on information and operations that are normally handled through the Zigbee2MQTT frontend, including mesh condition, device availability, link quality, pairing, bindings, reporting configuration, firmware updates, and bridge settings.

Read tools cover broker connectivity, TLS status, bridge metadata, device inventories, individual device details, estate health, network topology, groups, logs, and coordinator checks. Device listings can be filtered and sorted by properties such as type, availability, link quality, battery level, and pending updates. The coordinator check is limited to supported coordinator backup formats and reports an error for unsupported adapters.

How it works

The server connects directly to the MQTT broker configured for Zigbee2MQTT. Set the broker URL, not the Zigbee2MQTT frontend address. It communicates through the Zigbee2MQTT MQTT bridge API, so it does not require Home Assistant, Node-RED, or openHAB.

Zigbee2MQTT publishes bridge information as retained MQTT messages. The process subscribes to those topics and stores only the latest payload for each topic in memory; it does not use a database. Requests sent to bridge request topics include transaction identifiers, allowing responses to be matched correctly when calls run concurrently. The process uses stdio and starts and stops with the MCP session.

Setup and configuration

Install with Node.js 22 or later:

Terminal
npx zigbee2mqtt-mcp

Z2M_MQTT_URL is required and accepts mqtt, mqtts, ws, or wss URLs. Use Z2M_MQTT_USERNAME and Z2M_MQTT_PASSWORD when the broker requires credentials. Z2M_BASE_TOPIC defaults to zigbee2mqtt and must match Zigbee2MQTT's mqtt.base_topic.

Optional settings control the MQTT client ID, log level, connection and request timeouts, TLS certificate validation, and thresholds used for weak-link, low-battery, and stale-device checks. TLS deployments can provide CA, certificate, and key paths; certificate verification can be disabled for self-signed TLS with the corresponding setting.

The server defaults to Z2M_WRITE_MODE=safe. Set it to off for read-only access or full to register all write tools. Full mode includes device removal, OTA updates, Touchlink, bridge restart, and bridge option changes. Irreversible operations require confirm: true, and some reducing actions in safe mode also require confirmation.

Tools and capabilities

The read-only tool set includes:

  • z2m_connection_status and z2m_bridge_info for broker and bridge state.
  • z2m_list_devices and z2m_get_device for inventory, configuration, endpoints, bindings, reporting, and current state.
  • z2m_health_report, z2m_network_map, and z2m_coordinator_check for estate and mesh diagnostics.
  • z2m_list_groups for groups, members, and scenes.
  • z2m_get_logs for buffered or live bridge logs and lifecycle events.

Safe writes can check updates, permit joining, change device options, rename or configure devices, run interviews, set state, manage groups, bind devices, and configure reporting. Full writes add removal, OTA, bridge restart, bridge option changes, and Touchlink.

Limitations and notes

Some results depend on Zigbee2MQTT configuration or live traffic. Staleness checks require advanced.last_seen, and offline detection requires availability to be enabled. Link quality, battery, and update fields are not retained in device state topics; the server may need a short collection period, while the network-map tool provides authoritative link-quality data.

The coordinator check requires an adapter with supported coordinator backups, including Texas Instruments zStack and Silicon Labs EmberZNet. It does not support deCONZ or ZiGate. The server is tested against Zigbee2MQTT 2.x, and several capabilities depend on bridge endpoints introduced in that version.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Zigbee2mqtt MCP

zigbee2mqtt-mcp is an MCP server that connects an MCP client to the MQTT broker used by Zigbee2MQTT. Its main tools inspect bridge status, devices, groups, logs, mesh topology, coordinator state, and estate health, while optional write tools handle pairing, configuration, reporting, OTA updates, and other administration tasks.

Install it with `npx zigbee2mqtt-mcp` using Node.js 22 or newer. Configure the MCP client to launch that command, then provide `Z2M_MQTT_URL` pointing to the MQTT broker used by Zigbee2MQTT. The URL should not point to the Zigbee2MQTT frontend port.

Set `Z2M_WRITE_MODE` to `safe` or `full`; it defaults to `safe`. Safe mode exposes non-destructive writes such as pairing and configuration, while full mode adds removal, OTA, Touchlink, and bridge restart operations. Destructive calls also require `confirm: true` where specified.

Because the server uses standard stdio transport, it can be considered where Cursor supports configuring standard MCP stdio servers, subject to that client's configuration requirements.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewZigbee2mqtt MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/zigbee2mqtt-mcp?style=directory)](https://allmcps.com/mcp/zigbee2mqtt-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/zigbee2mqtt-mcp"><img src="https://allmcps.com/api/badge/zigbee2mqtt-mcp?style=directory" alt="Zigbee2mqtt MCP on AllMCPs" /></a>