tuya-local-mcp
v0.3.0Zero-cloud LAN controller for Tuya / Smart Life bulbs: an MCP server for Claude Code plus a TrueColor CLI.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_lights
List lights (name, zone, every word that targets them, IP) and preset names.
light_status
Read what each target light is doing now (on, mode, brightness, temp, rgb), plus the user's local time.
| Parameter | Type | Description |
|---|---|---|
target | string |
power_light
Turn lights on, off, or toggle them as a group (any on -> all off, else all on). delay_seconds > 0 schedules it instead, in a background process.
| Parameter | Type | Description |
|---|---|---|
state * | string | |
delay_seconds | integer | |
target | string |
set_light
Apply a preset/scene, or set brightness (1-100) with temp (0 warm-100 cool) OR rgb. With a scene preset, target narrows it: target='bed', preset='focus' applies only focus's bed setting. Use either preset or manual values, not both.
| Parameter | Type | Description |
|---|---|---|
brightness | ||
delay_seconds | integer | |
preset | ||
rgb | ||
target | string | |
temp |
get_presets
Return presets.json as stored (built-in defaults if you have not saved any yet).
upsert_preset
Create or replace a preset. The config is validated before saving. Single setting: {"temp": 20, "brightness": 50, "description": "optional"} {"rgb": [255, 0, 128], "brightness": 80} Scene: {"targets": {"ceiling": {"on": false}, "setup": {"rgb": [255, 0, 128], "brightness": 80}, "bed": {"temp": 0, "brightness": 15}}} Keys per setting: on, brightness (1-100), temp (0-100), rgb. temp and rgb are exclusive.
| Parameter | Type | Description |
|---|---|---|
config * | object | |
name * | string |
delete_preset
Delete a preset from presets.json.
| Parameter | Type | Description |
|---|---|---|
name * | string |
list_timers
List pending timers (from delay_seconds or the CLI's `sleep`): id, what, when.
cancel_timer
Cancel a pending timer by id, or every pending timer with "all".
| Parameter | Type | Description |
|---|---|---|
timer_id | string |
scan_lan_ips
Listen for Tuya broadcasts (~6 s) and save any light IP that changed. Commands already do this automatically when a light is unreachable.