概览
What is Mcp Server Tuya?
Mcp Server Tuya is a Model Context Protocol (MCP) server that enables AI assistants like Claude, ChatGPT, Copilot, and Cursor to control Tuya and Smart Life smart home devices via the Tuya Cloud API. It is designed for users of MCP-compatible clients who want voice or text‑based smart home control.
How to use Mcp Server Tuya?
Obtain Tuya Cloud credentials (Access ID, Access Key) from the Tuya IoT Platform, then configure your MCP client with the command uvx mcp-server-tuya and set the environment variables TUYA_ACCESS_ID, TUYA_ACCESS_KEY, and TUYA_API_ENDPOINT (region‑specific). After restarting the client, you can ask your AI assistant to list, turn on/off, or adjust devices.
Key features of Mcp Server Tuya
- 10 tools for complete device control (on/off, brightness, color, etc.)
- Device name resolution – use friendly names instead of IDs
- Intelligent caching with configurable TTL (default 60 seconds)
- Supports all Tuya regions (EU, US, CN, IN)
- Zero config files – credentials via environment variables
- Works with Claude, ChatGPT, Copilot, Cursor, and more
Use cases of Mcp Server Tuya
- List all connected Tuya devices with their status and categories
- Turn smart lights on/off by name (e.g., “Living Room Light”)
- Adjust brightness, color temperature, and RGB color of lights
- Query device status (e.g., temperature in the kitchen, power state)
- Send custom commands to any Tuya device for advanced control
FAQ from Mcp Server Tuya
How do I get Tuya credentials?
Go to the Tuya IoT Platform, create a Cloud Project with the “Smart Home” industry, link your Smart Life / Tuya Smart app, and copy the Access ID and Access Secret from the project overview.
What environment variables are required?
TUYA_ACCESS_ID and TUYA_ACCESS_KEY are required. Optionally set TUYA_API_ENDPOINT (defaults to Europe) and TUYA_CACHE_TTL (default 60 seconds).
What API endpoints are available for different regions?
Europe: https://openapi.tuyaeu.com, Americas: https://openapi.tuyaus.com, China: https://openapi.tuyacn.com, India: https://openapi.tuyain.com.
Why am I getting a “Device not found” error?
The device name used in the command does not match the exact name in your Tuya account. Use the tuya_list_devices tool to see