Open
Conversation
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
- Add mcp_server.py for Trae IDE MCP protocol support - Add .trae-plugin configuration files - Enable CLI-Anything to work with Trae IDE
Collaborator
|
Contributor
There was a problem hiding this comment.
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
FastMCPserver (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\ | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.