FLOX C++ trading systems framework with MCP
MCP Developer ToolsAn AI‑native framework that unifies strategy development, backtesting, paper trading, and live execution across multiple languages.
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 →- `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.
- `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-mcpMCP server. Install withpip install flox-mcp, bootstrap withflox-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.
BacktestRunnernow takes the sameRiskManager/KillSwitch/OrderValidator/PnLTrackerstack as the liveRunner. Reduce-only and flatten orders bypass the gate (so you can always exit when caps tighten). flox engine simpaper engine in one command. BootsRunner+SimulatedExecutor+ControlServer+ a runtime-snapshot writer. Prints the engine URL and a copy-pasteableflox-mcp init --engine-url ... --token ....- Polyglot parity, all four bindings. Multi-TF alignment helpers, composite-condition DSL, indicator-grid sugar,
OrderGroupstate machine,MultiFeedClock,.floxruntrace format, latency models, tape diff, portfolio risk, execution algorithms. Cross-binding parity gate in CI. Strategy.on_fill/on_order_updatehooks across all bindings. Strategies see their own fills and order-lifecycle events..floxlogpublic 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.typedon PyPI,index.d.tson npm, structuredFloxErrorwith code + help URL, snippet linter that fails when doc examples drift. - IDL-driven C API codegen.
flox_capi_spec.hppis 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-mcpModel Context Protocol server (#141)- Polyglot tools:
lookup_symbol,list_bindingsover 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_symbolsurfaces curated semantic gotchas (#229)record_datatool wraps the canonical recording paths (#228)init_projectthin wrapper aroundflox new(#225)flox-mcp init— bootstrap.mcp.jsonin one command (#233)- Tier-4 read tools fail-graceful when no runtime snapshot exists (#232)
docs_searchAND-matches multi-word queries (#221)run_backtestroutes by strategy kind (#222)suggest_indicatorcovers 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
BacktestRunnerpre-trade gate parity with liveRunner(#235)Strategy.on_fill/on_order_updatehooks — engine + pybind11 (#226)BacktestRunner.run_tape(path)for.floxlogreplay (#227)- Wire
MultiModePositionTrackerintoStrategy(silent zero-trade fix) (#220) - Strategy hot-reload without dropping connections (#192)
- Multi-TF alignment helpers on
Strategy(#196) Strategy.on_barcallback +run_bars(#123)- RL environment over a
.floxlogtape, 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)
.floxrunstrategy-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
OrderGrouphelper, 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)
OrderGroupstate machine across all four bindings (#207)MultiFeedClockstate machine across all four bindings (#208)- Runner cross-binding
.floxrunparity gate (#212) Strategy.on_fill/on_order_updateparity for NAPI / QuickJS / Codon (#230)BacktestRunner.runTape— NAPI / Codon parity (#231)
Tooling & CLIs
flox engine sim— paper engine in one command (#234)flox tapeCLI: 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 newCLI scaffolder (#158)CcxtBrokerlive 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)
AutoCorrelationindicator (#117)IndicatorGraph(batch) (#118)- Streaming
step()-basedIndicatorGraphfor live trading (#119) - Single source of truth for indicators and DAG (#122)
- HTML backtest report +
equity_curve/tradesaccessors (#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
.floxlogbinary 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
_fromseek across all bindings (#126) - LZ4 link in the Node binding so compressed segments read on every platform (#127)
TraceSignalHandler/TraceExecutionListeneradapters for.floxrun(#201)flox bundleshipsexpected.floxrunalongsideexpected_output.json(#202)- Runner attaches a
TraceRecorderfor one-call signal auto-capture (#209) - Trace order events and fills through the attached recorder (#210)
OrderGroupauto-dispatches recommended actions through the executor (#211)OrderGroupbasket-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)
.pyistubs +py.typedfor typed PyPI distribution (#129)index.d.tsfor typed npm distribution (#130)- Structured
FloxErrorwith 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
FloxErrorsurface 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.mdflox-mcp initquickstart (#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-llmsemitters (#133)- ABI snapshot CI gate (#135)
RiskManagerpre-trade hook (#136)KillSwitch+OrderValidatorpre-trade hooks (#137)- Logger callback hook for binding-side log redirection (#144)
- Post-emission observer hooks:
PnLTracker,StorageSink(#145) MarketDataRecorderhook (#146)ReplaySourcehook for binding-supplied event streams (#147)Executor+ExecutionListenerhooks (#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.