Skip to content

FLOX C++ trading systems framework with MCP

MCP Developer Tools

An AI‑native framework that unifies strategy development, backtesting, paper trading, and live execution across multiple languages.

C++ Latest v0.6.5 · 3d ago Security brief →

Features

  • Unified API for strategies covering backtest, paper, and live execution
  • Cross‑language bindings (Python, Node.js, Codon, embedded JS, C)
  • Model Context Protocol server (`flox-mcp`) enabling AI agents to interact with the framework

Recent releases

View all 15 releases →
No immediate action
v0.6.5 New feature

Options support

No immediate action
v0.6.4 Feature

Uniform VenueStack across environments

No immediate action
v0.6.2 New feature

VenueStack unified backtest physics

No immediate action
v0.6.1 New feature

BinaryLogRecorderHook, MergedTapeReader, parallel run

v0.6.0 New feature
⚠ Upgrade required
  • `flox-mcp` installation: `pip install flox-mcp` followed by `flox-mcp init` to bootstrap `.mcp.json`.
  • Use the new parity gate CI checks when adding or modifying bindings to ensure cross‑binding equivalence.
Notable features
  • `flox-mcp` Model Context Protocol server enabling AI agents to query bindings, indicators, runtime state and docs.
  • Same strategy code runs unchanged in `BacktestRunner` and live `Runner` with identical pre‑trade gate behavior.
  • Polyglot parity across Python, Node.js, Codon and embedded JavaScript via cross‑binding alignment helpers, composite‑condition DSL and shared execution algorithms.
Full changelog

v0.6.0 — polyglot strategies, AI-friendly DX, same code backtest→live

Strategies in Python, Node.js, Codon, and embedded JavaScript run on one C++ core through parity-tested bindings. The same strategy code goes from backtest to live without a rewrite — pre-trade gate, fill hooks, order events all behave the same on both runners. flox-mcp is a Model Context Protocol server that lets coding agents query the same FLOX install you're using: every binding's surface, every indicator, every error code, the live engine's positions and orders, the full doc set.

Highlights

  • flox-mcp MCP server. Install with pip install flox-mcp, bootstrap with flox-mcp init. Tools cover symbol lookup across bindings, indicator introspection, scaffolders, full-text doc search, runtime inspection, control-plane order routing, live analytics.
  • Same code backtest→live. BacktestRunner now takes the same RiskManager / KillSwitch / OrderValidator / PnLTracker stack as the live Runner. Reduce-only and flatten orders bypass the gate (so you can always exit when caps tighten).
  • flox engine sim paper engine in one command. Boots Runner + SimulatedExecutor + ControlServer + a runtime-snapshot writer. Prints the engine URL and a copy-pasteable flox-mcp init --engine-url ... --token ....
  • Polyglot parity, all four bindings. Multi-TF alignment helpers, composite-condition DSL, indicator-grid sugar, OrderGroup state machine, MultiFeedClock, .floxrun trace format, latency models, tape diff, portfolio risk, execution algorithms. Cross-binding parity gate in CI.
  • Strategy.on_fill / on_order_update hooks across all bindings. Strategies see their own fills and order-lifecycle events.
  • .floxlog public spec + replay-equivalence CI gate. The recorded tape format is documented; a CI step blocks any binding change that breaks byte-for-byte replay equivalence.
  • AI-DX surface. llms.txt and llms-full.txt published, .pyi + py.typed on PyPI, index.d.ts on npm, structured FloxError with code + help URL, snippet linter that fails when doc examples drift.
  • IDL-driven C API codegen. flox_capi_spec.hpp is what generates the C header, the Codon FFI, and the LLMs reference. ABI snapshot gate fails the build on accidental breakage.

What's new

AI / MCP

  • flox-mcp Model Context Protocol server (#141)
  • Polyglot tools: lookup_symbol, list_bindings over bundled cross-binding data (#166)
  • Runtime tools: run_backtest, compute_indicator, suggest_indicator (#168)
  • Read-only positions inspection (#174)
  • Mutating control-plane tools with capability scopes + token security model (#178)
  • Live analytics: read-only introspection over the control plane (#179)
  • Lookahead-bias detector tool (#181)
  • lookup_symbol surfaces curated semantic gotchas (#229)
  • record_data tool wraps the canonical recording paths (#228)
  • init_project thin wrapper around flox new (#225)
  • flox-mcp init — bootstrap .mcp.json in one command (#233)
  • Tier-4 read tools fail-graceful when no runtime snapshot exists (#232)
  • docs_search AND-matches multi-word queries (#221)
  • run_backtest routes by strategy kind (#222)
  • suggest_indicator covers mean-reversion / stddev / z-score (#223)
  • Friendlier no-engine error for runtime tools (#224)
  • Surface canonical paths instead of building parallel ones (#219)

Strategy & backtest

  • BacktestRunner pre-trade gate parity with live Runner (#235)
  • Strategy.on_fill / on_order_update hooks — engine + pybind11 (#226)
  • BacktestRunner.run_tape(path) for .floxlog replay (#227)
  • Wire MultiModePositionTracker into Strategy (silent zero-trade fix) (#220)
  • Strategy hot-reload without dropping connections (#192)
  • Multi-TF alignment helpers on Strategy (#196)
  • Strategy.on_bar callback + run_bars (#123)
  • RL environment over a .floxlog tape, Gymnasium-compatible (#186)
  • Execution algorithms: TWAP / VWAP / Iceberg / POV slicers (#185)
  • PaperBroker: live-data sandbox / paper trading mode (#175)

Polyglot parity

  • Cross-binding parity gate in CI (#149)
  • TypeScript strategy authoring with decorators (#187)
  • Latency models, tape diff, portfolio risk, execution algos — C++ core with binding parity (#188, #189, #190, #191)
  • .floxrun strategy-trace format with cross-binding parity (#194)
  • Composite-condition DSL for multi-symbol multi-TF strategies (#197)
  • Indicator-grid sugar on top of composite DSL (#198)
  • Latency-aware MultiFeedClock (#200)
  • Multi-leg OrderGroup helper, BestEffort policy (#199)
  • Multi-TF alignment helpers in QuickJS + Codon (#204)
  • Composite DSL ported to NAPI / QuickJS / Codon (#205)
  • Indicator-grid sugar ported to NAPI / QuickJS / Codon (#206)
  • OrderGroup state machine across all four bindings (#207)
  • MultiFeedClock state machine across all four bindings (#208)
  • Runner cross-binding .floxrun parity gate (#212)
  • Strategy.on_fill / on_order_update parity for NAPI / QuickJS / Codon (#230)
  • BacktestRunner.runTape — NAPI / Codon parity (#231)

Tooling & CLIs

  • flox engine sim — paper engine in one command (#234)
  • flox tape CLI: record / replay / inspect (#173)
  • flox bundle: reproducibility bundle format (#176)
  • flox tape diff: trade-by-trade comparison of two tapes (#182)
  • flox lint lookahead (#181)
  • flox new CLI scaffolder (#158)
  • CcxtBroker live broker adapter (#157)
  • Notebook variant of the research scaffold (#160)
  • Live-trading template via flox new --template=live (#162)
  • Indicator-library scaffolder (#165)

Indicators & analytics

  • Forward-looking targets distinct from indicators (#115)
  • ADF stationarity test (#116)
  • AutoCorrelation indicator (#117)
  • IndicatorGraph (batch) (#118)
  • Streaming step()-based IndicatorGraph for live trading (#119)
  • Single source of truth for indicators and DAG (#122)
  • HTML backtest report + equity_curve / trades accessors (#161)
  • Walk-forward + type-erased grid search across bindings (#163)
  • Heatmap HTML renderer across all bindings (#164)
  • MLflow integration for FLOX backtests (#167)
  • White's reality check across all bindings (#169)
  • Latency models for backtest realism (#184)
  • MVP web replay viewer for tape and run artifacts (#195)

Replay / tape format

  • Public specification of the .floxlog binary tape format (#180)
  • Replay-equivalence CI gate (#177)
  • Delta-book compression in the tape format (#193)
  • Live-tail safety + book-update reads (#120)
  • Mid-stream _from seek across all bindings (#126)
  • LZ4 link in the Node binding so compressed segments read on every platform (#127)
  • TraceSignalHandler / TraceExecutionListener adapters for .floxrun (#201)
  • flox bundle ships expected.floxrun alongside expected_output.json (#202)
  • Runner attaches a TraceRecorder for one-call signal auto-capture (#209)
  • Trace order events and fills through the attached recorder (#210)
  • OrderGroup auto-dispatches recommended actions through the executor (#211)
  • OrderGroup basket-level risk gate before submission (#215)
  • OneSided pair-latency budget on leg-A ack (#216)
  • Bar-close dispatch ordering cross-binding parity test (#217)

Errors, typing, docs

  • llms.txt and llms-full.txt published for AI agents (#128)
  • .pyi stubs + py.typed for typed PyPI distribution (#129)
  • index.d.ts for typed npm distribution (#130)
  • Structured FloxError with code + help URL (#138)
  • Auto-generated Python API index from .pyi (#139)
  • Snippet linter + ratchet allowlist (#140)
  • Top-20 throw sites migrated to FloxError (#154)
  • Cross-binding FloxError surface in Node (#155)
  • Snippet coverage ratchet enforcement (#156)
  • First-backtest tutorial with real BTC sample (#159)
  • Architecture + contributor guide (#152)
  • Cross-symbol pairing for two-input indicators (Correlation, AutoCorrelation) (#237)
  • mcp/README.md flox-mcp init quickstart (#238)
  • README hero — polyglot + AI-friendly + same-code backtest-to-live (#240)
  • Python + Node package READMEs refreshed (#241)
  • pre-commit hook auto-regens .pyi / llms.txt / mcp data (#239)

C-API / IDL codegen

  • IDL-driven C API codegen — slice prototype (#131)
  • Full-coverage spec + enums/aliases + bootstrapper (#132)
  • emit-codon + emit-llms emitters (#133)
  • ABI snapshot CI gate (#135)
  • RiskManager pre-trade hook (#136)
  • KillSwitch + OrderValidator pre-trade hooks (#137)
  • Logger callback hook for binding-side log redirection (#144)
  • Post-emission observer hooks: PnLTracker, StorageSink (#145)
  • MarketDataRecorder hook (#146)
  • ReplaySource hook for binding-supplied event streams (#147)
  • Executor + ExecutionListener hooks (#148)
  • pybind11 wrappers for extension hooks (#150)
  • NAPI wrappers for extension hooks (#151)
  • Pointer-variant create exports unblocking pure-Codon strategies (#213)

Connectors / build

  • Native connectors merged into flox under FLOX_BUILD_CONNECTORS (#171)
  • CMake feature flags: FLOX_ENABLE_*FLOX_BUILD_* split + CI flag matrix (#172)

Full changelog: https://github.com/FLOX-Foundation/flox/compare/v0.5.6...v0.6.0

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

About

Stars
213
Forks
38
Languages
C++ Python C
Downloads/week
502 ↑119%
NPM Maintainers
1 Single npm maintainer
Contributors
5
TypeScript
Types included ✓

Install & Platforms

Install via
pip npm

Beta — feedback welcome: [email protected]