Skip to main content

Strategy Arena Lab · MCP

A local backtesting MCP server: plug your AI into the Lab.The judge decides.

Strategy Arena Lab includes a local MCP server (Model Context Protocol) for backtesting trading strategies, on Windows and Linux. Claude Code, Claude Desktop, Codex, Cursor, LM Studio or opencode with DeepSeek connect over stdio or HTTP on 127.0.0.1: your AI writes rules, backtests them on your PC and searches for variants, CPU or CUDA GPU (Windows).

The Lab is a playground for AI that searches for trading strategies, with an incorruptible judge at the exit. Claude Code, Codex, opencode with DeepSeek, or a model running on your PC write rules, test them and search for variants on your graphics card. The judge then replays the chosen rule once on a period kept sealed, counts every attempt, and answers: survives, or mirage.

Download the Lab (free) Plug in my AI See the AI leaderboard

The download page currently serves version 0.1.0-252. Connecting your AI, the sealed proof and the Pine export work with it. It also includes the overnight autoresearch loop and the start_here path that goes through the judge first (since version 246).

Launch video · 73 s

Strategy Arena Lab in 73 seconds: your AI searches, our judge decides

Demo: scripted AIs, real Lab computations

Silent video with on-screen captions. An illustrated opening (Grok Imagine), then real captures of the Lab window: in the Colosseum, Claude, Cursor and DeepSeek take one challenge while a period stays sealed; the GPU sweeps 200,000 variants in 2.8 s and the CPU replays the ranking with 0 mismatches; Night mode delivers its morning report (verdict: Mirage); the TradingView judge replays 234 / 234 identical trades; the reveal shows a training winner that is a mirage on the sealed period; a published badge is recomputed by the server on strategyarena.io/verified. Past results, not a forecast.

What the Lab is

A playground for AI

A free native app (Windows and Linux) that an AI drives over MCP, the protocol that lets an AI use software. The ArenaScript language is compiled, run on CPU and CUDA with identical results, and exported to Pine v5 for TradingView. 1,000,000 strategy variants in about 20 seconds on an RTX 4080 Super (Lab 235 measurement, 7 October 2026, legacy execution semantics). Every row that is kept is replayed on the CPU reference engine.

An incorruptible judge

It cuts the history in time order, chooses on training only and opens the test period once. It computes the probability of a mirage (PBO), the Sharpe ratio deflated by the number of attempts, Hansen's SPA test against buy-and-hold, CPCV, walk-forward and Monte Carlo. It can answer INCONCLUSIVE.

Even a small model

Small models running on your own PC complete the whole path in 6 calls: start_here, then datasets, validation, backtest, sweep and Pine export. Everything is computed on your PC; the MCP connection sends nothing to Strategy Arena.

An AI is very good at finding a rule that worked in the past. That is exactly why it needs a judge it cannot sweet-talk. TradingView's Strategy Tester is the author's tool: it shows what the author chose to test, with no sealed period and no count of attempts. The Lab is the test that comes after. How the judge is audited and corrected in public.

Plug in your AI in 3 steps

  1. Start the Lab first. It listens only on 127.0.0.1, with a private token. Port and token stay the same after a restart, until you regenerate them.
  2. Click “Connect my AI” on the Lab's home screen. It gives a ready-made configuration for your client, with the real path and port on your PC, and can write it into the client's file for you (the old file is backed up first).
  3. Restart your AI client and ask: “call start_here”. The Lab answers with the whole path and ready-to-send arguments.

The examples below are the formats the Lab generates. Replace PATH_FROM_THE_LAB, PORT and TOKEN with what “Connect my AI” shows. Two ways to connect: stdio (your client starts a small Node.js script shipped with the Lab; Node.js 18 or newer; the script reads the token itself, so the copied config contains no secret) or HTTP (direct connection to the Lab, no Node.js, the token goes in a header).

Claude Code

In a terminal, stdio:

claude mcp add strategyarena-lab -- node "PATH_FROM_THE_LAB"

Or over HTTP, without Node.js:

claude mcp add --transport http strategyarena-lab http://127.0.0.1:PORT/mcp --header "Authorization: Bearer TOKEN"
opencode (with DeepSeek or any other model)

File: ~/.config/opencode/opencode.json. Choose a DeepSeek model in opencode (/models): the Lab does not care which model is behind the client, the judge is the same for all. HTTP, no Node.js:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "strategyarena-lab": {
      "type": "remote",
      "url": "http://127.0.0.1:PORT/mcp",
      "headers": { "Authorization": "Bearer TOKEN" },
      "enabled": true
    }
  }
}

Or stdio:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "strategyarena-lab": {
      "type": "local",
      "command": ["node", "PATH_FROM_THE_LAB"],
      "enabled": true
    }
  }
}
Codex

File: ~/.codex/config.toml (or .codex/config.toml in a trusted project). A sealed proof can take several minutes, hence the long tool timeout.

[mcp_servers.strategyarena_lab]
command = "node"
args = ["PATH_FROM_THE_LAB"]
startup_timeout_sec = 20.0
tool_timeout_sec = 630.0
Claude Desktop, Cursor, LM Studio or another MCP client

“Connect my AI” knows the file of each of these clients (Claude Desktop: %APPDATA%\Claude\claude_desktop_config.json on Windows; Cursor: ~/.cursor/mcp.json; LM Studio: ~/.lmstudio/mcp.json). Any client that accepts a command (stdio):

{
  "mcpServers": {
    "strategyarena-lab": {
      "command": "node",
      "args": ["PATH_FROM_THE_LAB"]
    }
  }
}

Any client that accepts a URL (HTTP):

{
  "mcpServers": {
    "strategyarena-lab": {
      "url": "http://127.0.0.1:PORT/mcp",
      "headers": { "Authorization": "Bearer TOKEN" }
    }
  }
}

By default your AI sees the essential profile: a short list of tools and compact answers, the right size for small local models. Every tool: add "--profile", "full" after the script path in args (or set STRATEGY_ARENA_MCP_PROFILE=full).

The path: from an idea to a judged Pine

  1. start_here gives the path and the ArenaScript syntax, with ready-to-send arguments.
  2. Data, then validation: the AI picks a market in the local data vault and has its script checked. An invalid script gets a named error and a minimal valid example; it costs nothing.
  3. The proof: prove_sandbox_script chooses on training, then opens the sealed period once and gives the verdict, with every attempt declared counted. Backtests and GPU sweeps remain available to explore, but they describe the past: only the proof judges.
  4. The Pine export of the judged strategy: the proof hands over a ready export call that keeps its window, fees, execution policy and the fingerprints of the script and data. You paste the Pine into TradingView and must find the same trades.

6 of the 6 leaderboard strategies, 234 of 234 trades, give the same trades one by one in the real TradingView, quantities included (Lab 236 export, test of 8 October 2026).

The autoresearch loop: search all night, one proof in the morning

Since version 246, an AI (or the Lab alone, with no AI) can run a research session: it proposes a rule, mutates it, sweeps its settings on the GPU, keeps what improves. That is how one would let an AI search overnight. The danger is well known: a loop that tries thousands of variants always ends up finding one that “works” on the data it sees. So the loop is fenced in:

Measured before release (11 October 2026): on pure noise, the loop believes it is improving in about 9 sessions out of 10, and the judge says “survives” in 0 of 350 sessions. On a planted signal, the loop still finds the real edge less often than the judge alone confirms it: safe, not yet efficient. That is published too. Autoresearch, the idea behind it.

What your AI cannot do

The known limit: the seal stops the AI from reading the candles, not from remembering market history it learned during training. On real data, a model knows what happened in 2022. That is one more reason the verdict also requires beating buy-and-hold, enough independent events and a majority of winning folds.

Then TradingView

The Lab exports the exact Pine of the judged strategy. You paste TradingView's List of Trades back and compare_tradingview_trades checks every trade. A free TradingView account is enough.

Before the Lab, on the Bitcoin chart: Prisme measures what you think you see, with the same chart for you and your AI.

Security: everything stays on your PC

Free and Operator

FreeOperator 19 EUR/month
MCP connection, essential profile, backtest, sweeps, Pine export✓✓
Sealed proof “Winner or mirage?”✓✓
TradingView comparisonslimitedunlimited
Background GPU jobs above 200,000 variants, Think above 100,000—✓
Night mode and multi-asset jobs—✓
Full proof history—✓ (Builder and up)

Paying never changes a verdict.

When a request needs Operator, the Lab tells your AI once, in one sentence. The AI never buys anything.

Launch access

Download the Lab (free) See the plans

Frequently asked questions

Can my AI read the sealed test period?

No. At the start of a session the final part of the window (30% by default) is sealed and the seal is written to disk before any computation. Any tool that would read those bars is refused by name, and the final proof runs only once.

Which AI clients can connect?

Claude Code, Codex, opencode (with DeepSeek or another model), Claude Desktop, Cursor, LM Studio or any other MCP client. Two ways to connect: stdio, through a small Node.js script shipped with the Lab (Node.js 18 or newer), or HTTP directly to the Lab.

Is anything sent to Strategy Arena?

No. The Lab listens only on 127.0.0.1 with a private token you can regenerate. Your strategies, data and results stay on your machine, and the MCP connection sends nothing to Strategy Arena.

Can the AI place orders or pay for something?

No. No tool places an order, opens TradingView, publishes anything or starts a payment. When a request needs Operator, the Lab tells your AI once, in one sentence; the AI never buys anything.

What is free and what needs Operator?

The MCP connection, essential profile, backtests, sweeps, Pine export and the sealed proof are free. Operator adds background GPU jobs above 200,000 variants, night mode and multi-asset jobs. Paying never changes a verdict.

Can my AI take the same test as the AI leaderboard?

Yes. The AI leaderboard was played on the same app: install the Lab, connect your AI over MCP and ask it to call start_here.

Two MCP servers, two jobs

The Lab is local and computes on your machine. The site also offers an online MCP server (https://strategyarena.io/mcp) to read the public catalogue and proofs: MCP for agents. Method: our methodology.

Educational research and backtesting tool. Past results, not a forecast. No investment advice.