axenov/WiZ-Smart-Bulb-MCP
3.3
If you are the rightful owner of WiZ-Smart-Bulb-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
An MCP server designed to control Wiz smart bulbs using UDP commands.
Tools
7
Resources
0
Prompts
0
Wiz Smart Bulb MCP Server
An MCP server for controlling Wiz smart lights/bulbs via UDP commands.
Features
- Turn on the light
- Turn off the light
- Set warm white color
- Set daylight color
- Change brightness
- Check current light status
Setup
- Install dependencies:
pip install -r requirements.txt
- Set environment variables (optional):
export WIZ_BULB_IP="192.168.1.XX"
export WIZ_BULB_PORT="38899"
You can target multiple bulbs by passing a specific bulb_ip and optional bulb_port to any tool. When no target is provided, the server uses the default IP and port above.
Usage
Run the MCP Server
python wiz_bulb_mcp.py
Available Tools
The server provides the following MCP tools:
- turn_on_bulb(bulb_ip: str | None = None, bulb_port: int | None = None) - Turn on the light (optionally target a specific bulb)
- turn_off_bulb(bulb_ip: str | None = None, bulb_port: int | None = None) - Turn off the light (optionally target a specific bulb)
- set_warm_white(dimming: int = 100, bulb_ip: str | None = None, bulb_port: int | None = None) - Set warm white color (always sets warm white)
- set_daylight(dimming: int = 100, bulb_ip: str | None = None, bulb_port: int | None = None) - Set daylight color (always sets daylight)
- adjust_brightness(brightness_percent: int, bulb_ip: str | None = None, bulb_port: int | None = None) - Adjust brightness while maintaining current color scene
- get_bulb_status(bulb_ip: str | None = None, bulb_port: int | None = None) - Check current light status (on/off, brightness, color mode)
- get_bulb_info(bulb_ip: str | None = None, bulb_port: int | None = None) - Get light configuration information
Example Commands
The server translates these commands to UDP messages:
Turn off:
{"id":1,"method":"setState","params":{"state":false}}
Warm White:
{"id":1,"method":"setPilot","params":{"sceneId":11,"dimming":100}}
Daylight:
{"id":1,"method":"setPilot","params":{"sceneId":12,"dimming":100}}
Get Status:
{"method":"getPilot","params":{}}
Example User Requests
The server understands various natural language requests:
- "Turn on the light" / "Schalte das Licht ein" / "Включи свет"
- "Turn off the light" / "Schalte das Licht aus" / "Выключи свет"
- "Make it warm white" / "Mach es warmweiß" / "Сделай теплый белый"
- "Set to daylight" / "Stelle auf Tageslicht ein" / "Поставь дневной свет"
- "Make it brighter" / "Mach es heller" / "Сделай ярче"
- "Dim the lights" / "Dimm das Licht" / "Приглуши свет"
- "Set brightness to 50%" / "Stelle Helligkeit auf 50%" / "Поставь яркость на 50%"