brokers·mcp 🧪 DRY_RUN · docs only

MCP server for Claude · Groww live · Zerodha & more coming

Most trading bots sell you an edge. This one tests whether there is one — and refuses to fake it.

A safe trading toolkit you run as one Docker command and drive through Claude. Bring your own broker keys — it never holds your money, and real orders stay off by default. Its research harness is rigorous enough to tell you when there's no edge to trade.

Supported brokers

One toolkit, more brokers over time

Groww is live today. The broker layer is being abstracted so the same Claude tools work across platforms — your strategies and research don't change when the broker does.

What it does

Capabilities

Every order flows through one guarded path, so the safety switch can't be bypassed. Everything below is built on that foundation.

Execution

Orders, brackets & exits

Equity, F&O and MCX commodity orders, horizon-aware (MIS intraday / CNC delivery). Protective OCO brackets, GTT triggers, square-off, and fill confirmation.

place · bracket-oco · gtt · square-off
Research & rigor

Find an edge, honestly

Walk-forward every strategy, net of charges. Deflated Sharpe, expected-false-positives and Combinatorial Purged CV (PBO) catch the multiple-testing trap.

make research · --cpcv · --embargo
Risk & sizing

Bet less on weak evidence

Fractional Kelly and volatility targeting size down when the edge is thin — to zero when there's none. Circuit breaker, loss halts and a drift monitor.

KELLY_FRACTION · TARGET_DAILY_VOL
Pre-trade safety

Don't trade what you shouldn't

Vetoes entries on ASM/GSM/ESM surveillance names, blocks orders above the F&O quantity-freeze limit, and warns when a price is outside the day's circuit band.

SURVEILLANCE_GATE · FNO_FREEZE_QTY
Market data

Reads & F&O analytics

LTP, quotes, OHLC and candles; option chain, Greeks and expiries; a market calendar. Live Groww feed, delayed REST, or a websocket provider.

ltp · quote · option-chain · greeks
Signals & data

Capture, don't assume

Live order-book microstructure capture, a cross-asset scanner, a tip-source scorecard, news sentiment, an earnings/event calendar, and fundamentals + IPO data.

microstructure · scan · tips · news
Analytics & tax

Learn from what happened

Expectancy, charge drag and live slippage (TCA) from real closed trades — plus an India tax classification (speculative / STCG / LTCG) as a prep aid.

make report · --tax
Machine learning

No special treatment

A RandomForest with calendar/seasonality features and a small time-series Transformer are optional research candidates — judged by the same deflated-Sharpe bar as the rest.

--group ml · --group dl
Compliance

Built for the rules

Stamps every order with an exchange Algo-ID for the audit trail and rate-limits the write path under SEBI's retail-algo threshold.

ALGO_ID · MAX_ORDERS_PER_SEC
See every feature in depth →

How it works

Claude drives it — through one guarded path

You work entirely from Claude. Every request flows through the MCP tools to your broker, and every order passes one guarded write — so the safety switch governs everything, no matter what you ask for.

Claude → tools → broker

Claude MCP tools your broker the write chokepoint

Ask in plain language; Claude reads prices, runs research, and proposes trades through the MCP tools. Only the execution step can place an order, and it obeys the same gates whether the answer came from you or the model.

The write chokepoint. Every order routes through one guard that honours DRY_RUN, rate-limits under SEBI's algo threshold, stamps the Algo-ID, and degrades to a structured rejection instead of crashing. There is no other door to the market.

Safety model

Real money is opt-in, never accidental

The default state places no real orders. You have to deliberately, repeatedly choose otherwise — and a beginner lock can make real orders impossible even then.

DRY_RUN on by default

Intended orders are logged, never sent. The whole order path runs and the books update on paper — so you can trust the logic before a single rupee moves.

Learning-mode lock

With LEARNING_MODE=true, real orders are impossible — it overrides the live switch entirely, so a beginner can't place one by mistake.

One write chokepoint

Every mutating call routes through a single guard that honours DRY_RUN before any SDK call. The safety switch can't be bypassed because there's nowhere else to go.

LIVE takes real intent

Going live is a typed confirmation, and even then the kill switch (HALT.flag) flattens every position and stops on contact.

The honest verdict

A research bar strict enough to disappoint you

Run a hundred backtests and a few will look brilliant by chance. The harness is built to see through that. A strategy only earns a verdict it can defend out of sample.

01

Walk-forward, net of charges

Optimize on each in-sample fold, score the winner on the next, unseen fold — after realistic charges and slippage. No look-ahead, next-bar fills.

02

A strict verdict

A row is robust only if every out-of-sample fold pays and it took enough trades. One lucky fold is fragile; not paying is no-edge.

03

Deflated for multiple testing

Reports how many "winners" pure chance would produce across all trials, and the deflated Sharpe of the best — discounted for the number of attempts.

04

Combinatorial Purged CV

Tests every C(N,k) train/test split, not one path, and ranks by the Probability of Backtest Overfitting — how often "best in training" fails out of sample. --cpcv

05

Embargo against leakage

Drops bars at each fold boundary so a trade straddling the train/test line can't leak information. --embargo

robust Every out-of-sample fold positive, with enough trades to mean something.
fragile Positive in aggregate, but one fold lost or too few trades — a likely fluke.
no-edge Doesn't pay out of sample, net of charges. The most common — and honest — result.

Tested across rule-based strategies, a RandomForest, and a Transformer, this universe showed no robust edge. Model complexity didn't manufacture one — and the platform's value is telling you so instead of selling you a curve fit.

By design

What it won't do

The constraints are the product. Each of these is a deliberate refusal, not a missing feature.

  • Place a real order by default. DRY_RUN is on until you turn it off, and a learning-mode lock can make real orders impossible entirely.
  • Auto-trade tips or signals. Forwarded tips are captured and graded against their own forward returns — never obeyed. They're a known pump-and-dump vector.
  • Fake a backtest. Net of charges and slippage, next-bar fills, no look-ahead — and it states its own survivorship and corporate-action caveats out loud.
  • Claim an edge it can't defend. If a strategy can't clear the deflated-Sharpe bar out of sample, the verdict is no-edge — including the ML and Transformer candidates.
  • Hold your money or your keys. You self-host with your own credentials; nothing is pooled and nothing is custodial.
  • Pretend it's tax advice. The India tax classification is a preparation aid — real filing needs contract notes, full FIFO, and a CA.

How to use it

Run it with Claude in four steps

No clone, no Python — just Docker and a config block. The server runs on your machine; your credentials never leave it.

01

Install Docker Desktop

The only prerequisite. Nothing else to install.

02

Get your key + broker credentials

An activation key (see pricing below) and your own Groww API credentials — they stay on your machine.

03

Add the MCP to Claude

Paste the block below into Claude Desktop's config (or Claude Code's .mcp.json), filling in your key and credentials.

04

Ask Claude

“What's the LTP of WIPRO?” · “Run research on TCS, INFY” · “Place a buy of 1 WIPRO.” Orders are DRY_RUN until you explicitly opt in.

{
  "mcpServers": {
    "brokersmcp": {
      "command": "docker",
      "args": [
        "run", "--init", "--rm", "-i", "--pull=always",
        "-e", "LICENSE_KEY",
        "-e", "GROWW_AUTH_METHOD",
        "-e", "GROWW_TOTP_TOKEN", "-e", "GROWW_TOTP_SECRET",
        "ghcr.io/srinivasannagarajarao-art/brokersmcp:latest"
      ],
      "env": {
        "LICENSE_KEY": "your-activation-key",
        "GROWW_AUTH_METHOD": "totp",
        "GROWW_TOTP_TOKEN": "your-token",
        "GROWW_TOTP_SECRET": "your-secret"
      }
    }
  }
}

Activate

Pricing

Pricing & activation — being finalized

One key, the full toolkit in Claude

Bring your own broker keys; the MCP runs on your machine. You pay for the toolkit and the Claude integration — not for trading profits. By its own rigorous testing, this system has shown no proven edge; what it sells is safe, capable tooling.

or

Get updates on GitHub ↗

Self-hosted · your credentials stay local · DRY_RUN by default.