backtest360-mcp
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BACKTEST360_API_KEY | Yes | Engine API key, sent as X-API-Key (required) | |
| BACKTEST360_ENGINE_URL | No | Engine base URL | https://api.backtest360.com |
| BACKTEST360_MCP_TIMEOUT | No | Per-request timeout (seconds) | 300 |
| BACKTEST360_MCP_MAX_OUTPUT_BYTES | No | Hard cap on a single tool result | 100000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_meA | The configured API key's permissions, limits, and current usage. Cheap. Call early in a session — before planning work — to learn what this key can do instead of discovering limits through failed calls. Returns:
|
| engine_infoA | Engine version, API contract number, and health. Free (not quota-counted). Call once at the start of a session to confirm the engine is reachable and which contract it serves. |
| get_catalogA | Fetch one engine reference catalog. Catalogs (cheap, cacheable per session):
Fetch the relevant catalog BEFORE building a strategy or config; build only from values it lists — never guess parameter names or frequencies. |
| list_indicatorsA | List indicators, or fetch one indicator's full schema. Cheap, cacheable per session. With no arguments: a compact catalog — Wire optimization: the compact discovery path asks the engine to omit
per-entry descriptions ( |
| list_templatesA | List predesigned strategy templates, or fetch one in full. Cheap, cacheable per session. The engine returns the templates available to the calling key. With no arguments: a compact catalog — |
| get_strategy_schemaA | JSON Schema for the strategy document (condition_tree + indicators). Fetch this before composing a strategy by hand; the validate_strategy tool checks against the same rules. |
| validate_strategyA | Validate a strategy document without running a backtest. A cheap quota separate from backtest runs, so validate freely and ALWAYS before run_backtest. Args: strategy: The strategy document — name, indicators[], and condition_tree (see get_strategy_schema for the exact shape). injected_indicators: Names of custom time-series columns the caller will supply via data_inputs at run time, so conditions referencing them validate. Returns: On success: {"valid": true, "warmup_bars": ..., referenced indicators/columns}. On failure: {"valid": false, "errors": [...]} where each error carries a machine code, the location in the document, a message, and context (e.g. the list of valid column names). A failed validation is a NORMAL result, not an error — read the errors, fix the document, and validate again before running. |
| run_backtestA | Run a historical backtest against the engine. Quota-counted and compute-bound. Validate the strategy first (validate_strategy is far cheaper). On a 504 compute timeout, do NOT retry the same request — reduce the date range, use a coarser frequency, or simplify the strategy. On 429/503, wait for the advertised Retry-After before retrying. Args: data_source: Either inline OHLCV ({"ohlcv": {dates, open, high, low, close, volume?}} as parallel arrays, ISO-8601 dates) or a server-side fetch ({"symbol", "start", "end", "frequency"} — requires a paid plan). strategy: Strategy document (indicators[] + condition_tree). Mutually exclusive with signals. signals: Precomputed signal series ({"dates": [...], "values": [-1|0|1, ...]}). Mutually exclusive with strategy. execution: Execution/cost/risk/sizing settings. Use values from get_catalog('execution-modes'/'stop-types'/'sizing-methods'); omit for engine defaults. benchmark: Optional benchmark data source (same shape as data_source) — adds benchmark-relative metrics. data_inputs: Optional custom time-series the strategy references (name -> {dates, values}). response_detail: 'summary' (default — headline metrics, smallest), 'stats' (every metric), 'full' (plus trades and series downsampled to a fixed, server-controlled number of points). include: Optional add-on blocks at summary/stats detail: 'trades', 'equity_curve', 'monthly_returns', 'yearly_returns'. trades_limit: Max trades returned when trades are included. Returns:
The shaped result at the requested detail; an oversized result is
thinned and marked |
| get_latest_signalA | Evaluate the strategy on the most recent bar only — no P&L, no stats. Returns the latest signal (-1/0/1), which condition slots fired, and the bar timestamp. Use for "what would this strategy do right now" questions; use run_backtest for performance. |
| compare_backtestsA | Run several strategies on the same data and compare side by side. One quota-counted call, but compute scales with the number of strategies. The engine enforces a wall-clock budget for the whole comparison; when it runs out mid-way the response carries "truncated": true and the remaining strategies are missing — report that to the user rather than re-running blindly. Args: data_source: Shared data source (same shape as run_backtest). strategies: List of {"label": str, "strategy": {...}, "execution": {...}?} entries. include_benchmark: Add a buy-and-hold benchmark to the comparison. response_detail: Shaping level applied to each strategy's result. trades_limit: Max trades per strategy when detail is 'full'. Returns: {"strategies": [{"label", "result"}, ...], "equity_curves": {...}}, each result shaped at the requested detail. Two truncation flags are distinct and may both appear: the engine's "truncated" (wall-clock budget exhausted mid-comparison — strategies are missing) and the MCP size-cap marker "truncated_by_mcp". A 400/422 rejection returns {"accepted": false, "error": ...}; capacity/timeout/permission failures raise a tool error. |
| compute_statsA | Compute the engine's performance metrics from a returns series. Use when the returns came from somewhere other than run_backtest (an external system, a portfolio) — backtest results already include these statistics. Args: returns: Per-bar log returns as {"dates": [...], "values": [...]} parallel arrays (ISO-8601 dates). trading_days_per_year: Required annualization factor — 252 for a daily equities calendar, 365 for 24/7 crypto. Must match the bar calendar of the returns series; a wrong value silently mis-annualizes Sharpe, volatility, and CAGR. benchmark_returns: Optional benchmark series, same shape — adds alpha/beta/capture metrics. trades: Optional trade records (entry_date, exit_date, direction, return_net, ...) — adds trade-level metrics. risk_free_rate: Annual risk-free rate as a decimal. Returns: {"stats": {...}} — the metric set the API key's plan allows. See get_catalog('sections') for every metric's id and description. |
| search_tickersA | Search available assets by ticker or name (relevance-ranked). Use to resolve a user's asset mention ("bitcoin", "S&P") to the exact ticker before requesting a server-side data fetch. asset_class filters to 'stocks', 'crypto', 'forex', or 'indices'. |
| list_tickersA | List available tickers, optionally filtered by asset class. The full universe is very large, so the MCP server
caps the returned list and marks it |
| get_data_rangeA | Available date range and estimated bar count for a symbol/frequency. Available on paid plans. Call before a server-side fetch so the requested start/end stay inside what the provider can deliver and the bar count stays inside the key's per-run limit. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| robustness_review | Walk the connected AI through a rigorous robustness review of a backtested strategy on one symbol: validate, run, compare against buy-and-hold, weigh the evidence base (sample size, significance and robustness statistics, warnings), and report with caveats. Args: symbol: The asset the strategy trades (e.g. "BTC-USD"). strategy: Optional strategy document (as JSON text) to review. If omitted, the prompt points at building or supplying one first. |
| build_and_validate | Walk the connected AI from a plain-language strategy idea to a validated Backtest360 strategy document, then a dry-run: survey the catalogs, fetch the document schema, construct the strategy, validate and fix in a loop until it passes, then smoke-test that it runs. Args: idea: The strategy idea in plain language (e.g. "buy when the 50-day crosses above the 200-day, exit on the reverse cross"). |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| strategy_schema_resource |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Backtest360/backtest360-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server