Trae supports MCP via Settings → MCP → Manual Configuration, or a project-level `.trae/mcp.json` file (requires enabling Project MCP in beta settings).
OVERVIEW
Trae is an AI-powered IDE by ByteDance with native MCP support. You can add servers through the Settings panel or by placing a `.trae/mcp.json` file in your project root. Project-level config requires enabling a beta feature first. The JSON format is the standard `mcpServers` shape used by most editors.
CONFIG FILE LOCATION
Save to .trae/mcp.json in your project root, or add via Settings → MCP → Add MCP Server → Manual Configuration.
Paste the JSON exactly as shown. The format is the same as Cursor and VS Code.
Replace `mcp_sk_your_key_here` with the real key from Dashboard → API Keys.
{ "mcpServers": { "zephex": { "command": "npx", "args": ["-y", "zephex"], "env": { "ZEPHEX_API_KEY": "mcp_sk_your_key_here" } } }}Add the server through the Trae UI:
Verify the server is connected.
Settings → Beta → "Enable Project MCP" must be turned on. Without this, `.trae/mcp.json` is ignored entirely.
Verify the JSON syntax is valid and `npx` is on your PATH. Try restarting Trae if the server was added while a session was active.
The `.trae/mcp.json` file must be in the workspace root directory. Subdirectories are not scanned.
Double-check your API key is correct and has not expired. Generate a new key from the Zephex dashboard if needed.
If the editor still does not connect, return to Quickstart or check Connection Issues.