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"]
}
}
}- Start your local development server.
- Ask the agent to open that local URL and report the page title before making changes.
- If the server cannot launch, inspect its log and check the Node.js executable visible to the IDE.
- 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.
- JSON: remove comments and trailing commas; validate the file.
- Local process: confirm npx or uvx is installed and visible to the IDE process.
- Executable: use command for the executable and args for its arguments.
- Authentication: confirm the server’s documented credentials and permissions.
- 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.