TraderWAI
PlatformsAIsPricingDocsBlogInvestorsContact
Sign inStart free
All posts
GuidesNovember 2, 2026· 6 min read

Build an AI trading bot in Cursor with TraderWAI (MCP)

Connect Cursor's Agent to live charts, 1-minute backtests and your broker with the TraderWAI MCP server, then turn a tested rule into an order with a stop. Step by step.

Gold chart marked up by the AIYour AI analyses, draws on the chart and trades on your broker. Free, no card.Connect your AI freeBuild an AI trading bot in Cursor with TraderWAI (MCP)

Cursor's Agent is good at turning an idea into something that runs. Point it at a trading idea, though, and it gets stuck: it has no market data, no backtesting engine and no way to reach your broker. TraderWAI fills that gap with one MCP server. Add it once and the Agent can read live charts, backtest a rule on 1-minute history and place orders with a stop loss on your account, while you decide what actually gets executed.

This guide installs it, then walks through a full loop in Agent mode: read the market, backtest a rule, turn it into a conditional order and lock everything down with a project rules file.

What the Agent gets

  • Market data: get_chart (chart image), get_ohlc (candles with exact prices and times), get_quote (your broker's bid/ask), get_market_structure (swings, BOS/CHoCH and zones), plus list_symbols and list_timeframes. Forex, gold, silver, indices, oil and crypto.
  • Backtests: backtest_strategy runs a rule on our 1-minute history and returns every trade, win rate, total R, drawdown and a breakdown by month, weekday and hour. It is pure calculation on the server, not the model guessing.
  • Your accounts: get_broker_accounts, get_broker_account_state, get_positions, get_trade_results and get_risk_limits.
  • Orders: execute_trade, modify_position, close_position, suggest_order (you approve it in the panel) and conditional orders (create_conditional_order, get_conditional_orders, cancel_conditional_order) that TraderWAI checks every minute.

Supported platforms: MetaTrader 5, cTrader, TradeLocker, Match-Trader, Binance and Bybit, plus MetaTrader 4, DXtrade, Capital.com and tastytrade in beta.

Step 1: add TraderWAI to Cursor

The quickest way is the install link: [Add TraderWAI to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=TraderWAI&config=eyJ1cmwiOiJodHRwczovL21jcC50cmFkZXJ3YWkuY29tIn0%3D). Cursor opens with the server filled in; confirm it.

Or add it by hand to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project only):

{
  "mcpServers": {
    "traderwai": {
      "url": "https://mcp.traderwai.com"
    }
  }
}

Then open Settings → Tools & MCP, click Login next to traderwai and sign in with Google or Microsoft. There is no API key to copy or leak: access goes through OAuth, and your TraderWAI account is created on that first sign-in if you don't have one.

Step 2: connect a demo account

In the TraderWAI panel go to Settings → Brokers → Add account. Start with a demo account: everything works the same and mistakes cost nothing. cTrader asks you to approve access with your cTrader ID; MetaTrader, TradeLocker and Match-Trader ask for the login and server. Your credentials are stored encrypted and are never shown to the AI. For MetaTrader there is a step-by-step guide: connect Cursor to MetaTrader 5.

Step 3: a full loop in Agent mode

Open the chat in Agent mode. The prompts below are the ones we use; adjust the symbol and times to your market.

1. Read the market (no trades).

"Use TraderWAI. Get the EUR_USD H4 chart and the last 2 days of M15 candles. Then call get_market_structure on M15 and tell me the trend, the last BOS or CHoCH and today's Asian session high and low. Don't place anything."

2. Backtest a rule. A classic London breakout:

"Backtest on EUR_USD, last 14 days: buy when an M15 candle closes above the Asian session high between 07:00 and 10:00 UTC, stop at the Asian low, target 2R, close any open trade at 16:00 UTC. Add 0.8 pips of spread. Then run the mirror sell rule and compare both."

The Agent turns that into a rule and calls backtest_strategy. The entry part looks like this:

"conditions": [
  {"type": "close_above", "timeframe": "M15",
   "level": {"ref": "session_high", "session": "asia"}},
  {"type": "time_window", "start": "07:00", "end": "10:00"}
],
"trade": {"side": "buy",
  "stop": {"type": "level", "ref": {"ref": "session_low", "session": "asia"}},
  "target": {"type": "rr", "value": 2}, "closeAt": "16:00"}

Developer tip: ask the Agent to save each rule as a JSON file in your repo (for example strategies/london-breakout.json). Now your strategies are versioned in git, and "backtest every file in strategies/ and give me a table" becomes a one-line prompt. Indicator rules work the same way, for example an EMA cross: compare with crosses_above between the H1 EMA 20 and EMA 50, filtered by price above the D1 EMA 200.

Read the result with a cool head. Two weeks gives a handful of trades: enough to check the rule does what you meant, not enough to prove it works. Ask for the breakdown by weekday and hour and for sensitivity: true, which reruns the rule with neighbouring parameters.

3. Turn it into a conditional order.

"Turn the buy rule into a conditional order for today on my demo account: same conditions, stop at the Asian low, take profit at 2R, size by risk at 0.5% of the balance. Check get_risk_limits first and show me the full order before creating it."

The Agent calls get_broker_accounts, get_risk_limits and then create_conditional_order. From then on it runs on TraderWAI's servers, checked every minute, so Cursor and your laptop can be closed. Two things to know: it fires once, and an entry rule lasts at most 24 hours, so ask the Agent each morning to recreate it with that day's levels. Use get_conditional_orders to see its status and cancel_conditional_order to remove it. If you prefer to confirm each trade yourself, ask for mode: "suggest": when the rule fires, the order waits in your panel for your approval.

Step 4: guardrails in .cursor/rules

A project rule keeps the Agent careful in every chat, not just when you remember to ask. Create .cursor/rules/trading.mdc:

---
description: Safety rules for trading with the TraderWAI MCP tools
alwaysApply: true
---
# Trading with TraderWAI

- Use a demo account unless I name a live account in this chat.
  Call get_broker_accounts first and say which account you will use.
- Never call execute_trade, execute_trade_multi, modify_position,
  close_position, create_conditional_order or set_auto_execution_config
  without first showing me: account, symbol, side, entry, stop loss,
  take profit and size. Wait for my explicit "yes".
- Every entry has a stop loss. Size by risk: at most 0.5% of the
  balance lost if the stop is hit.
- Call get_risk_limits before proposing a trade and stay inside them.
  If a tool returns RISK_LIMIT or PLAN_LIMIT, stop and explain.
  Never retry or work around it.
- Backtest with backtest_strategy, with realistic costs, before creating
  a conditional order. Never compute backtests yourself from get_ohlc.
- Never turn on auto-execution unless I ask for it in this chat.

Also keep Cursor's auto-run off for the TraderWAI order tools, so every call shows a button you have to click. The rules file and Cursor's own confirmation are two independent locks.

Starter repo

To skip the setup, clone traderwai-cursor-starter: it has the mcp.json, a rules file like the one above (demo first, explicit confirmation before every order) and ready-to-use prompts for each step of this guide.

Plans

Charts and market data are unlimited on every plan, including Free. Free also covers 5 backtests a day over the last 14 days, 1 broker account, 5 order executions a day and 2 active conditional orders, enough to run the whole loop on a demo account. cTrader, TradeLocker, Match-Trader, DXtrade, Capital.com, tastytrade, Binance and Bybit work on Free. Risk limits enforced on every order (max risk per trade, daily loss, prop firm rules) start with Plus, and MetaTrader 4/5 needs the Trader plan. Longer backtest history comes with paid plans. See pricing.

Common questions

Does my computer have to stay on? Not for conditional orders: they run on TraderWAI's servers. Cursor is where you build, test and create them.

Which model should I use? Any model in Cursor that supports tool calls in Agent mode. The backtest and the order checks are the same whichever model you pick, because they run on the server.

Does the Agent see my broker password? No. Credentials are stored encrypted on TraderWAI and never shown to the AI.

Is this a "set and forget" bot? No, and it shouldn't be. Treat it as a fast way to test ideas and execute a plan with a stop on every trade. Past results do not guarantee future results.

Not financial advice. Trading involves risk and you can lose money. Test everything on a demo account first. TraderWAI is a technology tool, not investment advice.

Try it with your own AI

Connect Claude or ChatGPT to your broker in a few minutes. Free plan, no card.

Start free

Weekly AI news for traders on our Telegram channel (no signals)

Trading leveraged products carries a high risk of loss. TraderWAI is a technology tool: it is not investment advice and it is not a broker.

Keep reading

Guides
AI trading on a prop firm challenge: how to set up Claude or ChatGPT safely
Guides
Broker MCP server: connect Claude or ChatGPT to your broker (Exness, FTMO, Pepperstone…)
TraderWAI

Connect any AI to your broker, with you in control.

Product
  • Platforms
  • AIs
  • Pricing
  • Docs
  • Status
  • Sign in
Resources
  • Connection guides
  • Broker guides
  • Best MCP servers for trading
  • Strategy backtests
  • Markets today
  • FAQ
  • Blog
  • Telegram: AI news for traders
Company
  • Investors
  • Contact
  • Brokers and prop firms
Legal
  • Privacy
  • Terms

Trading leveraged products such as CFDs, forex and futures carries a high risk of losing money. TraderWAI is a technology tool: it does not provide investment advice and does not manage funds. The AI's analyses and proposals are not recommendations; you decide every order.

© 2026 TraderWAI · FLEXIN AGILE LTD