tuya-local-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TUYA_CACHE_TTL | No | Seconds to cache status reads. 0 disables. | 10 |
| TUYA_READ_ONLY | No | 1 blocks all state changes. | 0 |
| TUYA_DEVICES_FILE | No | Path to devices.json or snapshot.json. | auto-detected |
| TUYA_CONNECT_TIMEOUT | No | Per-device socket timeout, seconds. | 5 |
| TUYA_DISCOVERY_TIMEOUT | No | Default listen window for discover_devices. | 12 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_devicesA | List every Tuya device in the local registry. Returns names, device ids, IPs and protocol versions. Local keys are never
returned. Use the |
| discover_devicesA | Passively listen for Tuya devices broadcasting on the local network. This transmits nothing - it only receives the beacons devices emit every few seconds. Useful for finding a device whose IP has changed, or for spotting devices that are on the network but missing from the registry. |
| get_statusA | Read the current state of a device.
|
| get_all_statusA | Read the state of every device in the registry. Devices that fail are reported individually rather than failing the call, so one offline device does not hide the rest. |
| set_powerA | Turn a device on or off.
|
| set_brightnessA | Set a light's brightness as a percentage (0-100). |
| set_colorA | Set a light's colour from a hex string such as '#FF8800' or 'f80'. |
| set_color_tempA | Set a light to white mode at a colour temperature percentage (0 warm, 100 cool). Optionally set brightness in the same call. |
| set_datapointA | Write a raw Tuya datapoint. The escape hatch for products whose datapoints the helper tools do not cover - fans, curtains, heaters, valves. Call get_status first to see which datapoints a device exposes and what types they hold. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: enumeration of registered devices (list_devices), passive network discovery (discover_devices), reading state for one or all devices (get_status/get_all_status), and distinct control actions (power, brightness, color, color temp, raw datapoint). The get_* and set_* families are parallel but not overlapping.
All tool names follow a consistent lowercase snake_case verb_noun pattern: list_devices, discover_devices, get_status, get_all_status, set_power, set_brightness, set_color, set_color_temp, set_datapoint. No mixed conventions or vague verbs.
Nine tools is well-scoped for a Tuya local control server: two device discovery/listing, two status reads, five control operations including a raw escape hatch. Each tool earns its place without redundancy or bloat.
The surface covers the core lifecycle of interacting with local Tuya devices: discovery, listing, status reading, and common control actions. The raw set_datapoint tool fills gaps for unsupported product types. A minor gap is the lack of a tool to add discovered devices to the registry or update device metadata.