Tuya Smart Home

by cabra-lat

2 stars
10.9k downloads
Not rated
GitHub

About

Integrates with Tuya smart home devices using tinytuya, enabling control and monitoring for home automation scenarios like voice commands and energy optimization.

Details

Author
cabra-lat
Repository
cabra-lat/tuyactl
GitHub stars
2
Downloads
10,931
License
MIT License
Categories
Productivity, Developer Tools, Design, AI, Search, Automation, Infrastructure, Frontend

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Tuya Smart Home
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

  • snapshot.json Location: You can customize the location of the snapshot.json file (containing your Tuya device keys) using environment va
riables. (Details on this to be added later).

list

List all your Tuya devices.

on

Turn on a specific Tuya device.

off

Turn off a specific Tuya device.

color

Change the color of a Tuya device that supports color settings.

brightness

Adjust the brightness of a Tuya device that supports brightness settings.

temperature

Set the temperature for a Tuya device that supports temperature control.

mode

Change the mode of a Tuya device that has multiple modes.

music

Control music settings on a Tuya device that supports music features.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "tuya smart home": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

tuyactl

This project provides a command-line interface (tuyactl) for controlling Tuya devices. It interacts with a separate Tuya Server (I'm still thinking a better way of doing that).

Requirements

uv: A fast and modern Python package installer and runner. Install it by following the instructions on the uv documentation site.
Tuya Local Keys: You will need the local keys for your Tuya devices. Follow the tinytuya setup wizard to obtain these.

Quick Start

1. Install uv:

Follow the official installation instructions on the uv documentation site. The recommended method is to use the standalone installer, which you can download and run with the following command:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    

2. Obtain Tuya Local Keys:

Follow the tinytuya setup wizard to get the local keys for your Tuya devices. Place the resulting snapshot.json file in your home directory (~). You can customize the location of this file using environment variables (see below).

3. Run the server:

    nohup tuyad > tuyad.log 2>&1 &
    

3. Run tuyactl:

To see the available commands and options, run:

    tuyactl --help
    

To execute a specific command, use the following syntax:

    tuyactl <command> [options]
    

Replace <command> with one of the available commands: list, on, off, color, brightness, temperature, mode, music. Use the --
help
option to see the available options for each command.

For example, to list all your Tuya devices, run:

    tuyactl list
    

Configuration

  • snapshot.json Location: You can customize the location of the snapshot.json file (containing your Tuya device keys) using environment va
riables. (Details on this to be added later).
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.