Skip to content
VS Code

zigbee2mqtt mcp for VS Code

io.github.alexpfau/zigbee2mqtt-mcp

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

client:VS Code transport:stdio runtime:npm

Install zigbee2mqtt mcp in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "z2m-mqtt-url",
      "description": "Z2M_MQTT_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "z2m-mqtt-username",
      "description": "Z2M_MQTT_USERNAME",
      "password": true
    },
    {
      "type": "promptString",
      "id": "z2m-mqtt-password",
      "description": "Z2M_MQTT_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "z2m-base-topic",
      "description": "Z2M_BASE_TOPIC",
      "password": true
    },
    {
      "type": "promptString",
      "id": "z2m-write-mode",
      "description": "Z2M_WRITE_MODE",
      "password": true
    }
  ],
  "servers": {
    "zigbee2mqtt-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "zigbee2mqtt-mcp"
      ],
      "env": {
        "Z2M_MQTT_URL": "${input:z2m-mqtt-url}",
        "Z2M_MQTT_USERNAME": "${input:z2m-mqtt-username}",
        "Z2M_MQTT_PASSWORD": "${input:z2m-mqtt-password}",
        "Z2M_BASE_TOPIC": "${input:z2m-base-topic}",
        "Z2M_WRITE_MODE": "${input:z2m-write-mode}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

zigbee2mqtt mcp in other clients