MCP server for controlling Tuya and Smart Life smart home devices

MCP server for controlling Tuya and Smart Life smart home devices

mcp-server-tuya•byjuanmartinsantos

An MCP server that exposes Tuya Cloud tools so AI assistants can list smart home devices, read their status, and send control commands.

License: MIT License•Runtime: Awaiting documentation review•Category: productivity work

WHAT IT DOES

  • •Provides ten tools covering device listing, status and info retrieval, on/off/toggle, brightness, color temperature, RGB color, and custom commands.
  • •Resolves friendly device names so tools accept either a device ID or a name.
  • •Supports all Tuya regions (EU, US, CN, IN) via configurable API endpoints.
  • •Caches the device list with a configurable TTL to reduce API calls.

BEST FOR

  • •Asking an AI assistant to list all smart home devices and their online status.
  • •Turning devices on or off by friendly room name, such as turning off the living room light.
  • •Adjusting light brightness or color temperature through an assistant.

ABOUT MCP-SERVER-TUYA

MCP server for controlling Tuya and Smart Life smart home devices is cataloged as an MCP server attributed to juanmartinsantos. An MCP server that exposes Tuya Cloud tools so AI assistants can list smart home devices, read their status, and send control commands. It is categorized under productivity work. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for controlling Tuya and Smart Life smart home devices are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which Tuya regions are supported?

The server supports the EU, US, CN, and IN Tuya regions through region-specific API endpoints.

Can tools reference devices by name instead of ID?

Yes, all tools accept either a device ID or a device name such as "Living Room Light".

上游原版 README

在 GitHub 查看同一版本原文

README.md · ac3895062530 · 采集于 2026-11-13 10:56:12 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

mcp-server-tuya

PyPI version Python License: MIT

A Model Context Protocol (MCP) server that lets AI assistants (Claude, ChatGPT, Copilot, Cursor, and more) control your Tuya / Smart Life smart home devices.

MCP Compatible Tuya Smart Home

Features

  • 10 tools for complete device control (on/off, brightness, color, temperature, custom commands)
  • Device name resolution — use friendly names like "Living Room Light" instead of IDs
  • Intelligent caching — configurable TTL to reduce API calls
  • All Tuya regions — EU, US, CN, IN
  • Zero config files — credentials via environment variables
  • Works with Claude Desktop, ChatGPT, GitHub Copilot, Cursor, Windsurf, Cline, and any MCP-compatible client

Quick Start

1. Get Tuya Credentials

  1. Go to Tuya IoT Platform and create an account
  2. Create a Cloud Project (select your region and "Smart Home" industry)
  3. Go to Devices > Link Tuya App Account and link your Smart Life / Tuya Smart app
  4. Copy your Access ID and Access Secret from the project overview

2. Configure your MCP client

Claude Desktop

Add this to your config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "tuya": {
      "command": "uvx",
      "args": ["mcp-server-tuya"],
      "env": {
        "TUYA_ACCESS_ID": "your_access_id",
        "TUYA_ACCESS_KEY": "your_access_key",
        "TUYA_API_ENDPOINT": "https://openapi.tuyaeu.com"
      }
    }
  }
}
Claude Code
claude mcp add tuya -- uvx mcp-server-tuya

Then set your environment variables:

export TUYA_ACCESS_ID="your_access_id"
export TUYA_ACCESS_KEY="your_access_key"
export TUYA_API_ENDPOINT="https://openapi.tuyaeu.com"
Cursor

Add this to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "tuya": {
      "command": "uvx",
      "args": ["mcp-server-tuya"],
      "env": {
        "TUYA_ACCESS_ID": "your_access_id",
        "TUYA_ACCESS_KEY": "your_access_key",
        "TUYA_API_ENDPOINT": "https://openapi.tuyaeu.com"
      }
    }
  }
}
VS Code (GitHub Copilot)

Add this to your .vscode/settings.json:

{
  "mcp": {
    "servers": {
      "tuya": {
        "command": "uvx",
        "args": ["mcp-server-tuya"],
        "env": {
          "TUYA_ACCESS_ID": "your_access_id",
          "TUYA_ACCESS_KEY": "your_access_key",
          "TUYA_API_ENDPOINT": "https://openapi.tuyaeu.com"
        }
      }
    }
  }
}
ChatGPT / Other MCP clients

Any MCP-compatible client can use this server. The general pattern is:

  • Command: uvx
  • Args: ["mcp-server-tuya"]
  • Environment variables: TUYA_ACCESS_ID, TUYA_ACCESS_KEY, TUYA_API_ENDPOINT

Refer to your client's documentation for how to configure MCP servers.

3. Restart your client

That's it! Ask your AI assistant things like:

  • "List all my devices"
  • "Turn off the living room light"
  • "Set the bedroom light to 50% brightness"
  • "What's the temperature in the kitchen?"
  • "Turn everything off"

Installation

No installation needed — uvx runs it directly:

uvx mcp-server-tuya

With pip

pip install mcp-server-tuya

From GitHub

pip install git+https://github.com/juanmartinsantos/mcp-server-tuya.git

Available Tools

ToolDescription
tuya_list_devicesList all devices with IDs, names, categories, and online status
tuya_get_device_statusGet current device state (power, brightness, temperature, etc.)
tuya_get_device_infoGet detailed device info (model, firmware, capabilities)
tuya_turn_on_deviceTurn on a device (supports multi-switch devices)
tuya_turn_off_deviceTurn off a device (supports multi-switch devices)
tuya_toggle_deviceToggle device on/off
tuya_set_brightnessSet light brightness (0-1000)
tuya_set_color_temperatureSet color temperature: warm (0) to cool (1000)
tuya_set_colorSet RGB color using HSV values
tuya_send_commandSend any custom command to a device

All tools accept either a device ID or a device name (e.g., "Living Room Light").

Environment Variables

VariableRequiredDefaultDescription
TUYA_ACCESS_IDYes—Tuya Cloud API Access ID
TUYA_ACCESS_KEYYes—Tuya Cloud API Access Secret
TUYA_API_ENDPOINTNohttps://openapi.tuyaeu.comAPI endpoint (see regions below)
TUYA_CACHE_TTLNo60Device list cache duration (seconds)
TUYA_REQUEST_TIMEOUTNo10API request timeout (seconds)

API Endpoints by Region

RegionEndpoint
Europehttps://openapi.tuyaeu.com
Americashttps://openapi.tuyaus.com
Chinahttps://openapi.tuyacn.com
Indiahttps://openapi.tuyain.com

Local Development

# Clone the repository
git clone https://github.com/juanmartinsantos/mcp-server-tuya.git
cd mcp-server-tuya

# Create virtual environment
python -m venv .venv
.venv\Scripts\activate  # Windows
# source .venv/bin/activate  # macOS/Linux

# Install in editable mode
pip install -e ".[dev]"

# Copy and configure environment
cp .env.example .env
# Edit .env with your credentials

# Run the server
mcp-server-tuya
# or: python -m mcp_server_tuya

Troubleshooting

"TUYA_ACCESS_ID environment variable is required"

Your credentials are not set. Make sure you've added the env section to your MCP client config.

"API error: permission deny"

Your Tuya Cloud project doesn't have the right permissions. Go to Tuya IoT Platform > your project > Service API and enable IoT Core and Smart Home APIs.

"Device not found"

The device name doesn't match. Use tuya_list_devices first to see the exact names of your devices.

Server won't start

Make sure you have uv installed. Install it with:

# Windows
winget install --id=astral-sh.uv

# macOS
brew install uv

License

MIT License - see LICENSE for details.

Credits

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for controlling Tuya and Smart Life smart home devices from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-tuya)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related productivity work MCP Servers

Alternative and complementary servers in the same category

View all in productivity work →
Tuqui hosted MCP server for Odoo
tuqui-odoo-mcp-for-claude-chatgpt•tuqui-ai

Tuqui is a hosted MCP server that connects Odoo with Claude and ChatGPT so users can ask about sales, stock, customers and overdue invoices in plain language.

Repository stats unavailable
Productivity & Ops