Skip to main content
Glama
ethanj2k

tuya-local-mcp

by ethanj2k

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TUYA_CACHE_TTLNoSeconds to cache status reads. 0 disables.10
TUYA_READ_ONLYNo1 blocks all state changes.0
TUYA_DEVICES_FILENoPath to devices.json or snapshot.json.auto-detected
TUYA_CONNECT_TIMEOUTNoPer-device socket timeout, seconds.5
TUYA_DISCOVERY_TIMEOUTNoDefault 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 name field when calling the other tools.

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.

device may be a friendly name, a device id, or an IP address. Returns the raw Tuya datapoints plus a best-effort interpretation of the common ones.

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.

switch_dp overrides the datapoint carrying the relay/switch. Leave it unset to let tinytuya pick, which is correct for the large majority of plugs, switches and bulbs.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 9 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues