Skip to content
TraeIDE

Search

Popular pages

No matching pages

Try a tool name or a topic such as pricing or MCP.

English

Trae MCP Setup & Troubleshooting

Connect tools through the marketplace or project configuration, and diagnose failures one layer at a time.

Last verified: · How we verify

Start with the right configuration scope

The official China documentation supports marketplace installation, manual configuration and project-level .trae/mcp.json. Regional clients can differ; confirm the options in your installed build. Enable project MCP in settings only for a workspace you trust.

A minimal project file

This is a valid empty configuration, not a working integration. Add the server block supplied by the server’s official maintainer. Keep command and arguments separate, and keep credentials out of shared project files.

{
  "mcpServers": {}
}

Example: Playwright MCP for a local web app

Microsoft’s Playwright MCP repository publishes an npx-based server configuration. The example below uses TRAE’s documented mcpServers shape. Install a supported Node.js version first, add this to .trae/mcp.json and enable project MCP. The -y option lets npx install the package without an interactive prompt. This is a documentation-based template; we have not run it inside a TRAE client.

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}
  1. Start your local development server.
  2. Ask the agent to open that local URL and report the page title before making changes.
  3. If the server cannot launch, inspect its log and check the Node.js executable visible to the IDE.
  4. For a repeatable team setup, pin a package version after validating it.

Diagnose the failing layer

Test one server and one harmless read operation before enabling several integrations.

  1. JSON: remove comments and trailing commas; validate the file.
  2. Local process: confirm npx or uvx is installed and visible to the IDE process.
  3. Executable: use command for the executable and args for its arguments.
  4. Authentication: confirm the server’s documented credentials and permissions.
  5. Connection: inspect the MCP server log for the actual error before changing timeouts.

Choose an integration by the task

For a repository, start with a read-only code or issue lookup. For a database, start with a restricted query account. For browser testing, start with a local development page. A server being listed in a marketplace is not a reason to give it unrestricted access.