io.github.paarths-collab/quant-brain-mcp
Stock analysis MCP: 38 indicators, 7 optimizers, 8 backtests, US + India sectors.
Open source Repository Open in the app JSON README (API)
About
Stock analysis MCP: 38 indicators, 7 optimizers, 8 backtests, US + India sectors.
Details
- Kind
- MCP servers
- Topic
- No topic detected
- Publisher
- paarths-collab
- Origin
- official
- Category
- ferramentas
- Transport
- http
- Version
- 1.0.0
- Stars
- 4
- Last push
- 2026-08-16T18:23:06Z
- Repository state
- ativo
- Language
- Python
- License
- MIT
- Added
- 2026-08-29 04:00:58
- Updated
- 2026-08-29 04:00:58
- Origin id
io.github.paarths-collab/quant-brain-mcp
README
<div align="center">
# π§ Quant Brain MCP
**Turn Claude into a quantitative analyst for US and Indian equities.**
Ask in plain English. Get sized trade plans, portfolio optimization, backtests, and price alerts β grounded in real market data, not vibes.
[](https://registry.modelcontextprotocol.io/v0.1/servers?search=quant-brain-mcp)
[](tests/)
[](LICENSE)
[](requirements.txt)
</div>
---
```text
You: "Scan my watchlist and build a trade plan for whatever looks most actionable.
βΉ2,00,000 equity, 1% risk."
Claude: RELIANCE.NS flagged (at 20-DMA, volume 1.8x average).
TRADE PLAN β RELIANCE.NS (long)
Entry βΉ1,310.00
Stop βΉ1,270.10 (swing low, 2.1 ATR)
Size 50 shares (βΉ65,500 β 32.8% of equity)
Max loss βΉ1,995 (1.0% of equity)
Targets 1R βΉ1,349.90 Β· 2R βΉ1,389.80 Β· 3R βΉ1,429.70
Invalidation Thesis invalid below βΉ1,270.10 β exit without debate.
```
No API keys. No accounts. Connect one URL and start asking.
## β‘ Quickstart
**Claude Desktop / Claude Web** β Settings β Connectors β Add custom connector β **Streamable HTTP**:
```text
https://mcp-quant-brain.onrender.com/mcp
```
That's the whole setup. Try: *"What's RELIANCE trading at, and is it overbought?"*
> Free-tier note: the server sleeps when idle and takes ~50 s to wake. If the first request times out, retry once. Details in [Getting Started](docs/getting-started.md).
## π What you get β 25 tools
| | Tools | What they answer |
|---|---|---|
| π **Trader workflow** | `get_quote` Β· `get_news` Β· `build_trade_plan` Β· `scan_watchlist` Β· `price_alert` | *What's it at? What happened? **What do I do?** What moved this week? Tell me when it hits my level.* |
| π **Indicators** | 6 grouped `analyze_*` tools β 38 curated indicators | *Is it overbought? Trending or chopping? How volatile?* |
| πΌ **Portfolio** | `generate_optimized_verdict` β 7 optimization methods | *How do I split my money? What's my risk?* |
| π§ͺ **Backtests** | 7 rule-based strategies | *Does this strategy actually work, or does it just feel like it?* |
| π **Intelligence** | Sector ranking Β· sectorβstock pipeline Β· company profiles | *Which sector is leading? Which stocks inside it?* |
| π **Charts** | Institutional chart pack, rendered as images | *Show me.* |
Full reference with every parameter: **[docs/tools.md](docs/tools.md)**
## π The workflow it's built around
```mermaid
flowchart LR
S["π <b>scan_watchlist</b><br/>what moved this week?"] --> N["π° <b>get_news</b><br/>why did it move?"]
N --> P["π <b>build_trade_plan</b><br/>entry Β· stop Β· size Β· targets"]
P --> A["π <b>price_alert</b><br/>watch my levels"]
A -.->|level breaks β notified| P
subgraph deeper["go deeper anytime"]
I["π indicators"] ~~~ B["π§ͺ backtests"] ~~~ O["πΌ optimizer"]
end
S -.-> deeper
```
## π Price alerts that survive restarts
```text
You: "Alert me if RELIANCE drops below βΉ1,270" β stored server-side (Postgres)
...
Bot: "PRICE ALERT FIRED β RELIANCE.NS moved below 1270.00, now at 1268.20"
```
Alerts are one-shot, persist across server restarts, and pair with a scheduled Claude task that checks hourly during market hours and pushes to your phone. Setup in **[docs/price-alerts.md](docs/price-alerts.md)**.
## π― Why this instead of a stock screener?
1. **It answers the trading question, not just the data question.** Indicators tell you RSI is 43. `build_trade_plan` tells you *entry, stop, how many shares, and where your thesis dies* β sized to your account.
2. **India is a first-class citizen.** NSE tickers, NIFTY benchmarking, 8 Indian sector indices, βΉ formatting. Not a US tool with `.NS` bolted on.
3. **The numbers are audited.** Every calculation was adversarially tested against textbook references and live data β 161 automated tests pin the math, including regression tests for 11 real bugs found and fixed along the way. See [docs/architecture.md](docs/architecture.md).
4. **Honest about its data.** Delayed quotes are labeled with timestamps. Stale feeds are flagged, not hidden. FX limitations are disclosed, not papered over.
## π Documentation
| Page | What's in it |
|---|---|
| [Getting Started](docs/getting-started.md) | Connecting from Claude Desktop, Web, and Code; cold starts; troubleshooting |
| [Tool Reference](docs/tools.md) | All 25 tools, every parameter, response shapes |
| [Example Prompts](docs/examples.md) | The prompt cookbook β from one-liners to full workflows |
| [Price Alerts](docs/price-alerts.md) | Persistent alerts + the scheduled watcher pattern |
| [Architecture & Methodology](docs/architecture.md) | How it works, data conventions, the bug audit, telemetry |
## β οΈ Honest limits
- **Data**: Yahoo Finance. US quotes near-real-time; NSE/BSE ~15 min delayed. Daily bars for analysis.
- **No** options chains, futures, intraday candles, or tick data.
- **Not investment advice.** Educational analysis tooling. Every trade plan says so and means it.
## License
[MIT](LICENSE) β use it, fork it, ship it.