MCP Server Studio

Zigbee2mqtt MCP MCP server

Administer a Zigbee2MQTT estate: health, mesh diagnostics, OTA, pairing, device management.

Registry name: io.github.alexpfau/zigbee2mqtt-mcp

Publisher
alexpfau
Runs
Runs locally
Package
npm
Version
0.8.2
Category
Data & analytics
Updated
2026-12-02

Source code on GitHub

Set up Zigbee2mqtt MCP (run locally)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "zigbee2mqtt-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "Z2M_MQTT_URL": "<Z2M_MQTT_URL>",
        "Z2M_MQTT_USERNAME": "<Z2M_MQTT_USERNAME>",
        "Z2M_MQTT_PASSWORD": "<Z2M_MQTT_PASSWORD>",
        "Z2M_BASE_TOPIC": "<Z2M_BASE_TOPIC>",
        "Z2M_WRITE_MODE": "<Z2M_WRITE_MODE>"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add zigbee2mqtt-mcp -e Z2M_MQTT_URL='<Z2M_MQTT_URL>' -e Z2M_MQTT_USERNAME='<Z2M_MQTT_USERNAME>' -e Z2M_MQTT_PASSWORD='<Z2M_MQTT_PASSWORD>' -e Z2M_BASE_TOPIC='<Z2M_BASE_TOPIC>' -e Z2M_WRITE_MODE='<Z2M_WRITE_MODE>' -- npx -y [email protected]

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "zigbee2mqtt-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "Z2M_MQTT_URL": "<Z2M_MQTT_URL>",
        "Z2M_MQTT_USERNAME": "<Z2M_MQTT_USERNAME>",
        "Z2M_MQTT_PASSWORD": "<Z2M_MQTT_PASSWORD>",
        "Z2M_BASE_TOPIC": "<Z2M_BASE_TOPIC>",
        "Z2M_WRITE_MODE": "<Z2M_WRITE_MODE>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "zigbee2mqtt-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "Z2M_MQTT_URL": "<Z2M_MQTT_URL>",
        "Z2M_MQTT_USERNAME": "<Z2M_MQTT_USERNAME>",
        "Z2M_MQTT_PASSWORD": "<Z2M_MQTT_PASSWORD>",
        "Z2M_BASE_TOPIC": "<Z2M_BASE_TOPIC>",
        "Z2M_WRITE_MODE": "<Z2M_WRITE_MODE>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "zigbee2mqtt-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "Z2M_MQTT_URL": "<Z2M_MQTT_URL>",
        "Z2M_MQTT_USERNAME": "<Z2M_MQTT_USERNAME>",
        "Z2M_MQTT_PASSWORD": "<Z2M_MQTT_PASSWORD>",
        "Z2M_BASE_TOPIC": "<Z2M_BASE_TOPIC>",
        "Z2M_WRITE_MODE": "<Z2M_WRITE_MODE>"
      }
    }
  }
}

Settings

NameRequiredWhat it is
Z2M_MQTT_URLYesMQTT 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_MQTT_USERNAMENoMQTT broker username, if the broker requires authentication.
Z2M_MQTT_PASSWORDNoMQTT broker password, if the broker requires authentication.
Z2M_BASE_TOPICNoZigbee2MQTT base topic. Must match mqtt.base_topic in configuration.yaml. Defaults to zigbee2mqtt.
Z2M_WRITE_MODENoTool 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).

More data & analytics MCP servers