How to trade with TRAE (ByteDance)
Short answer: TRAE (trae.ai) and TRAE CN (trae.cn) both accept remote MCP servers. Open Settings → MCP, click Add → Create Manually, paste a JSON block with
https://api.openfinance.tech/agent/mcpand your OpenFinance key inheaders, and click Confirm. TRAE's built-in Agent then gets the OpenFinance tools. Ask it for the BTC price to check it works.
MCP URL: https://api.openfinance.tech/agent/mcp · HTTP streamable · works with any MCP client · one URL, no SDK · no KYC on OpenFinance · fund with a debit card.
Setup in 60 seconds: get your OpenFinance key and start trading all markets.
How TRAE connects to tools
TRAE supports three MCP transports: stdio, SSE and Streamable HTTP. Streamable HTTP and custom headers arrived in TRAE v1.4.1 (TRAE CN v0.6.1) in June 2025, so update first if your version is older. A remote server takes a url and optional headers, which is where the x-api-key header goes. TRAE v3.5.51 (TRAE CN v3.3.51, April 2026) added OAuth sign-in for MCP servers, but TRAE's setup guide doesn't describe that flow yet, so this page uses the key. Every server you add is available to the built-in Agent; custom agents pick their servers and tools when you create them. TRAE keeps at most 40 MCP tools and 8,000 characters of MCP descriptions across all your servers, and drops tools past those limits. OpenFinance has 18 tools, so switch off MCP servers you don't use and check that all of them appear.
Set up TRAE in under 60 seconds
- Update TRAE (or TRAE CN) to a current version.
- Open Settings → MCP (设置 > MCP). In the Agent window, pick the runtime: Local for local and worktree tasks, Cloud for cloud tasks.
- Click Add → Create Manually (添加 > 手动添加).
- Paste the JSON below (put your key in place of open_xxxxx) and click Confirm (确认).
- In the Agent, ask for the BTC price through OpenFinance to confirm the tools work.
{
"mcpServers": {
"openfinance": {
"url": "https://api.openfinance.tech/agent/mcp",
"headers": { "x-api-key": "open_xxxxx" }
}
}
}
Get your OpenFinance key at openfinance.tech (sidebar → External AI), then fund it with a debit card or crypto. To share the server with one project only, turn on Enable Project MCP under Settings → MCP and put the same block in .trae/mcp.json in the project root (don't commit your key).
Keep approvals on
TRAE asks for your authorization the first time it connects to an external MCP server. After that, whether each tool call needs your approval depends on your settings:
- Older permission settings: under Settings → Conversation → Auto-Run, keep Automatically Run MCP off (for IDE and SOLO mode) so the agent doesn't run OpenFinance tools on its own.
- New permission system (in TRAE CN, turn it on first under 设置 > Beta): TRAE's docs say Manual Approval (手动审批) asks before file access outside the default scope and dangerous commands, and don't say it covers MCP tools. To approve each MCP call, use a Custom mode: Settings → Permission Approval → Regular Tasks → Permission Mode, click Open Config next to Custom Configuration, and turn off automatic MCP tool runs in
global.json. Don't use Full Access for trading: it triggers no approvals. - OpenFinance also tells the agent to show you a summary of each order and wait for you to reply "confirm" before it acts.
What TRAE can trade through OpenFinance
TRAE's Agent can trade crypto spot and leveraged perps on Hyperliquid, onchain stocks such as TSLA and NVDA, forex, Solana and Base memecoins, and Polymarket prediction markets, all with one OpenFinance account. Options are available through your own IBKR or Robinhood account connected in the OpenFinance app. The full market list is on the hub page.
Prompts to try in TRAE
- “Using OpenFinance, what's my balance, and what are BTC, ETH and SOL doing today?”
- “Using OpenFinance, go long BTC 5x with $50 on Hyperliquid and set a stop 4% below entry.”
- “Using OpenFinance, buy $25 of tokenized NVDA and $25 of TSLA.”
- “Using OpenFinance, show the top trending Solana memecoins and buy $10 of the one with the most volume.”
- “Using OpenFinance, show my open positions as a table.”
FAQ
Can TRAE trade crypto?
Yes, once OpenFinance is added as an MCP server. TRAE's Agent calls OpenFinance's tools to quote, buy, sell and open perps.
Does this work in TRAE CN?
Yes. TRAE and TRAE CN use the same MCP setup: Settings → MCP → Add → Create Manually (设置 > MCP > 添加 > 手动添加). Only the version numbers differ.
Which TRAE version do I need?
Streamable HTTP with custom headers needs TRAE v1.4.1 or TRAE CN v0.6.1 (June 2025) or later.
Why don't all the OpenFinance tools show up?
TRAE keeps at most 40 MCP tools and 8,000 characters of MCP descriptions across all servers. Switch off servers you don't need so all 18 OpenFinance tools fit.
Can I use OAuth instead of a key?
TRAE added OAuth for MCP servers in v3.5.51 (TRAE CN v3.3.51), but its setup guide doesn't document the steps yet. The key header is the documented way.
How do I stop TRAE trading?
Delete the OpenFinance server under Settings → MCP, or revoke the key in OpenFinance. An agent can't send funds to anyone else's address with your key; it can only move funds between your own wallets.
Related
- Make any AI agent trading-compatible: every agent and market in one place
- Trade with Kimi, Trade with Cherry Studio, Trade with Qwen, Trade with DeepSeek
- Hyperliquid MCP server
- Polymarket MCP server
- Security: what an agent can and can't do with your key
Sources: https://docs.trae.ai/ide/add-mcp-servers, https://docs.trae.ai/ide/changelog, https://docs.trae.ai/ide/permission-and-approval, https://docs.trae.cn/ide_troubleshoot-mcp-server-related-issues
Trading involves risk, especially with leverage and memecoins. Start small.