Skip to content

feat: Add Trae MCP Server integration#56

Open
xhnoob wants to merge 2 commits intoHKUDS:mainfrom
xhnoob:feature/trae-mcp
Open

feat: Add Trae MCP Server integration#56
xhnoob wants to merge 2 commits intoHKUDS:mainfrom
xhnoob:feature/trae-mcp

Conversation

@xhnoob
Copy link

@xhnoob xhnoob commented Mar 13, 2026

  • Add mcp_server.py for Trae IDE MCP protocol support
  • Add .trae-plugin configuration files
  • Enable CLI-Anything to work with Trae IDE

xhnoob added 2 commits March 13, 2026 12:14
- Add mcp_server.py for Trae IDE MCP protocol support
- Add .trae-plugin configuration files
- Enable CLI-Anything to work with Trae IDE
@yuh-yang
Copy link
Collaborator

  • We need to have a separate directory for trae support, like .trae_support/, and move all the files down there. Note that cli-anything-plugin is inclusive for Claude Code support only
  • Does Trae support commands? If not, let's keep the MCP implementation!
  • After you finish, please also update README.md and the Chinese version. Make sure you add the community tag to the implementation.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Trae IDE integration for the cli-anything-plugin by introducing an MCP server entrypoint and Trae-specific configuration/docs, so the plugin can be used via Trae’s MCP (Model Context Protocol) mechanism.

Changes:

  • Added a Python FastMCP server (mcp_server.py) exposing CLI-Anything tools and documentation helpers.
  • Added Trae plugin configuration under .trae-plugin/ (plugin metadata + MCP server config).
  • Added a Trae integration guide (TRAE.md) describing setup and usage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
cli-anything-plugin/mcp_server.py Implements the MCP server and tool endpoints for Trae.
cli-anything-plugin/TRAE.md Documents how to configure and use the MCP server in Trae.
cli-anything-plugin/.trae-plugin/plugin.json Declares Trae plugin metadata and command triggers.
cli-anything-plugin/.trae-plugin/mcp-config.json Provides MCP server launch configuration for Trae.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +89 to +91
"version": "1.0.0",
"description": "Build CLI harnesses for any GUI application",
"entry": "mcp_server.py"
Comment on lines +110 to +118
for item in p.iterdir():
if item.is_dir():
cli_file = item / "agent-harness" / "cli_anything"
if cli_file.exists():
tools.append({
"name": item.name,
"path": str(item),
"status": "generated"
})
Comment on lines +138 to +143
def get_command_doc(command_name: str) -> str:
"""Get documentation for a specific cli-anything command"""
content = load_command_md(command_name)
if not content:
content = load_command_md(f"cli-anything-{command_name}")
return content or f"Command {command_name} not found"
@mcp.tool()
def cli_anything_list(path: str = ".", depth: int = 0, json_output: bool = False) -> str:
"""List all available CLI-Anything tools"""
import os
Comment on lines +108 to +119
if not p.exists():
return
for item in p.iterdir():
if item.is_dir():
cli_file = item / "agent-harness" / "cli_anything"
if cli_file.exists():
tools.append({
"name": item.name,
"path": str(item),
"status": "generated"
})
scan_dir(item, current_depth + 1)
"cli-anything": {
"command": "python",
"args": [
"D:\\AwesomeGithub\\CLI-Anything\\cli-anything-plugin\\mcp_server.py"
Comment on lines +65 to +80
### Step 2: Create mcp-config.json

Create `mcp-config.json` in `.trae-plugin` directory:

```json
{
"mcpServers": {
"cli-anything": {
"command": "python",
"args": [
"D:\\AwesomeGithub\\CLI-Anything\\cli-anything-plugin\\mcp_server.py"
]
}
}
}
```
Comment on lines +105 to +107
def scan_dir(p, current_depth):
if depth > 0 and current_depth > depth:
return
Comment on lines +42 to +45
CLI-Anything plugin should be located at:
```
D:\AwesomeGithub\CLI-Anything\cli-anything-plugin\
```
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.

3 participants