Trae CN MCP Server
Enables AI-assisted coding project management and stock market tools within OpenClaw through Trae CN IDE integration.
README
Trae CN Skill for OpenClaw
这个 Skill 为 OpenClaw 提供了 Trae CN AI IDE 的集成能力。
功能特性
- 🚀 启动和管理 Trae IDE
- 📁 创建 AI 编程项目
- 🎨 AI 代码生成
- ⚙️ MCP Server 配置
- 📊 量化交易工具集成
安装
1. 安装 Trae IDE (如果尚未安装)
brew install --cask trae-cn
2. 安装依赖
# 在 skill 目录下
cd skills/trae-cn
# 安装 Python 依赖 (如果需要 MCP Server)
pip3 install mcp --user
使用方法
OpenClaw 中使用
# 在 OpenClaw 中直接调用
@trae-cn launch # 启动 Trae
@trae-cn create-project --name my-app # 创建项目
@trae-cn generate --prompt "创建登录功能" # AI 代码生成
命令行使用
cd skills/trae-cn
# 显示帮助
python3 scripts/trae.py help
# 启动 Trae
python3 scripts/trae.py launch
# 创建项目
python3 scripts/trae.py create --name my-project --template python
# AI 代码生成
python3 scripts/trae.py generate --prompt "创建用户认证模块" --language python
# 配置 MCP Server
python3 scripts/trae.py configure-mcp --server stock --command "python3 mcp_server.py"
# 列出 MCP Server
python3 scripts/trae.py list-mcp
MCP Server 模式
在 Trae IDE 中使用 OpenClaw 功能:
# 1. 启动 MCP Server
python3 scripts/mcp_server.py
# 2. 在 Trae 中配置 MCP
# Trae 设置 → MCP → 添加 Server
# Command: python3 /path/to/skills/trae-cn/scripts/mcp_server.py
# 3. 在 Trae 对话中使用
# "帮我查一下 600519 的股价"
# "用 OpenClaw 选一下股"
MCP Tools
当配置为 MCP Server 时,提供以下工具:
| 工具名 | 功能 | 参数 |
|---|---|---|
stock_quote |
获取股票行情 | symbol: 股票代码 |
stock_pick |
AI 智能选股 | stocks: 股票列表, method: 评分方法 |
risk_analysis |
风险管理分析 | symbol, shares, price |
technical_indicator |
技术指标 | symbol, indicator |
create_project |
创建项目 | name, template |
run_strategy |
运行回测 | strategy, symbol |
配置文件
Trae MCP 配置示例
在 Trae 中添加 MCP Server:
{
"mcpServers": {
"openclaw": {
"command": "python3",
"args": ["/path/to/skills/trae-cn/scripts/mcp_server.py"],
"env": {}
}
}
}
环境变量
# 可选: 设置 AI 模型
export TRAE_MODEL="deepseek-v3"
# 可选: 设置 API Key
export OPENCLAW_API_KEY="your-key"
项目结构
trae-cn/
├── SKILL.md # Skill 说明文档
├── package.json # 配置文件
├── README.md # 本文件
└── scripts/
├── trae.py # Trae 工具脚本
└── mcp_server.py # MCP Server
集成 OpenClaw 功能
这个 Skill 集成了以下 OpenClaw 功能:
1. 股票数据
from src.data.stock_api import StockDataAPI
api = StockDataAPI(data_source="sina")
quotes = api.get_realtime_quote(["600519", "000001"])
2. AI 选股
from src.strategies.ai_stock_picker import AIStockPicker
picker = AIStockPicker()
results = picker.pick_by_ai_score(["600519", "000001"])
3. 风险管理
from src.utils.risk_manager import RiskManager
risk = RiskManager(initial_capital=10000)
risk.add_position("600519", 100, 1500.0)
常见问题
Q: 如何在 Trae 中使用这个 Skill? A: 启动 MCP Server 后,在 Trae 对话中直接描述需求即可。
Q: 需要安装 Trae IDE 吗? A: 不需要。MCP Server 模式可以在任何 IDE 中使用 OpenClaw 功能。
Q: 支持哪些编程语言? A: Python 是原生支持,其他语言可以通过 Trae IDE 的 AI 功能实现。
参考
- Trae 官网: https://www.trae.com.cn
- Trae 文档: https://docs.trae.com.cn
- MCP 协议: https://modelcontextprotocol.io
- OpenClaw: https://github.com/openclaw/openclaw
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.