Skip to main content

Custom MCP Services

A custom MCP service is an MCP server you build and register on the Tuya platform to expose your own tools to an agent. This guide walks through creating, configuring, debugging, and adding one to an agent.

Create a custom MCP server

  1. Log in to the Tuya Developer Platform.

  2. Go to MCP Management > Custom MCP Service, then click Add custom MCP.

    Add custom MCP entry
    Add custom MCP entry

  3. In the Sign up MCP Server dialog, enter the service name and description in Chinese and English, upload an image as the icon, then click Confirm to save.

    Sign up MCP Server dialog
    Sign up MCP Server dialog

Configure the custom MCP server

warning

If your custom MCP service is deployed across multiple data centers, keep the service version and tool configuration consistent in every data center. Inconsistencies can disrupt agent orchestration or cause functional failures.

  1. After you create the MCP server, the platform redirects you to its Service Details page.

  2. Under Service Access Configuration Management > Data Center, click Add Data Center on the right, select a data center, then click OK.

    Add Data Center to a custom MCP server
    Add Data Center to a custom MCP server

  3. Click the selected data center to see the Endpoint, Access ID, and Access Secret. Copy these values to your local device — you need them when running the MCP SDK later. For more information, see the README in the GitHub source.

    Endpoint, Access ID, and Access Secret
    Endpoint, Access ID, and Access Secret

Access the MCP server via the SDK

Download the MCP SDK from GitHub and read its documentation. Only SSE mode is supported today.

MCP SDK on GitHub
MCP SDK on GitHub

Run and debug the MCP server

To confirm your custom MCP server works, run and debug it within the agent environment.

Run and debug

  1. In the selected data center, check the MCP server's service status.

    MCP server service status
    MCP server service status

  2. On the Tool tab, view the available tools for your MCP server.

    Available tools on the Tool tab
    Available tools on the Tool tab

  3. Click Test Run on the tool you want to test.

    Test Run on a tool
    Test Run on a tool

  4. In the Test Run window, click Run. When Commissioning passed appears in the lower-left corner, the MCP tool is debugged successfully.

    Commissioning passed in the Test Run window
    Commissioning passed in the Test Run window

Add the server to an agent

  1. Go to the My Agent page and click Develop in the Operation column.

  2. Under 01 Model Configuration > Skills Configuration, find Plugin and click + on the right.

    Plugin add button under Skills Configuration
    Plugin add button under Skills Configuration

  3. On the Add Tool page, select the MCP tab, click Custom MCP Service, and add the MCP server to your agent.

    Add Tool page with the MCP tab
    Add Tool page with the MCP tab

You have now completed the development and debugging of a custom MCP server.

See also