Skip to main content
Glama
tanmaymish

MarketPulse MCP

README.md
<p align="center">
  <img src="https://img.shields.io/badge/Python-3.10+-3776AB?style=for-the-badge&logo=python&logoColor=white" />
  <img src="https://img.shields.io/badge/MCP-Protocol-8b5cf6?style=for-the-badge" />
  <img src="https://img.shields.io/badge/NSE/BSE-Live_Data-22c55e?style=for-the-badge" />
  <img src="https://img.shields.io/badge/AI_Agents-6_Debaters-f59e0b?style=for-the-badge" />
  <img src="https://img.shields.io/badge/License-MIT-blue?style=for-the-badge" />
</p>

<div align="center">
  [![M8ven Score](https://m8ven.ai/badge/mcp/tanmaymish-marketpulse-mcp-ifi67o?v=4a08cf3b34f72957536681d6237feb80)](https://m8ven.ai/mcp/tanmaymish-marketpulse-mcp-ifi67o)
</div>

<h1 align="center">๐Ÿ“ˆ MarketPulse MCP</h1>
<h3 align="center">95 Free Financial Intelligence Tools for AI Agents</h3>
<p align="center"><em>Indian + Global Markets โ€ข MCP-Native โ€ข Works with Claude, Cursor & any MCP client</em></p>

---

## ๐ŸŽฏ What is MarketPulse MCP?

**MarketPulse MCP** is an open-source Model Context Protocol (MCP) server that gives AI assistants like Claude real-time access to **95 financial data tools** โ€” covering Indian equities (NSE/BSE), global markets, options analytics, AI-driven stock debates, portfolio analysis, and more.

Ask one question like `"Should I buy Reliance?"` and get a 6-agent debate, sentiment analysis, smart-money detection, risk assessment, peer context, and a consensus BUY/HOLD/SELL โ€” all in one response.

```bash
pip install finstack-mcp
```

### What You Can Ask

```text
"Give me a full stock brief on Reliance"
โ†’ 6 AI agents debate: FII Desk + Algo Trader + Value Investor + Retail Pulse + Macro Analyst + Options Flow
โ†’ Consensus: BUY/HOLD/SELL with reasoning

"Is someone accumulating HDFC Bank quietly?"
โ†’ Checks OI buildup + block deals + promoter buying + volume spike simultaneously

"What's the social buzz on TCS before results?"
โ†’ StockTwits + Reddit + Economic Times โ†’ 67% bullish | Signal: HOLD

"Will Nifty go up tomorrow?"
โ†’ RSI + FII flow + PCR + VIX + G-Sec + GIFT Nifty โ†’ 63% probability up

"Give me the 8:15 AM F&O brief"
โ†’ GIFT Nifty + VIX + NIFTY setup + BANKNIFTY setup โ†’ ready-to-forward morning note
```

---

## ๐Ÿ—๏ธ Architecture Overview

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      MarketPulse MCP Architecture                   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Data    โ”‚    Tools     โ”‚   AI Intel   โ”‚  Portfolio โ”‚   MCP Layer  โ”‚
โ”‚ Sources  โ”‚   (95+)      โ”‚   Engine     โ”‚  Analytics โ”‚              โ”‚
โ”‚          โ”‚              โ”‚              โ”‚            โ”‚              โ”‚
โ”‚ NSE/BSE  โ†’ Indian Mkt  โ†’ Stock Brief  โ†’ XIRR/P&L  โ†’ Claude       โ”‚
โ”‚ yfinance โ†’ Global Mkt  โ†’ Stock Debate โ†’ Risk Flags โ†’ Cursor       โ”‚
โ”‚ Brokers  โ†’ Options     โ†’ Sentiment    โ†’ Sec. Conc. โ†’ Windsurf     โ”‚
โ”‚ CoinGeckoโ†’ Crypto/FX   โ†’ Smart Money  โ†’ Overlap   โ†’ Any MCP CLI  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

---

## ๐Ÿ’ฐ What This Replaces

| Tool | What You Pay | MarketPulse MCP |
|---|---|---|
| Bloomberg Terminal | $31,980/yr | **FREE** |
| Bloomberg ESG + Credit | $24,000/yr | **FREE** |
| Sensibull (Options Greeks) | โ‚น15,600/yr | **FREE** |
| Morningstar (MF flows) | $17,500/yr | **FREE** |
| Screener.in Pro | โ‚น4,999/yr | **FREE** |
| Trendlyne Pro | โ‚น4,950/yr | **FREE** |

---

## ๐Ÿš€ Quick Start (2 minutes)

### Install

```bash
pip install finstack-mcp
```

### Connect to Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "marketpulse": {
      "command": "python",
      "args": ["-m", "finstack.server"]
    }
  }
}
```

Restart Claude Desktop. Done.

### Connect to Cursor / Windsurf / Cline

```json
{
  "mcpServers": {
    "marketpulse": {
      "command": "python",
      "args": ["-m", "finstack.server"]
    }
  }
}
```

---

## ๐Ÿ”ง 95 Tools Across 10 Categories

### ๐Ÿ‡ฎ๐Ÿ‡ณ Indian Markets (Live Data)
- NSE/BSE real-time quotes, OHLCV history, market status
- Nifty 50, Bank Nifty, Sensex indices
- FII/DII institutional flows (daily + historical)
- Bulk & block deals, circuit breaker scanner, 52W high/low
- Mutual fund NAV, corporate actions, earnings calendar, IPO calendar

### ๐Ÿง  AI Intelligence (Unique)
- **`get_stock_brief`** โ€” 6 AI agents debate โ†’ BUY/HOLD/SELL consensus
- **`get_stock_debate`** โ€” 3-round sequential debate with rebuttals
- **`get_social_sentiment`** โ€” StockTwits + Reddit + ET RSS โ†’ sentiment signal
- **`detect_unusual_activity`** โ€” OI buildup + block deals + volume spike
- **`get_nifty_outlook`** โ€” 6-signal probability model for next session
- **`get_fno_trade_setup`** โ€” NIFTY/BANKNIFTY options call with ATM strike
- **`predict_earnings`** โ€” Beat/miss probability before quarterly results

### ๐Ÿ“Š Research & Ranking
- **`scan_watchlist`** โ€” Batch-rank watchlist, surface top buys and risks
- **`get_stock_signal_score`** โ€” Automation-friendly score with factor impacts
- **`get_stock_timeline`** โ€” News, results, insider, sentiment in one feed
- **`get_sector_peer_context`** โ€” Sector strength + peer rank

### ๐Ÿ’ผ Portfolio & Risk
- **`analyze_portfolio`** โ€” P&L, XIRR, sector concentration, diversification
- **`get_mf_overlap`** โ€” Fund overlap % from AMFI disclosures
- **`get_pledge_alert`** โ€” Promoter pledge early warning
- **`detect_pump`** โ€” Pump-and-dump pattern detector for small caps

### ๐Ÿ”— Broker Integrations (Zero-Delay)
- Angel One SmartAPI โ€” live quotes, Level 2 depth, intraday candles
- Fyers API v3 โ€” live quotes + candles
- ICICI Breeze / Dhan / Upstox โ€” all supported

### ๐Ÿ“ Options & Greeks
- Full NSE options chain with PCR, Open Interest, Max Pain
- Black-Scholes Greeks: Delta, Gamma, Theta, Vega, Rho

### ๐ŸŒ Global + Crypto + Tax
- US, EU, global equities โ€” quotes + history
- Crypto: BTC, ETH, SOL, 100+ coins (CoinGecko)
- Forex: USD/INR, EUR/INR, 50+ pairs
- **LTCG/STCG tax calculator** (post-July 2024 Budget rules)

### ๐Ÿ‡ฎ๐Ÿ‡ณ India-Specific (Never-Built-Before)
- **`correlate_gst_to_stocks`** โ€” GST data as sector leading indicator
- **`get_telegram_tracker`** โ€” Tip channel accuracy + pump scoring
- **`analyze_budget_live`** โ€” Paste FM speech โ†’ instant sector signals
- **`get_insider_signal`** โ€” SEBI SAST pattern vs forward returns

---

## ๐Ÿ”ฌ Data Sources

| Source | Covers | Key Needed |
|---|---|---|
| yfinance | NSE/BSE/US equities, crypto, forex | None |
| NSE direct API | FII/DII, options chain, insider trading | None |
| BSE India API | Credit ratings, ESG/BRSR | None |
| SEC EDGAR | US filings (10-K, 10-Q, 8-K) | None |
| CoinGecko | Crypto market data | None |
| AMFI / mfapi.in | Mutual fund NAV, AUM | None |
| StockTwits | Trader sentiment | None |
| Angel One SmartAPI | Real-time NSE, Level 2 depth | Free account |

---

## ๐Ÿ› ๏ธ Development

```bash
git clone https://github.com/tanmaymish/MarketPulse-MCP.git
cd MarketPulse-MCP
pip install -e .[dev]
pytest -q
```

PRs welcome. Adding a new broker: create `src/finstack/data/broker_X.py` and register in `tools/`.

---

## ๐Ÿ“ˆ Comparison vs Market Tools

| Feature | MarketPulse MCP | Screener.in | Tickertape | Sensibull | Trendlyne |
|---|---|---|---|---|---|
| AI agents debate a stock | โœ… | โŒ | โŒ | โŒ | โŒ |
| Social sentiment | โœ… | โŒ | โŒ | โŒ | โŒ |
| Nifty direction probability | โœ… | โŒ | โŒ | โŒ | โŒ |
| Telegram tip tracker | โœ… | โŒ | โŒ | โŒ | โŒ |
| Options Greeks | โœ… free | โŒ | โŒ | โœ… โ‚น1,300/mo | โŒ |
| Works inside Claude/Cursor | โœ… | โŒ | โŒ | โŒ | โŒ |
| **Price** | **Free** | โ‚น4,999/yr | โ‚น2,800/yr | โ‚น15,600/yr | โ‚น4,950/yr |

---

## ๐Ÿ“œ License

MIT License โ€” Free to use, modify, and distribute.

---

## ๐Ÿ“ฌ Contact

**Tanmay Mishra**
๐Ÿ“ง [tanmaymish78@gmail.com](mailto:tanmaymish78@gmail.com)
๐Ÿ”— [LinkedIn](https://www.linkedin.com/in/tanmay-mishra-0308a8207)
๐Ÿ™ [GitHub](https://github.com/tanmaymish)

---

<p align="center">โญ Star this repo if you found it useful!</p>

TDQS

B3.4/5.0

Scored across 95 tools

Disambiguation2/5

Many tools overlap significantly: multiple quote tools (nse_quote, stock_quote, live_quote, fyers_live_quote, icici_live_quote), multiple portfolio analyzers (portfolio_analysis, analyze_portfolio), and multiple pledge/insider tools. The boundaries between get_stock_brief and get_stock_debate, or dividend_history and dividend_history_deep, are unclear. An agent would struggle to pick the right tool for a given task.

Naming Consistency3/5

Most tools use snake_case, but the prefix patterns are inconsistent: some start with nse_, some with stock_, some with get_, some with calculate_, etc. The verb-noun structure is not consistently applied (e.g., 'nse_quote' vs 'get_nifty_outlook'). While readable, the naming lacks a predictable scheme.

Tool Count1/5

With 95 tools, this server is extremely bloated. Even for a comprehensive market data platform, 95 tools exceeds any reasonable scope by a wide margin. Many tools are redundant or overly granular, making the surface area unmanageable.

Completeness4/5

The server covers an extensive domain: quotes, historical data, fundamentals, options, portfolio analysis, tax, macro indicators, and even sentiment signals. Minor gaps exist, such as no direct trade execution or more exotic asset classes, but for its apparent purpose of Indian market analysis, coverage is thorough.

Maintenance

ActivitySlowing
ResponsivenessNo issues