brokersยทmcp ๐Ÿงช DRY_RUN ยท docs only
Features ยท in depth

Every feature, explained.

BrokersMCP is a full trading toolkit you drive from Claude โ€” and every part of it is built around one idea: be useful without ever pretending to an edge it can't prove. Here's what each piece actually does, and where it's honest about its limits.

Execution

Orders, brackets, exits โ€” and proof they filled

Trading isn't just "buy." You place equity, F&O and MCX commodity orders, horizon-aware so intraday goes MIS and delivery goes CNC โ€” never the wrong product by accident. You protect a position with an OCO bracket (a target and a stop where one leg cancels the other), set GTT triggers, square off to flatten, and cancel โ€” then read the fill / order detail back to confirm what actually executed and at what average price.

  • place โ€” equity / F&O / commodity, MIS or CNC/NRML
  • bracket-oco โ€” protective target + stop, one cancels the other
  • gtt โ€” good-till-triggered orders; square-off โ€” flatten a position
  • fills / detail / trades โ€” confirm the real fill, partial fills included
The honest bit. Every order routes through one guarded write that honours DRY_RUN, so a real trade is impossible until you deliberately switch it off. There is no other path to the market.

Research & rigor

A research bar strict enough to disappoint you

Run a hundred backtests and a few look brilliant by chance. The research harness is built to see through that. It walk-forwards every strategy over your symbols โ€” net of charges and slippage โ€” and only calls a result robust if every out-of-sample fold pays. Then it applies the multiple-testing defenses most tools skip: how many "winners" pure chance would produce, the deflated Sharpe of the best (discounted for the number of attempts), Combinatorial Purged CV with a probability-of-overfitting score, and an embargo against boundary leakage.

  • Walk-forward, net of charges + slippage, no look-ahead
  • Strict verdict โ€” robust / fragile / no-edge
  • Deflated Sharpe + expected false positives (multiple-testing)
  • CPCV / PBO and --embargo for an honest out-of-sample read
The honest bit. Tested across rule-based strategies, a RandomForest, and a Transformer, this hasn't found a robust edge on retail data โ€” and saying so, instead of selling a curve fit, is the whole point.

Risk & sizing

Bet less on weak evidence

Position size scales with how much edge you've actually measured. Fractional Kelly and volatility targeting shrink the bet when the evidence is thin โ€” to zero when there's none โ€” and size a calm name larger than a jumpy one for the same risk budget. A circuit breaker enforces intraday drawdown, consecutive-loss and per-symbol cooldown limits, day/week/month loss halts cut new entries, and a drift monitor flags when live results decay from the backtest.

  • Fractional Kelly + volatility targeting (no edge โ†’ size 0)
  • Circuit breaker + kill switch (HALT flag flattens and stops)
  • Loss halts โ€” daily / weekly / monthly ยท drift regime alerts
The honest bit. Honest by construction โ€” weak evidence produces smaller or zero bets, and a decayed edge raises a flag to re-validate rather than keep trading.

Pre-trade safety

Don't trade what you shouldn't

Some orders the exchange would simply reject, and some names you shouldn't enter at all. BrokersMCP catches these before the order goes out: it vetoes new entries on ASM / GSM / ESM surveillance-listed symbols (trade-for-trade, price-frozen names that trap intraday strategies), blocks derivative orders above the F&O quantity-freeze limit, and warns when a price is outside the day's circuit band.

The honest bit. These are real Indian-market rules baked into the order path โ€” a name at its upper circuit can't be exited, so it's better to never enter it than to get stuck.

Market data & F&O

Reads to decide on

Ask Claude for live prices and it reads them through the broker: LTP, full quotes with depth, day OHLC, and chunked historical candles. For derivatives it pulls the option chain, Greeks, expiries and tradable contracts, plus a market-calendar/status check. Prices can come from the broker live, a delayed REST source, or a streaming websocket feed.

The honest bit. These are reads only โ€” they inform decisions; execution always goes back through the gated order path.

Signals & data capture

Capture, don't assume

The real order-flow signal isn't in OHLCV history, so BrokersMCP captures live order-book microstructure (bid/ask imbalance, spread, depth) and runs a forward-return study on it. Alongside that: a cross-asset scanner (what's in play across stocks + commodities), a tips scorecard that grades any source's calls net of charges, news sentiment and an earnings/events calendar that can veto entries, and fundamentals + IPO data.

The honest bit. These are candidate generators and observational tools โ€” a scanner hit or a tip is never auto-traded, and a tip source is graded, not obeyed (forwarded tips are a known pump-and-dump vector).

Analytics & tax

Learn from what actually happened

From your real closed trades it computes expectancy, win rate, charge drag (how much of gross the costs ate), and live slippage (actual-vs-intended fill cost) โ€” broken down by symbol, time-of-day, side and horizon. It also sorts closed trades into India tax buckets: speculative (intraday) / STCG / LTCG, net of charges, with the โ‚น1.25L exemption and the 23-Jul-2024 split.

The honest bit. The tax view is a preparation aid, not ITR-grade โ€” exact filing needs raw contract notes, full FIFO and a CA.

Machine learning

No special treatment

ML is available but earns its place the same way everything else does. A causal RandomForest with price + calendar/seasonality features, and a small time-series Transformer, are optional research candidates โ€” judged by the same walk-forward, deflated-Sharpe and CPCV bar as the rule-based strategies.

The honest bit. On retail OHLCV they show no edge (they abstain) โ€” model complexity doesn't manufacture an edge the data lacks, and the rigor catches it rather than being fooled by a pretty backtest.

Compliance

Built for the rules

Every order is stamped with an exchange Algo-ID for the audit trail, and the write path is rate-limited under SEBI's retail-algo threshold (~10 orders/sec) so a burst can't reclassify you. These are wired into the same chokepoint as DRY_RUN.

The honest bit. Self-use is fine; selling an order-placing algo to others in India needs broker empanelment + exchange approval under SEBI's framework โ€” verify before any commercial use.

Run it with Claude

One Docker command, a config block, your own broker keys. DRY_RUN by default.

โ† back to BrokersMCP