Trae CN Integration
This document describes how to integrate Foggy MCP service with ByteDance's Trae IDE.
About Trae
Trae is an AI-native IDE from ByteDance, with built-in models like Deepseek and Doubao. MCP protocol support was added in v1.3.0.
Prerequisites
- Trae CN v1.3.0 or higher
- Foggy MCP service running (see Quick Start)
Configuration Methods
Method 1: JSON Configuration (Recommended)
- Open Trae IDE
- Click Settings icon (top right) → MCP
- Click Raw Configuration (JSON) button
- Add the following to
mcp.json:
json
{
"mcpServers": {
"foggy-dataset": {
"url": "http://localhost:7108/mcp/analyst/rpc"
}
}
}Method 2: MCP Market
If Foggy MCP is published to Trae MCP Market:
- Click Settings → MCP → Add
- Search for "foggy" or "dataset" in the market
- Click add and configure
Endpoint Selection
| Endpoint | Use Case | Description |
|---|---|---|
/mcp/analyst/rpc | Data Analysis | Structured queries, recommended |
/mcp/admin/rpc | Full Access | All tool permissions |
/mcp/business/rpc | Simple Queries | Natural language only |
Verify Configuration
After configuration, MCP service status shows in the MCP list:
- Green: Connection successful
- Red: Connection failed, click to view error
For issues, check logs:
- Windows:
C:\Users\<username>\AppData\Roaming\Trae CN\logs - macOS:
~/Library/Application Support/Trae CN/logs
Using with Agents
Trae's Builder with MCP is a built-in agent that automatically includes configured MCP services.
Usage Steps
- Open AI Chat panel
- Select Builder with MCP agent
- Enter natural language query:
Query sales data for the last week, grouped by product categoryAdd to Custom Agent
You can add MCP service to custom agents:
- Go to Agent Settings
- Add
foggy-datasetin Tools section - Agent will automatically call MCP tools
Usage Examples
Data Query
Query order statistics for the last 7 daysData Analysis
Analyze sales data, find top 10 categories by revenueReport Generation
Generate monthly sales comparison report by storeCode Generation
Query user table structure, generate TypeScript interfaceConfiguration with Authentication
If MCP service requires authentication:
json
{
"mcpServers": {
"foggy-dataset": {
"url": "http://localhost:7108/mcp/analyst/rpc",
"headers": {
"Authorization": "Bearer your-token"
}
}
}
}Multi-Project Configuration
Configure multiple MCP services:
json
{
"mcpServers": {
"sales-data": {
"url": "http://sales-server:7108/mcp/analyst/rpc"
},
"inventory-data": {
"url": "http://inventory-server:7108/mcp/analyst/rpc"
}
}
}Troubleshooting
MCP Service Shows Red
Check if MCP service is running:
bashcurl http://localhost:7108/actuator/healthVerify endpoint path is correct (use
/rpc)Check Trae logs for detailed error
Configuration Not Working
- Ensure JSON format is correct
- Restart Trae IDE
- Verify URL is accessible
Tool Call Failed
- Check MCP service logs
- Verify datasource connection
- Try simpler query for testing
Comparison with Other IDEs
| Feature | Trae CN | Cursor | Claude Desktop |
|---|---|---|---|
| Free to Use | ✅ | Partially | Subscription |
| Built-in Models | Deepseek/Doubao | Claude | Claude |
| MCP Support | ✅ | ✅ | ✅ |
| Agents | ✅ Built-in | ✅ | ❌ |
| Code Integration | ✅ | ✅ | ❌ |
References
Next Steps
- Cursor Integration - Use with Cursor
- Claude Desktop Integration - Use with Claude Desktop
- Tools List - View all available tools
