Labsco
MCP SERVER

deConz MCP

by marcinn2

Control Zigbee lights, sensors, scenes and automations on a deCONZ gateway from a conversation.

IoT, Smart Home & Embedded Hardware
Summary
The automation layer on the gateway, not just the light switch.

Most home bridges stop at turning things on and off. This one reads and edits the rules and schedules stored on the gateway itself, so an agent can explain why a lamp came on at seven and change it — and a rule can be disabled rather than destroyed.

What it is

A Python server over the deCONZ REST API — the software behind the ConBee and RaspBee Zigbee adapters. It reaches lights, groups, scenes, sensors, automation rules, schedules and Touchlink pairing on a gateway you already run, and ships seven read-only resources and seven ready-made prompts alongside the tools.

What you get
  • Lights listed with on/off, brightness and reachability, then driven on power, brightness, hue, saturation, colour temperature, xy, effect and alert (`list_lights`, `get_light`, `set_light_state`, `rename_light`, `delete_light`)
  • Groups created, re-populated and driven all at once, so one call moves every light in a room (`list_groups`, `get_group`, `create_group`, `set_group_action`, `modify_group`, `delete_group`)
  • Scenes captured from a group's current state, then recalled, overwritten, renamed or deleted (`list_scenes`, `create_scene`, `recall_scene`, `store_scene`, `rename_scene`, `delete_scene`)
  • Sensors with their latest readings and battery levels, and their config — enabled, battery, sensitivity — changed (`list_sensors`, `get_sensor`, `set_sensor_config`, `rename_sensor`, `delete_sensor`)
  • Automation rules read back with their conditions and actions, created fresh, or switched off without being deleted; timed schedules get the same treatment (`list_rules`, `get_rule`, `create_rule`, `set_rule_status`, `list_schedules`, `create_schedule`, `set_schedule_status`)
  • Touchlink for the devices that will not pair normally: scan nearby, blink one to identify it, or factory-reset it (`touchlink_scan`, `get_touchlink_results`, `touchlink_identify`, `touchlink_reset`)
  • Gateway configuration read, the network opened for pairing for a set number of seconds, and the gateway pointed at a different host at runtime (`get_gateway_config`, `set_permit_join`, `configure_deconz`)
  • Read-only snapshots a client can pull without a tool call — `deconz://lights`, `deconz://sensors`, `deconz://rules`, `deconz://state` and three more — plus prompts for a home overview, an evening routine and diagnosing a device
Requirements

Python 3.10 or newer with uv or pip, and a running deCONZ or Phoscon gateway with a ConBee or RaspBee adapter, reachable at `DECONZ_HOST`. You claim `DECONZ_API_KEY` from the Phoscon app: unlock the gateway under Settings, then POST to `/api` within the 60-second window it stays open. That gateway key stays server-side and is never handed to the connecting client; clients authenticate separately with `MCP_AUTH_TOKEN`, compared in constant time. It runs stdio by default, or `--transport streamable-http` on `/mcp`, or `--transport server` for both. A multi-platform container image and Kubernetes manifests ship with it.

Setup effort

One command plus a key — docker pull registry.mne.pl/deconz-mcp:latest, then supply credentials