Connect an AI agent in Claude Code or Cursor to RiskGate over the Model Context Protocol, and it can run the entire trading-research loop for you: read market data, write a strategy in TypeScript, backtest it on years of real candles, read the trades back, and refine it. You describe the idea; the agent does the plumbing.

What your agent can do

Once connected, the agent has a focused set of tools scoped to your account:

What comes out is readable, editable TypeScript that you own — the indicators (EMA, RSI, MACD, Bollinger, Donchian, ATR and 25+ more) are built in, so it's real code, not a black box.

How to connect

From your RiskGate account you copy a one-line install command and run it in your terminal. It installs the MCP server and registers it with Claude Code and Cursor. Restart your agent afterward so it picks up the new server. It needs Python 3.10+ and either Claude Code or Cursor installed.

The loop, concretely

Say you want to test: go long when the fast EMA crosses above the slow EMA on BTC 4h. The agent reads the strategy API, writes the TypeScript, validates it, saves it, and runs a backtest across years of 4-hour candles. Back come the equity curve, win rate, profit factor, max drawdown, and every trade it took. From there it can tune the EMA lengths, swap the entry for a Donchian breakout, and line the variants up side by side — all in one conversation.

Backtests you can trust

The engine fills every order at the next bar's open and shows a strategy only the bars up to the current cursor, so a result reflects how the idea would genuinely have traded, with hindsight kept out of it. You get the full trade list — every entry and exit — to audit exactly why the equity curve moved. When a strategy holds up here, the number is real.

Where it fits

Charting and backtesting in the browser are free, with no account. The MCP server is a paid add-on on top of an account. None of it requires exchange keys: research and backtesting are entirely separate from live trading, which is its own optional gateway tier. You can take an idea from a sentence to a tested strategy without ever touching a live account.

Connect your AI agent and take an idea from a sentence to a tested strategy.

Open the platform