Skip to main content
Glama
Stochastly MCP

Stochastly MCP

by Causal64

Stochastly MCP

This small public launcher connects an MCP client to the server shipped with the Stochastly desktop app. The app must be installed, running, and licensed for Atelier or Portfolio. The package contains no Stochastly engine code.

Install with pip install stochastly-mcp or run with uvx stochastly-mcp. To run this source instead of the PyPI release, install this directory with pip install ..

Configure a local stdio server with command stochastly-mcp and no arguments:

  • Claude Desktop: add "stochastly": {"command": "stochastly-mcp"} under mcpServers in claude_desktop_config.json.

  • Cursor: add the same entry under mcpServers in .cursor/mcp.json.

  • VS Code: add "stochastly": {"type": "stdio", "command": "stochastly-mcp"} under servers in .vscode/mcp.json.

The server exposes 29 tools, among them node_catalog, compose_graph, backtest_graph, red_flag_check, adversarial_check, portfolio_combine and export_paper. The installed app runs them and checks the licence on every call: portfolio_combine needs Portfolio, every other tool Atelier or Portfolio.

Without the app, the launcher lists the same 29 tools (names, descriptions, input schemas and annotations from stochastly_mcp_data/tools_manifest.json, generated from the app's server), so a client can see what the server offers. Each description then starts with a note that the desktop app is required, and every call to a listed tool returns a structured answer with ok: false, the edition needed and a link to request access. A name the server does not list returns the error Unknown tool, as the app's server does. The manifest is metadata only.

For a nonstandard installation, set STOCHASTLY_MCP_SCRIPT to the installed app's stochastly_mcp.py. This is a local path, not a network endpoint.

Available Tools

29 tools
adversarial_checkA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Run six controls that try to refute a finished run (drift against its own block-bootstrap null, an edge-free twin of the prop-firm cycle, Romano-Wolf multiplicity, concentration on the best days, frictions, stability across sub-periods) plus a positive control that checks a known edge would be detected on the same data.

Call it after any promising result. synthesis is SURVIVES, REFUTED, UNDERPOWERED (effect smaller than the sample can resolve; observations_needed says how many bars it would take) or BLIND (the positive control failed, so the sample, not the strategy, must change). Each passed control reports its floor, the smallest effect it could have rejected. Deterministic arithmetic, no language model; measured error rates in the test suite: 0.017 false positives, 0.000 false negatives. Needs the run's full PnL series with at least 8 points; an unknown run is a named error. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: run_id (required), seed, n_boot, n_sims.

analyze_dependenceA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Measure the dependence between two equity curves you supply, by fitting one copula or the mutual information to their paired increments (only timestamps present in both curves count).

Use it to ask whether two strategies or markets move together before combining them; to actually build and judge a combined book from finished runs, use portfolio_combine instead. Descriptive only: it reports the fit, it does not run a hypothesis test or take a decision. Malformed curves are refused with a named error (wrong count, missing unit, unordered dates, non-finite values). Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: kind (required), instruments (required).

app_infoA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Report the installed Stochastly app: version, build_edition, platform, python, cpu_count, hw_factor, license_status (key masked), build (git commit, dirty flag, engine fingerprint), engine_integrity (whether the running engine matches that fingerprint) and _engine (sidecar when it talks to the open app, in-process in a source checkout).

Call it first to check that the app is reachable and which plan is active; a refusal from any other tool names the plan it needs. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

backtest_graphA

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Run a strategy graph end to end on your data: build the configurations, run a cost-aware backtest with leakage-free splits, apply the overfitting gates and return the verdict, the number of survivors and the run_id. Each finished run is added to the day's session registry, and multiplicity reports how many runs and configurations this session has tried.

Check the plan with compose_graph first. Data comes from data_root or a registered source; nothing is downloaded for you and an unknown source is refused. A plan with custom Python is refused unless the user allowed custom code on this machine. Use background=true for long runs, then backtest_status. Requires an Atelier or Portfolio licence.

Inputs: plan (required), tf, cap, source, +5 more.

backtest_statusA
Idempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Get the state of a graph run started by backtest_graph: while running, status, progress and message; once done, failed or cancelled, the same summary backtest_graph returns (verdict, survivors, multiplicity).

Use it after backtest_graph with background=true, or when a foreground run hit its timeout. A finished run is recorded once in the day's session registry. An unknown run_id is a named error. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: run_id (required).

compose_graphA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Check a strategy graph plan and turn it into a run specification, counting how many parameter configurations it would test. Nothing is executed and no data is read.

Use it to build and debug a plan before backtest_graph, which takes the same arguments. Returns ok, configs, runnable, strategy, filters, gates and the full spec; an invalid plan returns ok false with the exact field at fault. A plan carrying custom Python is reported in custom_code_nodes with runnable_over_mcp, since backtest_graph refuses it unless the user allowed custom code. Strategy and filter params are single-value locks; omit one to sweep its catalogue values. Gates take a threshold, op "ge" or "le", and window "oos", "is", "oos2", "sealed", "full" or "wfa". Cost nodes charge the run; lectures are informational. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: plan (required), tf, symbols, direction.

crypto_registryA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

List the cross-sectional crypto strategies (momentum and mean reversion) with their timeframes, directions, parameter grids and filters; each entry carries an implemented flag.

Use it to see which crypto ranking strategies exist. For graph node keys use node_catalog; for the general strategy families use registries. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

data_sourcesA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

List the data source names registered in this build, as sources; "folder" (a folder of your own price files) is always one of them.

Use it before backtest_graph to pick its source argument. A source missing from this list is not available: pass data_root (a folder of price files) to backtest_graph instead. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

diagnostic_explainA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Explain one diagnostic code: what the quantity measures, why it matters, and which measurement could move the verdict (never a promise that an action will improve it).

Use it on codes returned by red_flag_check; list every code with diagnostics_catalog. An unknown code returns an error with the list of known codes. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: code (required).

diagnostics_catalogA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

List every diagnostic code the app can raise, as diagnostics (code, family, page) and severities.

Use it to know what the checks can hold against a run, and so what they cannot judge yet; explain one code with diagnostic_explain. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

export_atlasA
Destructive

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Write one research paper PDF per finished run with a shared layout and title, and return ok, dir, n, papers ({name, path, pages, rank, or error} each) and failed.

Use it to report several runs consistently; export_paper handles a single run. Every paper prints how many papers the batch contains, because producing N reports is N trials. Every run must be finished and carry a verdict, otherwise nothing is written; a paper that fails to render is listed with its error. Requires an Atelier or Portfolio licence.

Inputs: run_ids (required), title, layout, out_dir.

export_paperA
DestructiveIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Write a multi-page research paper PDF for one finished backtest run: abstract, numbered equations, tables, robustness section and a mandatory backtest disclosures box. Returns ok, path, pages, figures, tables, omitted and the layout actually printed.

Use it for a full write-up of one run; export_tearsheet makes a one-page summary and export_atlas a batch of papers. Every number comes from the run; a section whose data the run lacks is omitted with a note, and an unknown layout id is an error. Requires an Atelier or Portfolio licence.

Inputs: run_id (required), path, title, layout, +2 more.

export_tearsheetA
DestructiveIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Write a one-page tearsheet image or PDF summarising a finished run, and return ok, path and fmt.

Use it for a quick shareable summary; export_paper writes the full paper. Research runs have no tearsheet and are refused, as are unknown or unfinished runs. Requires an Atelier or Portfolio licence.

Inputs: run_id (required), fmt, path.

live_stateA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Read what the open app last reported it is showing (workspace, chart, symbol, timeframe, indicators, graph nodes, current run, active assistant agent; never secrets) from its state file, with age_s (seconds since it was written) and present (false when the app has never written it).

Use it to check the effect of pilot_app or the context of the user's screen. A large age_s means the app is probably closed. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

node_catalogA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Return the graph editor's node catalogue, grouped by family: every strategy, filter, gate, cost and reading node with its parameter schema, plus an exportable flag on strategies.

This is the only source of valid node keys ("family/name") for compose_graph and backtest_graph; call it before writing a plan. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: force.

paper_sectionsA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

List every section a research paper can contain, each as {id, group, label, mandatory, in_default}, default sections first in print order.

Use it to choose the layout ids for export_paper or export_atlas. Mandatory sections (the simulation letterhead and the backtest disclosures) are always added back, and the paper follows the order you pass. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

pilot_appA

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Drive the open Stochastly app on the user's screen: open a .stly document, switch screen, show a chart, start a backtest, display a note or send a prompt to the in-app assistant. Fields combine in one call and apply in the order open, screen, chart, run; the user sees each step in the status bar and the session journal.

Use it when the user should watch the work in the app; to run a graph and get its numbers back directly, use backtest_graph. The command replaces any pending one. It has no effect unless the app is open and the user enabled piloting (off by default); the response always carries pilot_enabled. Requires an Atelier or Portfolio licence.

Inputs: tf, run, sym, note, +4 more.

portfolio_combineA

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Combine several finished runs into one portfolio (book) and judge it: returns the combined series, the weights actually used, the correlation matrix between sleeves, each sleeve's contribution and a deflated Sharpe ratio. The book is saved as a new run, so adversarial_check and export_tearsheet accept its run_id.

Use it for a multi-strategy or multi-market book; a single graph run covers one strategy, and analyze_dependence only measures two curves you supply. Weights at bar t use only bars before t, and the drawdown cap acts on the previous bar's equity. Nothing is re-simulated: runs must be finished in the current app session; runs in different PnL units are refused, not converted. Requires a Portfolio licence (Atelier gets a named refusal).

Inputs: dd_cap, method, run_ids, lookback, +5 more.

reality_check_profilesA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Return the three synthetic example profiles of the reality check screen (profitable, marginal, overfit) and the prop-firm rule presets it can apply (FTMO Standard and Pro 100k phase 1, The5ers Hyper Growth).

Reference data only: to judge a real result use red_flag_check or adversarial_check. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

red_flag_checkA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Combine five overfitting measures into one deployment verdict, GREEN, AMBER or RED, with a score from 0 (no red flag) to 100 (severe); RED sets deploy_blocked. Also returns each component and its contribution, reasons, violations (diagnostic codes with severity), which measures were missing, and the coverage needed for GREEN.

Use it to decide whether a configuration or run is fit to deploy. Pass null for anything you did not measure: missing evidence lowers coverage instead of being guessed. Explain a code from violations with diagnostic_explain; to try to refute a finished run, use adversarial_check. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: dsr (required), selection_score (required), realization_ratio (required), oos_is_sharpe_ratio (required), +1 more.

registriesA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

List the strategy families, instrument groups and timeframes ("15M", "30M", "1H") the app's built-in scanner screens are populated from, as strategy_families, instrument_groups and timeframes.

For the node keys you pass to compose_graph or backtest_graph, use node_catalog instead; for the cross-sectional crypto strategies, use crypto_registry. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

research_statusA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Read the saved journal of an in-app Research session: its status, turns, ideas, evidence, token count and errors, with age_s since it was last saved.

Start a session with pilot_app(prompt="/research ...") and stop it with pilot_app(prompt="/stop"). The journal is saved at start, after each turn and at the end, so a running status is a checkpoint, not proof the session is still alive. Returns present: false when no session exists. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: session_id.

run_smoke_testsA
Idempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Development only: start the Playwright smoke test of the app interface (visual regression and a clean console, headless, on mocked test data) and return pass or fail with the diagnostic line.

It needs a source checkout with its test harness installed. An installed app does not ship it, so there the tool returns dev_only: true and starts nothing. Requires an Atelier or Portfolio licence.

Inputs: spec, timeout_s.

set_live_stateA
Idempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Legacy: queue a command asking the old chart terminal to show another symbol or timeframe. The current app does not apply these two fields, and the response says so.

To drive the current app (open a document, switch screen, start a backtest) use pilot_app. The command replaces any pending one and only takes effect when piloting is enabled (pilot_enabled in the response). Requires an Atelier or Portfolio licence.

Inputs: tf, sym.

tail_app_logA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Return the last lines of the app's own log file, with present, age_s and, when the log is older than one hour, stale: true and a note saying it may describe an earlier session.

Use it to diagnose an app error. For a batch scanner run use v9_tail_log; for a graph run use backtest_status. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: lines.

v9_get_runA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Read one batch scanner run: its verdict file, the robustness counts (n_total, n_robust_pass), its PBO and the last 30 log lines.

Use v9_list_runs first to find the run_id, and v9_tail_log for more log lines. Errors are named: no_runs when nothing has run, run_not_found for an unknown id. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: run_id.

v9_list_runsA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

List the runs of the separate batch strategy scanner (run folders named V9_* or V95_*), newest first, each with run_id, status (running, done or error) and a summary (verdict, n_configs, pbo_cscv, auc, best_config).

Use it to find a run_id for v9_get_run or v9_tail_log. Runs started from a graph are not listed here: use backtest_status for those. Returns an empty list when the scanner is not installed on this machine. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: limit.

v9_protocol_aA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Summarise the batch scanner's saved regression check: how many baseline configurations its current engine reproduces from the previous one, as n_total, n_strict (exact matches), n_soft (within tolerance), n_cumul, pct_cumul and the tolerance used.

It reads a result file computed earlier by the scanner and starts nothing. Returns the error no_protocol_a_results when that file does not exist. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: no named parameters.

v9_tail_logA
Read-onlyIdempotent

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Return the last lines of a batch scanner run's log file, as lines.

Use it to follow a running scan or see why one failed; v9_get_run gives the verdict and robustness counts. An empty list means no run or no log yet. Needs Stochastly open with an Atelier or Portfolio licence.

Inputs: lines, run_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 29 tools

    Disambiguation4/5

    Most tools target a distinct resource+action (compose_graph vs backtest_graph vs backtest_status, export_paper vs export_atlas vs export_tearsheet, the v9_* scanner family vs the backtest_* graph family). A few clusters overlap thematically, notably the evaluation tools (red_flag_check, adversarial_check, reality_check_profiles, diagnostics_catalog/explain) and the app-control trio (live_state, set_live_state, pilot_app), but descriptions explicitly cross-reference 'use X instead', resolving most confusion.

    Naming Consistency4/5

    Everything is snake_case with a predictable, readable style and useful subsystem prefixes (backtest_, export_, diagnostic_, v9_). The main deviation is that some tools are verb_noun (compose_graph, export_paper, red_flag_check) while others are noun-only (app_info, data_sources, node_catalog, live_state), so the verb pattern isn't fully uniform.

    Tool Count3/5

    29 tools is on the heavy side and includes clear bloat (set_live_state is explicitly legacy, run_smoke_tests is dev-only), which everyone pays the surface-area cost for. Still, the server spans genuinely different subsystems—graph backtesting, a separate batch scanner, portfolio combination, report export, diagnostics, and app piloting—so the count is defensible rather than gratuitous.

    Completeness4/5

    The research lifecycle is well covered: discover nodes/registries/data sources, compose and run graphs, poll status, judge results (red_flag_check, adversarial_check, portfolio_combine), and export papers/tearsheets, plus the parallel v9 scanner surface and app/diagnostics introspection. Minor gaps exist—e.g. no tool to enumerate the day's session run registry directly, and inspection of graph runs depends on a run_id from a prior call—but these are workable.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • Free, no-key MCP connector for market data in Claude, Cursor and any Streamable HTTP client. Six tools: a pre-market and after-hours gapper scanner (get_premarket_gappers: top 10 names up 10% or more, $1-$100, float under 100M, with premarket relative volume, ATR, RSI and a news-catalyst flag), plus the Market Health desk: S&P 500 valuation verdict (get_market_valuation), Fed liquidity and yield-curve series (get_macro_liquidity), cross-asset regime (get_cross_asset_regime), market breadth (get_market_breadth) and risk-score history (get_market_health_history). Ships with a ready-made prompt, premarket_gappers_brief. Nothing to sign up for. Built by TraderMatrix. The full TraderMatrix connector has 51 tools, adding options flow, dealer gamma and Apex levels, unusual activity, sector flow, wheel screeners and your own watchlists.

    • Connect Claude, ChatGPT, Codex, Claude Code or another MCP client to your real multi-broker investment portfolio. Fortunest tracks stocks, ETFs and crypto across brokers and exchanges; its MCP server lets your agent read holdings, returns, allocation, risk, trades and tax lots, calculated by Fortunest rather than guessed by the model. Reads run on their own; every change waits for your approval in the Fortunest app, and no tool places an order or moves money. Sign-in is OAuth 2.1 and needs Fortunest Pro (14-day trial, no card). A free demo that needs no account is listed as Fortunest demo.

      https://app.fortunest.ai/mcp
    • MCP server exposing the Backtest360 engine API as tools for AI agents.

      https://mcp.backtest360.com/mcp
    • Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.

      https://remote.exza.de/mcp

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Bridges a local Tongdaxin client to MCP, exposing tools for market data, financial information, sector management, terminal push, simulated trading, and automatic price alerts, enabling natural-language data retrieval, analysis, and order operations through agents.
      5
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Lets Claude Code drive the local MindStrat desktop trading app through its own screen endpoints, covering market data downloads, MSF strategy authoring, backtests, optimizer and robustness runs, and portfolio/live deployment with gated confirmations. It also serves the app's manual as resources so the agent can write strategies that behave identically in live and backtest.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Stdio proxy for HirePulse: 27 live tools for company research, hiring, job changes, public contacts and commerce evidence. Focused remote profiles: 9 B2B or 11 commerce tools. Free sandbox, 10 successful calls per agent per UTC day (shared network ceiling), and eligible 25-call trials. Paid results use x402 USDC on Base. Install: npx -y hirepulse-mcp (Node.js 20+).
      26
      49 npm
      1
      MIT