FLOX-Foundation/flox logo

FLOX-Foundation/flox

Free

FLOX 交易系统框架的 MCP 服务器,约 30 个工具:运行回测、生成策略模板、检测前瞻偏差、下单、查询盈亏,通过 Claude/Cursor 调用。同一份策略代码从回测到模拟到实盘运行(CcxtBroker 或原生连接器)。

FreeFree tier
Type
Open Source

About FLOX-Foundation/flox

flox-mcp is an open-source Model Context Protocol (MCP) server that gives AI agents (Cursor, Claude Code, Cline) grounded access to the FLOX trading framework's C-API surface, error catalog, and indicator library. It runs locally on the developer's machine over stdio, providing 13 tools for tasks such as listing indicators, looking up error codes, searching C-API functions, validating Python strategy code, explaining event structs, resolving symbol names across bindings, generating strategy templates, running backtests in a sandboxed subprocess, computing indicators, and suggesting indicators from natural language descriptions. The server is installed via pip and initialized with a single command, integrating seamlessly into existing MCP-compatible IDEs.

Key Features

13 tools for interacting with FLOX: list_indicators, lookup_error_code, list_capi_functions, validate_strategy, explain_event, lookup_symbol, list_bindings, get_example, scaffold_strategy, docs_search, run_backtest, compute_indicator, suggest_indicator
Runs locally on the developer's machine over stdio (no public hosting, data stays local)
Integrates with Cursor, Claude Code, and Cline via MCP
Supports both Python and Node strategy scaffolding with validation (ast.parse + node --check)
Sandboxed backtesting subprocess with CPU, memory, and output size caps
Includes indicator library introspection and natural-language-based indicator suggestion
Error catalog with detailed fix recipes and diagnostics
Cross-binding symbol resolution (C-API, Python, Node, Codon, QuickJS)
Documentation via FTS5 search over an allowlist of roots
Easy installation: pip install flox-mcp && flox-mcp init

Pros & Cons

Pros
  • Free and open-source
  • Comprehensive toolset specifically designed for FLOX trading framework developers
  • Local execution ensures privacy and low latency
  • Integrates with multiple popular AI coding agents
  • Includes sandboxed backtesting with resource limits to prevent runaway processes
  • CI ensures strategy templates do not quietly rot
Cons
  • Tied to the FLOX trading framework (not a general-purpose MCP server)
  • Backtesting sandbox lacks filesystem and network isolation (MVP state)
  • Requires local installation of Python (and Node for Node-based tools)
  • No hosted or cloud version available
  • Natural-language indicator suggestion is a pure keyword heuristic (no LLM), may need manual confirmation

Best For

Algorithmic trading strategy development and backtestingError diagnosis and troubleshooting during trading system developmentIndicator computation and analysisAutomated code generation for FLOX strategies via AI agentsDocumentation search and symbol lookup across FLOX bindingsRapid prototyping of trading strategies with scaffolded templates

FAQ

What is flox-mcp?
flox-mcp is a Model Context Protocol server that provides AI agents (Cursor, Claude Code, Cline) with grounded access to the FLOX trading framework's C-API surface, error catalog, and indicator library.
How do I install flox-mcp?
Install via pip with 'pip install flox-mcp', then run 'flox-mcp init' to write the .mcp.json configuration for your project. Restart your MCP client to start using the tools.
What tools does flox-mcp provide?
It provides 13 tools: list_indicators, lookup_error_code, list_capi_functions, validate_strategy, explain_event, lookup_symbol, list_bindings, get_example, scaffold_strategy, docs_search, run_backtest, compute_indicator, and suggest_indicator.
Is flox-mcp hosted or does it run locally?
The server runs locally on the developer's machine; the IDE spawns it as a child process and communicates over stdio. There is no public hosting, and no data leaves the machine.
Can I use flox-mcp for production backtesting?
The backtesting tool is an MVP sandbox that caps CPU, memory, and output size but does not isolate filesystem or network. Treat it as untrusted Python; use nsjail, firejail, or Docker for production.