EARLY ACCESS · IBKR PAPER ACCOUNTS

Stop Runaway AI Orders.
Enforce Hard Risk Gates on Interactive Brokers.

AirbagMCP is a Rust MCP server that sits between an AI agent and Interactive Brokers. It checks every order against hard risk limits before the order can leave your machine. It is early access for IBKR paper accounts. Support for live accounts is planned.

Single Rust binary · MCP over stdio · Tested on Linux only · MIT licence
Look-Ahead Tested
Every strategy family is tested: changing future data changes no past decision.
Zero-Token Quiet Ticks
The coalescer absorbs ticks locally. It wakes the agent only on anomalies.
Hard Risk Gates
The gate rejects market orders, repeated order keys and orders that break your limits.
SIMULATED RESULTS · 20-YEAR TEST

We Tested Our Own Strategies. None Survived.

We built five strategy families and ran each one through the tests below. We publish the result because the tests only mean something if they can fail.

Together the five families ran 11,364 backtests. Each family then went through combinatorial purged cross-validation, the probability of backtest overfitting (PBO), a deflated Sharpe ratio that uses the true trial count, and a permuted-signal placebo test. 0 of 5 families pass.

Median out-of-sample excess return over SPY, % per year, 20-year test

Median out-of-sample excess return over SPY for five strategy families All five bars are below zero. Conviction reversion minus 3.06 percent per year. HMM stat-arb minus 3.92. Catalyst spike minus 3.10. Bottleneck tailwind minus 2.12. Dual momentum minus 7.13. Conviction reversion HMM stat-arb Catalyst spike Bottleneck tailwind Dual momentum -3.06% -3.92% -3.10% -2.12% -7.13% 0 = SPY -2% -4% -6% -8% Bars to the left of the line trail SPY.
Strategy family Median OOS excess (%/yr) PBO Deflated Sharpe Placebo p-value Gates failed Result
Conviction reversion -3.06 0.13 0.001 1.000 Excess, Sharpe, placebo Fail
HMM stat-arb -3.92 0.24 0.681 0.951 Excess, Sharpe, placebo Fail
Catalyst spike -3.10 0.16 0.017 0.171 Excess, Sharpe, placebo Fail
Bottleneck tailwind -2.12 0.68 0.959 0.268 Excess, PBO, placebo Fail
Dual momentum -7.13 0.37 0.279 1.000 Excess, Sharpe, placebo Fail

A family passes only if its median out-of-sample excess over SPY is positive, its PBO is below 0.40, its deflated Sharpe is at least 0.95, and its placebo p-value is at most 0.05.

  • Limits of these tests:
  • The look-ahead tests cover symbols in the local cache and a sample of cut days.
  • The local cache has survivorship bias.
  • Prices exclude dividends.
  • These are simulated results. They do not predict future results.
INTERACTIVE DEVELOPER WORKBENCH

Test the Risk Gate Live

Pick an order and run it. The server runs the real gate code on a throwaway ledger with sample prices. No broker is connected.

● REAL GATE CODE · SAMPLE PRICES
⚡ Preset Test Scenarios
⚙️ Order Variables
Sample spread (display only): 2.1 bps (Liquid)
Ledger: Throwaway, new per request
Routing of approved limits: IBKR Adaptive (Normal)
Inspection Result: ✖ REJECTED
⏱ not run yet
Running the scenario on the server...
Status: waiting for the first run
GATE ORDER

What the Gate Checks, in Order

The gate runs these checks in this order. The first check that fails rejects the order.

STEP 1

Duplicate Key

Looks up the client order key in a SQLite ledger. A repeated key is refused. The MCP layer also asks the broker whether it already holds that order ref.

STEP 2

Loss Locks and Kill Switch

Applies the daily loss lock and the total drawdown kill switch.

STEP 3

Market Orders and Limit Validity

Rejects market (MKT) orders. Requires a valid limit price.

STEP 4

Rate Limit

Limits how many orders can pass each minute.

STEP 5

Spread and Price Collar

Rejects orders when the spread is too wide. Rejects limit prices that sit too far from the market (fat finger).

STEP 6

Position, Sector and Volume Caps

Applies caps on a single name, on a sector and on average daily volume.

STEP 7

Commission Estimate and Adaptive Routing

Estimates commission and margin locally. Rejects orders where commission drag is too high. The estimate does not reject for margin. Approved limit orders route via IBKR Adaptive (Normal).

The time badge shows the time measured for that request. It includes opening the throwaway ledger. The gate does not time each step.

Three Problems and What AirbagMCP Does About Them

Each card lists a problem and what the code does today. Where a point is not proven, the card says so.

THE PROBLEM: LOOK-AHEAD BIAS

1. Backtests That See the Future

An SEC filing has a period-of-report date and a later acceptance time. An agent that sees the filing on the period date trades on numbers that were not public yet. A model can also remember how an asset performed.

WHAT IT DOES: POINT-IN-TIME CLOCK
  • Queries return an event only if accepted_at <= sim_clock.
  • Ticker masking replaces symbols with tokens. The tokens rotate daily.
  • Masking does not prove that a model cannot recognise an asset.
  • Friction accounting charges commission and spread costs.
THE PROBLEM: TOKEN COST

2. Piping Every Tick to the Model

If every market tick reaches the model, every tick costs tokens. The agent also reacts to noise.

WHAT IT DOES: STREAM COALESCER
  • Absorbs ticks locally at zero tokens.
  • Tracks VWAP, volatility and spread.
  • Wakes the agent on anomalies.
  • We have not measured the total token saving.
THE PROBLEM: UNATTENDED ORDERS

3. An Agent That Places Orders Alone

An agent can send market orders, loop on errors, or send the same order twice after a reconnect.

WHAT IT DOES: THE RISK GATE
  • Rejects market orders. Requires a limit price.
  • Refuses a repeated order key.
  • Daily loss lock and total drawdown kill switch.
  • Order rate limit, spread limit and price collar.
  • Single-name, sector and volume caps.
  • Rejects orders with high commission drag.
  • Routes approved limits via IBKR Adaptive (Normal).

Nine MCP Tools

  • set_sim_clock
  • query_pit_events
  • ingest_stream_tick
  • get_stream_digest
  • stage_airbag_limit_order
  • get_conviction_candidates
  • get_risk_and_friction_status
  • get_ibkr_paper_account
  • flatten_all_positions

Where It Stands

  • Built and tested for IBKR paper accounts. No real order has been sent through the Rust path yet. Live support is planned.
  • One Rust binary. Run airbag mcp to start the MCP server over stdio. The server offers tools only and no MCP resources.
  • Tested on Linux only.
  • The repository includes a Docker Compose file that runs a local paper IB Gateway.
  • Local SEC ingest covers 8-K filings, MD&A tone and XBRL facts for 2,396 filers.
  • The local data cache has survivorship bias.

Developer Pricing

No payment is taken today. This is the planned pricing. Items marked Exists are in the code now. Items marked Planned are not built yet.

LOCAL · EARLY ACCESS (PAPER)

Developer Execution Sidecar

$79 / mo

or $59/mo billed annually (save 25%)

Run the Rust binary locally against your own IBKR paper account. Live support is planned.

  • Rust risk gate: rejects market orders, requires a limit price Exists
  • Approved limits route via IBKR Adaptive (Normal) Exists
  • Daily loss lock, drawdown kill switch and order rate limit Exists
  • SQLite ledger that refuses repeated order keys Exists
  • Starter strategy templates Exists
  • Live account support Planned
  • Deployment kit Planned
HOSTED · PLANNED

Hosted PIT SEC Catalyst Feed

$39 / mo

or $29/mo billed annually (save 25%)

This tier is entirely planned. Nothing in it is hosted today.

  • Hosted remote MCP URL Planned
  • Point-in-time SEC data: 8-K events, MD&A tone and XBRL facts Planned
  • Ticker masking that rotates daily Planned
  • Usage limits set at launch Planned

The SEC ingest runs locally today.

LOCAL NOW · HOSTED PLANNED

Complete Quant Desk

$99 / mo

or $79/mo billed annually (save 20%)

The local sidecar plus the planned hosted feed.

  • Everything in Developer Execution Sidecar Exists
  • Everything in Hosted PIT SEC Catalyst Feed Planned
  • Starter strategy templates Exists
  • Deployment kit Planned
  • Survivorship-aware dataset Planned

Extras

Three extras are on the roadmap. One exists today.

EXISTS

Starter Templates

Two Python strategy templates in the repository: pead_drift_strategy.py and insider_cluster_strategy.py. They are starting points, not tested strategies.

PLANNED

Deployment Kit

Scripts to run the server and a paper IB Gateway on a server. Not built yet.

PLANNED

Survivorship-Aware Dataset

A dataset that includes delisted names. Not built yet. Today's local cache has survivorship bias.

APPLIES AT LAUNCH

30-Day Paper-Trading Guarantee

This guarantee applies at launch. No payment is taken today. It covers only an order that breaks your configured limits, or a repeated order key, that the gate lets through on an IBKR paper account. In that case, email us within 30 days of your first payment and we refund that payment.

Join the Early Access List

No payment today

Tell us which tier interests you. We will email you when it is ready. No payment is taken today.