> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitoearn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Trae Setup

> Configure AiToEarn MCP and skills in Trae

This guide shows how to integrate AiToEarn in Trae. Trae manages extensions through its plugin market, where you can configure the AiToEarn MCP Server or upload a skill package containing a `SKILL.md` file, then invoke AiToEarn capabilities directly from a conversation.

> [!NOTE]
>
> If you do not have an API Key yet, read [Get API Key](https://docs.aitoearn.ai/en/use/api-key.md).

## Prerequisites

Before you start, make sure you have:

1. An AiToEarn account and [AiToEarn API Key](https://docs.aitoearn.ai/en/use/api-key.md).
2. Trae installed and working.

## Configure MCP

Open the plugin market in Trae, go to the Manage page, switch to the MCP tab, click Add, and choose manual configuration.

![Manually configure MCP in the Trae plugin market](https://mintcdn.com/aitoearn/iMNQ9b6swanJ5SNC/assets/use/trae/01-configure-mcp.png?fit=max\&auto=format\&n=iMNQ9b6swanJ5SNC\&q=85\&s=7f60299ecf26a89b705b508d2b262913)

Paste the AiToEarn MCP Server configuration JSON into the input box (make sure the configuration comes from a trusted source before confirming). The `url` must match the site of your API Key: `https://aitoearn.cn/api/ai/agent/mcp` for the China site, `https://aitoearn.ai/api/ai/agent/mcp` for the international site:

```json theme={null}
{
  "mcpServers": {
    "aitoearn": {
      "url": "https://aitoearn.cn/api/ai/agent/mcp",
      "headers": {
        "X-Api-Key": "Your AiToEarn API Key"
      }
    }
  }
}
```

Save and go back to the MCP list to confirm the AiToEarn server is enabled. To confirm available model names, check [Chat models](https://docs.aitoearn.ai/api-reference/get-api-ai-models-chat.md).

> [!NOTE]
>
> If you have already uploaded the AiToEarn skill package below, its `scripts/aitoearn-mcp-setup.mjs` can register and verify the server automatically. Run `node scripts/aitoearn-mcp-setup.mjs <API_KEY> cn` (China site) or `node scripts/aitoearn-mcp-setup.mjs <API_KEY> ai` (international site) in a terminal.

## Upload a Skill Package

On the Skills tab of the Manage page in the plugin market, click Upload Skill and drag or select a `.zip` or `.skill` file that contains a root-level `SKILL.md` file.

![Upload a skill package in Trae](https://mintcdn.com/aitoearn/iMNQ9b6swanJ5SNC/assets/use/trae/02-upload-skill.png?fit=max\&auto=format\&n=iMNQ9b6swanJ5SNC\&q=85\&s=1bcafb334ed0d42da1cdcfef199ad31f)

The `SKILL.md` file declares the skill name and description in YAML format. After upload, Trae uses the description to understand when to use the skill.

You can download the ready-made AiToEarn Trae skill package:

[Download the AiToEarn Trae skill package](https://docs.aitoearn.ai/assets/downloads/aitoearn-trae-0.0.4.zip)

## Invoke a Skill

In the chat input box, click `+` in the bottom-left corner, choose Skills, and search by keyword to find your uploaded skills.

![Search and invoke a skill in chat](https://mintcdn.com/aitoearn/iMNQ9b6swanJ5SNC/assets/use/trae/03-search-skill.png?fit=max\&auto=format\&n=iMNQ9b6swanJ5SNC\&q=85\&s=813ad61f2ffeac6da5194188302887bc)

Select the skill and send your message. Trae will invoke the skill in the current conversation.

## Troubleshooting

* MCP connection failed: make sure the server URL is correct and the API Key comes from the [AiToEarn API Key page](https://docs.aitoearn.ai/en/use/api-key.md) and matches the site.
* Skill not recognized: make sure the archive contains a root-level `SKILL.md` with valid YAML name and description.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.