Trae AI in ruler: where are project rules and mcp.json stored?
I'm adding Trae AI support to ruler (intellectronica/ruler) on Windows. Where does Trae read project rules from, and is MCP configurable through files? The GitHub issue for this is closed as completed, but the thread only discusses paths — I need the exact locations for project rules and any file-based MCP config.
Originally asked on GitHub: https://github.com/intellectronica/ruler/issues/49
3 answers
The issue is closed as completed, so Trae support has been added to ruler — but this thread only shows the proposal and discussion, not the merged code. A commenter suggested the integration should follow the existing Windsurf integration.
Confirmed paths from the thread:
- Project rules (what a new TraeAgent should write):
./.trae/rules/project_rules.md - User rules:
~/.trae/user_rules.md - MCP is not configurable via rule files. The only file-based MCP config is the global user config; on Windows a contributor found it at
C:\Users\<username>\AppData\Roaming\Trae\User\mcp.json. The Mac path was not confirmed, and Trae does not support Linux. - Official MCP docs referenced in the thread: https://docs.trae.ai/ide/model-context-protocol (opens external site)
The original request proposed a
TraeAgent(identifiertrae) that writes rules to$projectRoot/.trae/rules/project_rules.mdwith no MCP support; since the issue was closed as completed, this is presumably the design that was implemented.General advice:
mcp.jsoncan hold credentials for MCP servers, so keep it out of version control just likeclaude_desktop_config.json.Did this work for you?- Project rules (what a new TraeAgent should write):
What a GitHub user tried on GitHub (Outcome unclear)
Requested a new TraeAgent type in ruler that writes project rules to
.trae/rules/project_rules.mdwith no MCP support. The issue was closed as completed, but the thread does not show the actual implementation or confirm it works.Source: https://github.com/intellectronica/ruler/issues/49 (opens external site)
Did this work for you?What @abhishekbhakat tried on GitHub (Partly worked)
A contributor checked Trae's docs for a file-based MCP config, found
C:\Users\<username>\AppData\Roaming\Trae\User\mcp.jsonon Windows, and noted the Mac path was still unconfirmed and Linux unsupported. They added that platform-dependent paths are acceptable since ruler already handlesclaude_desktop_config.json.Source: https://github.com/intellectronica/ruler/issues/49#issuecomment-3061847571 (opens external site)
Did this work for you?
Related questions
- Does ruler support Amp, and where does it store rules?
- How do I stop ruler apply from creating .bak backup files?
- How can ruler support Roo Code .roorules / .roo/rules/* config files?
- Ruler generates backslashes on Windows, breaks Linux CI sync check
- Ruler 0.3.0–0.3.6 writes type:stdio instead of source:custom in .zed/settings.json