Custom MCP Server
Version: 20250825
Online Version
Contents
1. Custom MCP Services
This topic describes how to create and configure a custom MCP server and debug it in an agent.
2. Create custom MCP server
- Log in to the Tuya Developer Platform.
- Go to MCP Management > Custom MCP Service, and click Add custom MCP.
- In the Sign up MCP Server dialog, enter the service name and description in Chinese and English, upload an image as the icon, and then click Confirm to save.
Screenshot of the Tuya Developer Platform interface showing the navigation menu with 'MCP Management' and 'Custom MCP Service' highlighted. A button labeled '+ Add custom MCP' is prominently displayed.
Screenshot of the 'Sign up MCP Server' dialog box. It includes input fields for 'Service Name (Chinese)', 'Service Description (Chinese)', 'Service Name (English)', and 'Service Description (English)'. An 'Icon' upload field is also present, showing a placeholder 'M' icon and specifying allowed formats (JPG, JPEG, PNG) and size limit (3 MB or less).
3. Configure custom MCP server
If your custom MCP service is deployed across multiple data centers, ensure consistent service versions and tool configurations in all data centers to prevent compatibility issues that may disrupt agent orchestration or cause functional failures.
- After creating the MCP server, you will automatically be redirected to its Service Details page.
- In the section of Service Access Configuration Management > Data Center, click Add Data Center on the right, select a data center as needed, and then click OK.
- Click the selected data center, and you can see the Endpoint, Access ID, and Access Secret. Copy and paste the information to your local device. Please note that these parameters will be used when running the MCP SDK later. For more information, see the README in the GitHub source code.
Screenshot of the Service Details page for a custom MCP server. The 'Service Access Configuration Management' section is visible, showing the 'Data Center' area with a message 'No data center configured yet' and an 'Add Data Center' button. A second screenshot shows a configured 'China Data Center' with its 'Endpoint' (e.g., https://mcp.tuyacn.com
), 'Access ID', and 'Access Secret'.
4. Access MCP server via SDK
Download the MCP SDK from GitHub and read the relevant documents.
Screenshot of the GitHub repository page for 'tuya / tuya-mcp-sdk'. It displays the project's file structure, including directories like 'docs' and language-specific SDK folders, commit history, and a brief description of the SDK's purpose in enabling integration with Tuya Cloud via the Model Context Protocol (MCP).
5. Run and debug MCP Server
To ensure your custom MCP server operates properly, follow these steps to run and debug it within the agent environment:
5.1. Run and debug
- In the selected data center, check the service status of the MCP server.
- On the Tool tab, view the available tools for your MCP server.
- Click Test Run to test your desired tool.
- In the Test Run window, click Run. When Commissioning passed appear in the lower left corner, the MCP tool has been debugged successfully.
Screenshot of the MCP server's service details, showing 'China Data Center' with 'Service Status: online'. Another screenshot displays the 'Tool' tab, listing available tools such as 'play_music', 'stop_music', 'take_photo', and 'view_photo'. A third screenshot shows the 'Test Run' interface for the 'play_music' tool, with an input parameter 'music_name' and a 'Request Response JSON' indicating a successful test.
5.2. Add server to agent
- Go to the My Agent page, click Develop in the Operation column.
- In the section 01 Model Configuration > Skills Configuration, find MCP Service and click + on the right.
- On the Add MCP service page, click Custom MCP Service and add the desired MCP server to your agent.
Screenshot of the 'My Agent' page, highlighting the '01 Model Configuration > Skills Configuration' section where 'MCP Service' can be added via a '+' button. A second screenshot illustrates the 'Add MCP service' page, where a custom MCP server can be selected and added.
So far, you have completed the development and debugging process of a custom MCP server.