Connect AI apps

DocumentationWriting strategies

Connect AI apps

An AI app such as Claude, ChatGPT or Cursor can work with OrionQuant in two ways, and they reach different things. AI apps on this computer reads this installation. AI apps in the cloud reads your account on our server. Both speak the Model Context Protocol (MCP), the open standard AI apps use to reach other software, so any app that speaks it can use either.

AI apps on this computerAI apps in the cloud
Where the app runsClaude Desktop, Claude Code, Cursor or another MCP app, on the computer OrionQuant is installed onClaude, ChatGPT, Le Chat, Cursor, VS Code and other MCP apps, in the browser, on your phone or on any computer
What it can doRead your whole library and your local runs, validate code, export to Pine, MQL5, cTrader or Rust, read these pages and the indicator libraryRead strategies synced to the server, your server runs and their results, your usage and limits, the leaderboard, these pages and the indicator library, and start server runs if you allow it
What it costsNothing, on every planNothing to connect. A server run spends your plan's server minutes, and Free has none
Internet neededNoYes

Neither one saves or changes your work. Putting a strategy in your library is always your action in the app.

Both can be connected at once, even to the same app. They know nothing of each other. That is worth it when you write strategies on this computer and want your app to validate and export them here, and also want to start a server run or check your minutes from the phone or from claude.ai or ChatGPT while you are away.

AI apps on this computer

Nothing on our servers is involved. Your AI app starts the server as a process on your own machine, the model is your app's, and we hold no key and make no model call.

The browser build has none of it. There is no process to start and no file to write, so Connect AI apps in the browser's settings offers AI apps in the cloud alone, which does not need the app at all.

Turning it on

Settings, Advanced, Connect AI apps, On this computer. The card walks you through four steps. Step 1 is the switch. It is off until you turn it on, because turning it on writes your saved strategies and all your runs to a plain JSON file inside the application's own folder. It has to be plain: the server is a separate process and cannot read the encrypted storage the app uses for keys. Turning the switch off again deletes the file.

In step 2 you pick your AI app, and step 3 shows the one thing to paste for it, read from this installation rather than from this page. Step 4 is the restart and a first question to ask.

Connecting Claude Desktop or Claude Code

Claude Desktop reads claude_desktop_config.json. Add the command exactly as the settings card shows it:

json{
  "mcpServers": {
    "orionquant": {
      "command": "C:\\Users\\you\\AppData\\Local\\Programs\\OrionQuant Backtesting Engine\\resources\\python\\python.exe",
      "args": ["-I", "-B", "--check-hash-based-pycs", "always", "C:\\Users\\you\\AppData\\Local\\Programs\\OrionQuant Backtesting Engine\\resources\\shell\\mcp_launcher.py"]
    }
  }
}

The path differs per platform and per install location, which is why the card shows yours instead of this page claiming to know it. A Windows path doubles its backslashes, because the value is a JSON string. Restart Claude Desktop after editing its configuration.

Claude Code takes the same command after a --, with each path in quotes because the folder name has spaces in it. The card shows this line ready to paste as well:

claude mcp add orionquant -- "C:\Users\you\AppData\Local\Programs\OrionQuant Backtesting Engine\resources\python\python.exe" -I -B --check-hash-based-pycs always "C:\Users\you\AppData\Local\Programs\OrionQuant Backtesting Engine\resources\shell\mcp_launcher.py"

Cursor, VS Code and other MCP apps take the same command and arguments in their own configuration, as a server that is started rather than a URL.

The command stays valid when the app updates itself. The launcher finds the version you have installed each time it starts.

What it can do

Eleven tools, and every one of them is a read.

  • list_strategies and read_strategy read your library. A read carries the documentation pages for that strategy's provider, so the model has the API in front of it rather than guessing. It also carries the entry's own source when the entry has one: has_source says whether it does, and source is null when it does not.
  • Strategies you did not write are marked. An entry installed from the marketplace or sent to you by another user carries provenance with third_party and the author, and its name, source and files, and those of its runs, arrive between two marker lines, with a note to the model that the text is data to read and never instructions to follow. The model can still read and review it.
  • list_runs and read_run read finished runs. A read returns the statistics, the engine version, the seed, the data source, the accuracy tier it asked for, the optimization summary when the run was one, and the whole configuration: commission per lot, swap pips per night, leverage, lot size, starting balance and intrabar fill priority among them, and the slip beyond the touch when the run set one. That slip is the only slippage setting, a TICK tier one for entries larger than the size at the best price. Beyond it, slippage is not modelled past the spread and the gap rule, which Costs and Fills explains. A review that cannot see the costs is a review of the run's luck.
  • validate_strategy parses Python source and reports syntax errors, the Strategy subclasses it defines, whether a per bar hook is present (on_market, and it also accepts on_bar or on_tick), and any import the sandbox will refuse. It never executes what you give it.
  • validate_pine compiles a Pine script as the engine will and reports every line it refuses, with the column and the reason, or the inputs the optimizer will sweep. export_strategy prints a Pine strategy, or a built in one, as Pine Script, an MQL5 expert advisor, a cTrader cBot or Rust for the engine's core, and returns the text. Neither runs anything, and neither writes a file.
  • search_docs and read_doc read these pages.
  • list_indicators lists the indicator library, by group or by a word to look for, with one sentence each of what it measures. describe_indicator gives one in full: what it measures, the formula in words, how to read it, its inputs with defaults and bounds, its lines, and the exact call in Python, C#, Rust, a formula and the strategy IR. An unknown id is refused with the ids that exist.

What it does not

It does not write. There is no tool that saves, renames or deletes a strategy, and none that starts a run. A model can propose a change and validate it; putting it in your library is your action in the app. Server runs and your usage come through AI apps in the cloud.

It sends the summary of a run, not the body. The statistics and the configuration travel. The trade list, the equity curve, the replay frames and the tier the engine reports having actually used stay in the app.

It reads a copy, not the live app. The file is rewritten when your library or your run history changes, so with the app closed the model sees the state as of the last change. The copy carries the time it was written, and list_strategies and list_runs return that time.

It is this machine, not your account. Strategies you saved on another computer are not in this file.

Every run on this machine travels, however many there are.

AI apps in the cloud

AI apps in the cloud connects an AI app to your OrionQuant account on our server, not to this app. It works with the app closed, from any device you use that app on, and it needs an internet connection. Claude, ChatGPT, Le Chat, Cursor, VS Code with GitHub Copilot, Zed, Codex, Gemini CLI and any other app that can add a remote MCP server with OAuth sign in can connect. The address is the same for all of them: https://engine.orionquant.com/mcp. Settings, Connect AI apps, In the cloud shows it with a copy button and the steps for Claude, ChatGPT and Cursor.

Every app connects through the same consent screen. It shows the app, the address the approval is sent back to, the account, and what the app may do.

  • Verified. OrionQuant knows the app by the exact address its approval goes to: Claude, ChatGPT, Le Chat, Cursor and VS Code each have their own, and Claude Code, Codex, VS Code and Zed can also identify themselves with a document on their maker's site. The screen then shows the app's real name with a Verified mark and its maker. An app can call itself anything; only this check decides the name you see.
  • On this computer. The approval goes back to your own computer (localhost or 127.0.0.1), as Claude Code, Gemini CLI, Cursor and VS Code on the desktop do. Nobody else can receive it there, but OrionQuant cannot tell which program is listening. Approve only if you just started this yourself.
  • Not verified. Any other app with an https address. The screen says so in red and names the exact host the approval goes to. Approve only if you started this yourself and know the app. A name you do not expect, or an address you do not recognise, is a reason to stop.

Connecting claude.ai

  1. In OrionQuant, open Settings, Connect AI apps and copy the connector URL shown there.
  2. In claude.ai, open Settings, Connectors, Add custom connector, paste the URL and press Connect.
  3. Sign in to OrionQuant, the same way you sign in to the app.
  4. The consent screen shows Claude, verified, sending you back to claude.ai.
  5. Tick Allow starting server runs only if you want Claude to spend server minutes. With it ticked you can also set a monthly minute ceiling for this connection. Without it, Claude reads and never starts a run.
  6. Approve, and you are back in claude.ai with OrionQuant connected.

A connector added on claude.ai is also there in the Claude app on your phone and in Claude Desktop, signed in to the same Claude account. On a Claude Team or Enterprise plan, an owner of that Claude organisation may have to add the custom connector first.

Connecting ChatGPT

  1. In ChatGPT, open Settings, Apps and Connectors, and turn on Developer mode under Advanced. Whether it is offered depends on your ChatGPT plan, and in a Business or Enterprise workspace on its admin.
  2. Create a new connector, name it OrionQuant, paste the connector URL and choose OAuth.
  3. Sign in to OrionQuant. The consent screen shows ChatGPT, verified, sending you back to chatgpt.com. Approve.

Connecting Cursor

Add the connector to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project. The settings card copies this block with your address in it:

json{
  "mcpServers": {
    "orionquant": {
      "url": "https://engine.orionquant.com/mcp"
    }
  }
}

Cursor then opens the browser to sign in. The consent screen shows Cursor, verified, or an app on this computer when Cursor's desktop app receives the approval itself. Approve. If AI apps on this computer is already set up in Cursor as orionquant, give this one another name, orionquant-cloud for example.

Connecting VS Code and other apps

In VS Code, run MCP: Add Server, choose HTTP and paste the connector URL; GitHub Copilot's chat then signs in on first use. Other apps call the same thing a remote MCP server, a connector or a custom connector: give it the connector URL and sign in when asked. The app has to support signing in with OAuth; an app that only takes a fixed key cannot connect.

Connecting Claude Code

claude mcp add --transport http orionquant https://engine.orionquant.com/mcp

Then type /mcp in Claude Code, pick orionquant and sign in. The browser opens the same sign in and consent screen, and the address it sends you back to is on your own computer. If AI apps on this computer is already added to Claude Code as orionquant, give this one another name, orionquant-cloud for example.

What it sees

Your account on the server, and only what is there:

  • Strategies synced to the server. A strategy is synced when you run it on the server or publish it. A strategy you have only ever run on this computer is not on the server, and AI apps in the cloud cannot see it.
  • Your library of indicators, plugins and custom blocks, the one kept with your account.
  • Your server runs and their results.
  • Your usage and limits: the plan, the server minutes used and left this month, and the other allowances.
  • The leaderboard, which is public anyway.
  • These pages and the indicator library.

It never sees another user's private work or anyone's email address, yours included.

What it cannot do

It changes nothing. There is no tool that saves, renames or deletes a strategy, and none that changes a setting. It does not validate or export code: for now that runs on this computer, through AI apps on this computer. It does not see your local runs, the data on this computer, your broker keys or your live deployments.

Server runs

Only with Allow starting server runs ticked. A run the app starts is a run you started: it spends your server minutes exactly as a run from the app does, the same plan limits and minute packs apply, and it appears among your server runs. The run tools are marked as ones that change something, so apps such as Claude and ChatGPT ask you before they start one. The minute ceiling, when you set one, stops runs through this connection once it is reached for the month; your plan's own allowance applies as well. Free has no server minutes, so on Free AI apps in the cloud read and cannot run.

Ending a connection

Settings, Connect AI apps, Connected apps, Revoke. Access ends at once, with the app's next request. A connection also ends on its own after 90 days at most, or after 30 days without use. Connect again to carry on.

We send a mail to your address whenever a new connection is made, so one you did not make does not go unnoticed. If you get one you do not recognise, revoke it at once.

Who can connect

Any OrionQuant account, on every plan. Staff accounts cannot connect. While OrionQuant is open only to the accounts let in so far, only those accounts can connect.

OrionQuant