Skip to content

feat: add Trae CN MCP client configurator - #1392

Open
8ddieHu0314 wants to merge 1 commit into
CoplayDev:betafrom
8ddieHu0314:feat/support-trae-cn-solo
Open

feat: add Trae CN MCP client configurator#1392
8ddieHu0314 wants to merge 1 commit into
CoplayDev:betafrom
8ddieHu0314:feat/support-trae-cn-solo

Conversation

@8ddieHu0314

@8ddieHu0314 8ddieHu0314 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Trae CN (Trae 国内版) as a configurable MCP client. Trae CN is a separate install from international Trae with its own app, config directory, and user base, but was not offered in the client list.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Test update

Changes Made

  • New MCPForUnity/Editor/Clients/Configurators/TraeCnConfigurator.cs (+ .meta).

macOS: ~/Library/Application Support/Trae CN/User/mcp.json
Windows: %AppData%\Trae CN\User\mcp.json
Linux: ~/.config/Trae CN/User/mcp.json

Compatibility / Package Source

  • Unity version(s) tested: 6000.5.4f1 (manual in-Editor verification; automated EditMode suite not run locally — see Additional Notes)
  • Package source used: local file: checkout of this branch
  • Resolved commit hash from Packages/packages-lock.json: n/a (not a Git package URL)

Testing/Screenshots/Recordings

  • Python tests (cd Server && uv run pytest tests/ -v)
  • Unity EditMode tests
  • Unity PlayMode tests
  • Package import/compile check
  • Not applicable (explain why in Additional Notes)

Verified against a running Trae CN (macOS). Placed a server at ~/Library/Application Support/Trae CN/User/mcp.json and launched Trae CN — it loaded via the same McpClientService.startExtension path as international Trae:

McpClientService startExtension: mcp.config.usrlocalmcp.<server> {...}

This confirms the config location first-party, not by inference. Windows and Linux paths follow the same VS Code profile layout (%AppData%\Code\User, ~/.config/Code/User) and are inferred, not verified on those platforms.

Documentation Updates

  • I have added/removed/modified tools or resources
  • If yes, I have updated all documentation files using:
    • The LLM prompt at tools/UPDATE_DOCS_PROMPT.md (recommended)
    • Manual review of the generated changes

No tools or resources changed. The client-configurators guide lists example clients with "etc.", and new clients auto-appear in the Unity UI, so no doc edits are required.

Related Issues

Partially addresses #1326 — covers the trae-ch (Trae CN) request.

The traework / TRAE SOLO family is intentionally left out of this PR. TRAE SOLO (intl and CN) ships the solo-lite workbench and uses a different MCP mechanism (McpConfigService / PluginMcp / icubeAgentExtension.updatePluginMcpConfigs). Happy to follow up in a separate PR.

Additional Notes

Why no test. A Path.Combine assertion against a path literal restates the constant rather than verifying it, and would still pass if Trae CN relocated the file. The write/merge behavior is the base class's, already covered by the existing Trae tests; the class carries an XML-doc comment explaining the /User layout instead.

Summary by CodeRabbit

  • New Features
    • Added support for configuring the MCP server in the Trae CN editor.
    • Added platform-specific configuration paths for Windows, macOS, and Linux.
    • Added manual setup instructions accessible through the configuration workflow.

Trae CN (国内版) is a separate install from international Trae but the same
VS Code fork, so its MCP config lives at .../Trae CN/User/mcp.json. Adds
TraeCnConfigurator; it is auto-discovered, so no registration is needed.

Verified on macOS against a running Trae CN (server at User/mcp.json loads via
McpClientService.startExtension).
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b6c050e0-7afc-460c-9f08-a7cf6d7b8211

📥 Commits

Reviewing files that changed from the base of the PR and between 2fcc179 and 43810be.

📒 Files selected for processing (2)
  • MCPForUnity/Editor/Clients/Configurators/TraeCnConfigurator.cs
  • MCPForUnity/Editor/Clients/Configurators/TraeCnConfigurator.cs.meta

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Adds Trae CN support through a new configurator. The configurator defines platform-specific mcp.json paths and manual MCP setup instructions.

Changes

Trae CN MCP integration

Layer / File(s) Summary
Trae CN configurator and asset registration
MCPForUnity/Editor/Clients/Configurators/TraeCnConfigurator.cs, MCPForUnity/Editor/Clients/Configurators/TraeCnConfigurator.cs.meta
Adds TraeCnConfigurator with Windows, macOS, and Linux configuration paths. Adds manual setup steps for Trae CN and Unity asset metadata.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 43810

This adds Trae CN MCP configuration paths and manual setup guidance across supported platforms. The configuration is ready to merge with no concrete current-head risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description follows the repository template and explains the new Trae CN configurator, platform paths, compatibility, testing, documentation impact, related issue scope, and excluded TRAE SOLO sup…
Title check ✅ Passed The title is concise, specific, and accurately identifies the primary change: adding a Trae CN MCP client configurator.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant