get_usageYour weekly research allowance and plan limits: combinations per sweep, date range, and active-run cap.
Products MCP
Connect Claude Code, Claude Desktop, Cursor, or another MCP client that supports remote servers with custom headers. Your agent can run supported Pine Script strategies, sweep their inputs, and read the results under the same plan limits as the app.
Tokens act as you: they inherit your plan and allowance, and never grant admin access.
Tool calls and responses use the real field names, shortened where marked with “…”. Values come from the example sweep. Each client shows tool calls in its own way, and the agent's replies are its own.
The same backtesting engine as the app, exposed as tools your agent can call. With saved strategies enabled for your account, it can also read and save strategies in your Library.
get_usageYour weekly research allowance and plan limits: combinations per sweep, date range, and active-run cap.
run_backtestCompile a Pine Script v6 strategy and run one parameter set, or sweep ranges. Returns the result table.
run_detailed_backtestRun one parameter set and return its metrics plus the full trade list, with candles on request.
get_backtest_resultsRe-read, re-sort, page, or keep waiting on a run started through MCP. Costs nothing.
list_backtestsList active runs and recent MCP runs whose rows are still held, to recover a lost batch_id. Costs nothing.
cancel_backtestCancel work that hasn't been dispatched yet, for one run or all of them.
An endpoint and a token. Keep up to ten tokens, one per client, and revoke any of them from the same page. A revoked token stops working immediately.
Authorization header with the token.Claude Code
claude mcp add --transport http trainbard https://api.trainbard.com/mcp --header "Authorization: Bearer tb_…"
Other clients
{ "url": "https://api.trainbard.com/mcp",
"headers": { "Authorization": "Bearer tb_…" } }
Streamable HTTP with a bearer token. Clients that only support OAuth-based remote servers cannot connect yet.
MCP runs share your plan, your weekly research allowance, and your one active run with the web app. Nothing is saved on TrainBard unless your agent explicitly saves a strategy.
Each successfully completed combination uses one unit of your weekly research allowance. Failed combinations are free.
A new submission is rejected while another run is active, and the rejection names the run in the way so your agent can wait or cancel.
Rows are held for 30 minutes after a run finishes so your agent can re-sort or page them. Have it save what you need.
Create a token, connect your client, and ask for your first sweep.