Trae is an AI-powered IDE developed by ByteDance that brings agentic coding capabilities to a VS Code-based environment. It uses project-scoped MCP configuration stored at .trae/mcp.json within the workspace root, using the standard mcpServers root key and the same field structure as Claude Desktop. Because the config is project-scoped, it can be committed to source control alongside your code, allowing teams to share a consistent set of MCP server tools. Trae's AI agent can call registered MCP server tools during code generation, refactoring, and debugging sessions. The getmcp CLI detects Trae by checking for the ~/.trae directory and writes configs to the project-level .trae/mcp.json.
Quick Install with getmcp
The fastest way to install MCP servers in Trae is with the getmcp CLI:
npx @getmcp/cli add <server-id>
Configuration Format
Format
JSON
Root Key
mcpServers
Project Config
.trae/mcp.json
Prerequisites
•Trae IDE installed (download from trae.ai)
•Node.js 18 or higher for running npx-based servers
•Python 3.10+ if installing Python-based servers
Popular Servers for Trae
Troubleshooting
▸Config file not created automatically: Trae does not create .trae/mcp.json by default. The getmcp CLI will create it for you, or create the .trae/ directory and mcp.json file manually.
▸Server not loading after config change: Reload the Trae window (Cmd+Shift+P / Ctrl+Shift+P, then Developer: Reload Window) after editing .trae/mcp.json.
▸Project config not shared with teammates: The .trae/mcp.json file should be committed to source control. Teammates can run getmcp sync after checkout to install servers into their own detected apps.
▸Environment variables exposed in source control: Avoid hardcoding API keys in .trae/mcp.json if the file is committed. Use the getmcp CLI which prompts for values separately, or reference variables via your CI/CD secrets.