// guide

Run backtests from Claude, Cursor or any MCP client

Connect an AI assistant to Janorium and it stops guessing numbers: it writes the strategy config, checks it, runs it on Binance spot or futures history and reads the result itself. The connector is janorium-mcp, a free open-source MCP server; it needs a Janorium account and an API key.

6 min read

How it works

MCP (Model Context Protocol) is how AI assistants call outside tools. janorium-mcp is a small program that runs on your computer next to the assistant and gives it 27 tools over the Janorium API, under your API key: validate a config, run a quick trial, save a strategy, launch backtests, read trades and metrics, run the optimizer and research scans. Saved runs land in your account on janorium.com like any other backtest.

Janorium only backtests. Nothing in the server or the platform places orders or connects to an exchange account, and the platform is free. How Janorium backtests explains how every number the assistant reads is computed.

Before you start

  1. An account. Create one if you do not have it — it is free.
  2. Node.js 20.9 or newer. The assistant starts the server with npx, which comes with Node.js. node --version in a terminal shows what you have.
  3. An API key. Open Settings → API keys → Create key. read and run cover strategies and backtests; add optimize for the optimizer and research for research scans. Add publish only if the assistant may make a strategy public. The full key is shown once — copy it then.

Claude Desktop

In Claude Desktop open Settings → Developer → Edit Config. That opens claude_desktop_config.json. Add the server under mcpServers, with your key in place of cbk_your_key_here:

{
  "mcpServers": {
    "janorium": {
      "command": "npx",
      "args": ["-y", "janorium-mcp"],
      "env": { "CB_API_KEY": "cbk_your_key_here" }
    }
  }
}

Save the file, quit Claude Desktop completely and start it again. If the file already has other servers, add the janorium entry next to them rather than replacing the whole file.

{
  "mcpServers": {
    "janorium": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "janorium-mcp"],
      "env": { "CB_API_KEY": "cbk_your_key_here" }
    }
  }
}

Claude Code

One command in a terminal adds the server for all your projects:

claude mcp add --env CB_API_KEY=cbk_your_key_here --transport stdio --scope user janorium -- npx -y janorium-mcp

Keep the order: options first, then the name janorium, then -- and the command. --env must not come right before the name — Claude Code would read the name as another variable. /mcp inside Claude Code shows whether the server connected.

Cursor

Put the same entry in ~/.cursor/mcp.json to use it in every project, or in .cursor/mcp.json in one project:

{
  "mcpServers": {
    "janorium": {
      "command": "npx",
      "args": ["-y", "janorium-mcp"],
      "env": { "CB_API_KEY": "cbk_your_key_here" }
    }
  }
}

Other MCP clients

Any client that starts local (stdio) MCP servers works the same way: the command is npx -y janorium-mcp and the one required variable is CB_API_KEY. The server is also listed in the official MCP Registry as com.janorium/mcp.

ChatGPT adds MCP servers by their web address, so it cannot start one on your computer. In ChatGPT, use the other route: the assistant writes the config and you paste it into Janorium.

What to ask

Ask in plain words, as you would ask a person who has the platform open:

  • “Backtest buying BTCUSDT when the daily RSI(14) drops below 30 and selling above 70, from 2021 to 2024, with fees. Show the drawdown.”
  • “Which futures symbols have data since 2020?”
  • “Take my strategy #12 and run it on ETH and SOL as well. Is the result the same?”
  • “Why did my strategy make no trades in 2022?”

The assistant reads what the tools return — the engine’s numbers, not its own estimates. Judge them like any backtest: on more than one coin and period, with suspicion of anything that looks too good. What backtesting is and how it misleads covers the traps.

What the assistant can do

Strategies
Toolsstrategy_validate, strategy_dry_run, strategy_save, strategy_get, strategy_versions, strategy_set_visibility
What forCheck a config, run a quick trial without saving, save and read strategies and their versions
Backtests
Toolsbacktest_run, backtest_get, backtest_trades, backtest_signals, backtest_compare, backtest_near_miss, backtest_monte_carlo, backtest_risk_scaling
What forSaved runs, their metrics and trades, why a signal did not fire, comparison, Monte Carlo, position size for a target drawdown
Optimizer
Toolsoptimization_create, optimization_get, optimization_promote
What forSearch parameters and check the chosen variant on data it was not fitted on
Research
Toolsresearch_scan, research_job_create, research_job_get, research_draft
What forTest a hypothesis across coins
Market data
Toolsmarket_symbols, market_coverage
What forWhich symbols and timeframes have history, and since when
Campaigns
Toolscampaign_start, campaign_status, campaign_finalize
What forSearch with a held-out period
Waiting
Toolswait
What forWait for a long run to finish

Keep the key safe

  • The key acts as you within its scopes. Use a separate key for each assistant, with only the scopes it needs, and never paste it into a chat.
  • What a key cannot do: manage API keys, change your account, delete strategies or reach anything to do with exchanges.
  • Lost it? Revoke it in Settings → API keys; it stops working at once. Changing your password revokes all keys.
  • The server runs on your computer with your user’s rights, like any program you install. Version updates arrive through npm; to update by hand instead, pin one: janorium-mcp@0.1.0.
  • Text from other users — the names and descriptions of their public strategies — reaches the assistant marked as untrusted, so it is read as data, not as instructions.

Questions

Is there an MCP server for crypto backtesting?

Yes. janorium-mcp connects Claude, Cursor and other MCP clients to Janorium, a free backtester for Binance spot and USDT-M futures. The assistant writes the strategy config, runs it on history since 2020 and reads the results itself.

Is the Janorium MCP server free?

Yes. The package is open source under the MIT license and Janorium is free. One API key runs up to 300 backtests a day.

Can the assistant trade with my money through it?

No. Janorium only backtests: nothing in it places orders or connects to an exchange account, and an API key cannot reach anything to do with exchanges.

Does it work with ChatGPT?

Not directly: ChatGPT adds MCP servers by their web address, and janorium-mcp runs on your computer. In ChatGPT, ask the assistant to write the config and paste it into Janorium — this guide shows how.

Sources

  1. janorium-mcp on npm
  2. Model Context Protocol — connect to local MCP servers (Claude Desktop)
  3. Claude Code — connect Claude Code to tools via MCP
  4. Cursor — Model Context Protocol
  5. OpenAI — add a custom MCP server to ChatGPT (developer mode)

Test your own idea

Create a free account, start from a template or from your own rules, and read your first report.

More guides