Windsurf · Setup

Backtest from Windsurf

Windsurf's Cascade agent supports MCP via a JSON config file. Point it at Bagtester and Cascade gets a 14-tool backtesting surface — submit, optimize, walk-forward, compare, manage subscription.

Setup

1

Get an API key

Sign up at bagtester.com/sign-up. Create a key with the bag_ prefix.

2

Edit your Windsurf MCP config

Open ~/.codeium/windsurf/mcp_config.json (create it if it doesn't exist) and add:

json
{
  "mcpServers": {
    "bagtester": {
      "serverUrl": "https://bagtester.com/api/mcp",
      "headers": {
        "Authorization": "Bearer bag_YOUR_KEY_HERE"
      }
    }
  }
}
3

Restart Windsurf and verify

After restart, open Cascade and ask:

prompt
list bagtester tools

Cascade should enumerate all 14 tools — including submit_strategy, optimize_strategy, and manage_subscription.

4

Run a backtest

prompt
backtest a Donchian channel breakout (entry=55, exit=20) on EURUSD for 2023-2024 with hybrid mode

Cascade writes the strategy, calls submit_strategy, and shows the structured result.

Tips for Windsurf specifically

Connect Cascade

Free tier: 500 credits/month. One JSON block, one restart.