TT

tuya/tuya-mcp-sdk

Productivity workflow
65 stars 0 forks 品質 60 トレンド 60

A comprehensive SDK that empowers developers to integrate their custom capabilities with Tuya Cloud through the standardized Model Context Protocol (MCP), ensuring seamless connectivity and...

概要

A comprehensive SDK that empowers developers to integrate their custom capabilities with Tuya Cloud through the standardized Model Context Protocol (MCP), ensuring seamless connectivity and...

README

Tuya MCP SDK

A comprehensive SDK that empowers developers to integrate their custom capabilities with Tuya Cloud through the standardized Model Context Protocol (MCP), ensuring seamless connectivity and interoperability.

🚀 Quick Start • 📖 Documentation •

✨ Features

  • 🔌 Easy Integration: Simple SDK for connecting Tuya Developer Platform to MCP servers
  • 🐍 Multi-Language Support: Available in Python, Go, and C#
  • 🔒 Secure Authentication: Robust authentication with Tuya Cloud
  • 📱 Real-time Communication: WebSocket-based real-time interaction
  • 🎯 Production Ready: Comprehensive error handling and retry mechanisms

🏗️ Architecture

The Tuya MCP SDK bridges the gap between Custom MCP Server and Tuya Developer Platform by implementing the Model Context Protocol standard:

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│   Your App      │───▶│    MCP SDK       │───▶│  MCP Gateway    │
└─────────────────┘    └──────────────────┘    └─────────────────┘
                              │
                              ▼
                       ┌──────────────────┐
                       │   MCP Server     │
                       └──────────────────┘

🚀 Quick Start

Prerequisites

  • Tuya Developer Account with MCP service enabled
  • Python >= 3.10 and pip >= 21.3, or Go >= 1.24
  • Access credentials (Access ID, Access Secret, Endpoint)

1. Setup Tuya Developer Platform

  1. Visit Tuya Developer Platform
  2. Navigate to MCP Management → Custom MCP Service
  3. Create a new MCP service and note down your credentials
  4. Follow the detailed setup instructions

2. Choose Your SDK

🐍 Python SDK Example

🐹 Go SDK Example

🔷 C# SDK Example

📖 Documentation

Resource Description
📋 Setup Instructions Complete setup guide for Tuya Developer Platform
🐍 Python SDK Docs Python SDK documentation and examples
🐹 Go SDK Docs Go SDK documentation and examples
🔷 C# SDK Docs C# SDK documentation and examples
🏗️ Architecture System architecture diagrams

📁 Project Structure

tuya-mcp-sdk/
├── 📄 README.md                 # This file
├── 📄 License                   # Apache 2.0 License
├── 📁 docs/                     # Documentation
│   ├── instructions.md          # Setup instructions
│   └── architecture_diagram/    # Architecture diagrams
├── 📁 mcp-python/              # Python SDK
│   ├── src/mcp_sdk/            # Core SDK modules
│   ├── examples/               # Python examples
│   └── README.md               # Python-specific docs
├── 📁 mcp-golang/              # Go SDK
│   ├── pkg/                    # Go packages
│   ├── examples/               # Go examples
│   └── README.md               # Go-specific docs
└── 📁 mcp-csharp/              # C# SDK
    ├── src/Tuya.McpSdk/        # Core SDK library (.NET 10)
    ├── examples/               # C# examples
    └── README.md               # C#-specific docs

📜 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

🆘 Support

View this README on GitHub

インストール

This server does not publish a one-line install command.

Open the repository installation guide