MCP Directory

How to add flox-mcp to Cursor

Grounded access to the FLOX trading framework surface for AI coding agents. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 215 · stdio · no auth · official

Cursor config for flox-mcp

pip install flox-mcp
{
  "mcpServers": {
    "flox-mcp": {
      "command": "flox-mcp",
      "args": [
        "serve"
      ],
      "env": {
        "FLOX_RUNTIME_STATE": "$HOME/.flox/runtime.json"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the flox-mcp config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of flox-mcp's tools to confirm it's connected.

Before you start

  • Python 3.10+
  • An MCP client that reads a project-local .mcp.json (Claude Code, Cursor, or Cline)
  • flox-py installed for compute_indicator (pip install "flox-mcp[flox]")
  • A running paper/live engine plus FLOX_CONTROL_URL and FLOX_CONTROL_TOKEN for tier-5/6 live-state tools

What flox-mcp can do in Cursor

list_indicators

List every indicator in flox_py with class signature, batch fn (if any), and shape. Filter by substring.

lookup_error_code

Resolve a FLOX error code (e.g. E_SYM_001) to its full Markdown page with fix recipe, common causes, and diagnostics.

list_capi_functions

Search the FLOX C-API surface from the committed ABI snapshot. Returns name + return type + parameter types.

validate_strategy

Static-analysis check on Python strategy code: AST parses, expected hooks present, no eval/exec.

explain_event

Describe the fields of a FLOX event struct (FloxTradeData, FloxBookData, FloxBarData, FloxSymbolContext, FloxSignal). Accepts a struct name or a raw event dict.

lookup_symbol

Take any binding-local spelling (FloxBarData, BarData, flox_indicator_ema, ema) and return what the symbol is called in C-API, Python, Node, and Codon.

list_bindings

Enumerate the exports of one binding (capi, python, node, codon, quickjs). Substring filter and limit.

get_example

Return code from docs/examples/ matching a topic (strategy, connector, indicator, event-handler, risk, backtest), optionally filtered by language.

Security

Runs locally over stdio; makes no network calls. Most tools are read-only lookups. `run_backtest` is an MVP sandbox that caps CPU, memory, and output size but does NOT isolate filesystem or network — treat strategy code as untrusted and wrap with nsjail / firejail / Docker for any deployment that takes untrusted input. Tier-5/6 live tools (`place_order`, `flatten_positions`) require a separately started paper/live engine and a control token (`FLOX_CONTROL_URL` / `FLOX_CONTROL_TOKEN`).

flox-mcp + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the flox-mcp config there under the "mcpServers" key and restart the client.

Is flox-mcp safe to use with Cursor?

Runs locally over stdio; makes no network calls. Most tools are read-only lookups. `run_backtest` is an MVP sandbox that caps CPU, memory, and output size but does NOT isolate filesystem or network — treat strategy code as untrusted and wrap with nsjail / firejail / Docker for any deployment that takes untrusted input. Tier-5/6 live tools (`place_order`, `flatten_positions`) require a separately started paper/live engine and a control token (`FLOX_CONTROL_URL` / `FLOX_CONTROL_TOKEN`).

Does the server make network calls or send data anywhere?

No. The server is local-only: the AI client spawns it as a child process and talks to it over stdio. It makes no network calls and nothing leaves the machine.

How do I configure it?

Run `pip install flox-mcp` then `flox-mcp init`, which writes a project-local `.mcp.json` (use `--global` for the client-wide path). Restart your MCP client. You can also hand-edit the `mcpServers.flox` entry shown in the README.

Is run_backtest safe for untrusted code?

It is an MVP sandbox that caps CPU, memory, output size, and wall-clock time, but it does NOT isolate the filesystem or network. Treat strategy code as untrusted Python and wrap it with nsjail / firejail / Docker for any deployment that accepts untrusted input.

View repo Full flox-mcp page