tuya-local-mcp

v0.3.0
tuya-local-mcp Checked 2 hours ago Published 27 days ago

Zero-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.

ParameterTypeDescription
targetstring

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.

ParameterTypeDescription
state *string
delay_secondsinteger
targetstring

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.

ParameterTypeDescription
brightness
delay_secondsinteger
preset
rgb
targetstring
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.

ParameterTypeDescription
config *object
name *string

delete_preset

Delete a preset from presets.json.

ParameterTypeDescription
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".

ParameterTypeDescription
timer_idstring

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.