Covers NSE, BSE, MCX, Mutual Funds, F&O, ETFs, IPOs, Sovereign Gold Bonds, Commodities, Currency, Technical Analysis, Stock Screener, Company Financials, Candlestick Patterns, News & Sentiment — plus optional broker integration for live trading via Angel One or Zerodha.
Why this over other Indian market MCPs?
Quick Start
Option 1: Use the hosted server (zero install)
{
"mcpServers": {
"indian-market": {
"type": "url",
"url": "https://indian-market-mcp-wweh.onrender.com/mcp"
}
}
}
Option 2: Install from PyPI
pip install indian-market-mcp
indian-market-mcp
Option 3: Run without installing
uvx indian-market-mcp
Option 4: Self-host HTTP
MCP_TRANSPORT=http uvx indian-market-mcp
# Server at http://localhost:8000/mcp
Option 5: Docker
docker build -t indian-market-mcp .
docker run -p 8000:8000 indian-market-mcp
Connect to Your AI Tool
Claude Code
Add to ~/.mcp.json:
{
"mcpServers": {
"indian-market": {
"command": "uvx",
"args": ["indian-market-mcp"]
}
}
}
Claude Desktop
Go to Settings > MCP Servers > Add. Use the hosted URL or local config:
{
"mcpServers": {
"indian-market": {
"type": "url",
"url": "https://indian-market-mcp-wweh.onrender.com/mcp"
}
}
}
Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"indian-market": {
"command": "uvx",
"args": ["indian-market-mcp"]
}
}
}
VS Code (Copilot)
Add to your VS Code settings.json:
{
"mcp": {
"servers": {
"indian-market": {
"command": "uvx",
"args": ["indian-market-mcp"]
}
}
}
}
Windsurf / Cline / Any MCP Client
Use stdio config (command + args) or remote URL (https://indian-market-mcp-wweh.onrender.com/mcp) depending on what your client supports.
Examples
Ask your AI assistant in natural language:
Stocks
"What's the price of Reliance?"
"Show me top gainers today"
"Get historical data for TCS from Jan to June 2025"
"Which stocks hit 52-week high today?"
"Search for stocks related to EV"
Derivatives & Options
"Show me NIFTY 50 option chain"
"What's the Put-Call Ratio for Bank Nifty?"
"Calculate max pain for NIFTY"
"Get futures data for Reliance"
"Show open interest across all expiries for NIFTY"
Mutual Funds
"Search for SBI Bluechip mutual fund"
"Compare SBI Bluechip vs Axis Bluechip — 1Y returns"
"Get NAV history for scheme code 119598"
"Show me top equity mutual fund categories"
MF Analysis & Recommendations
"I want to invest in a mutual fund for 3 years — suggest the best one"
"Find hidden gems in mid-cap mutual funds"
"Analyze SBI Bluechip Fund — risk, returns, consistency"
"If I did Rs 10,000 SIP in this fund for 3 years, what would be my returns?"
"Compare these 3 funds and tell me which is best for moderate risk"
Screener
"Find stocks with PE < 15 and ROE > 20%"
"Screen for penny stocks under Rs 50"
"Show me large cap value stocks"
"Find stocks near their 52-week high"
"Screen IT sector stocks with high dividend yield"
Technical Analysis
"Get technical indicators for RELIANCE — RSI, MACD, Bollinger"
"What are the support and resistance levels for TCS?"
"Detect candlestick patterns for INFY in the last 3 months"
"Scan RELIANCE, TCS, INFY for Bullish Engulfing patterns"
Financials
"Show me TCS income statement"
"Get quarterly balance sheet for Reliance"
"What are the key financial ratios for HDFC Bank?"
"Compare TCS with its industry peers"
Commodities & Currency
"What's the gold price right now?"
"Get silver price history for last 6 months"
"What's the USD/INR exchange rate?"
"Show me all commodity prices"
Market & News
"Is the market open right now?"
"Show FII/DII data for today"
"Get latest market news"
"Show me news about Reliance"
"What's happening in the banking sector?"
"Get upcoming IPOs"
Bonds
"Show all Sovereign Gold Bond prices"
"Get price history for SGBJAN30IX"
Broker Mode (with credentials)
"Buy 10 shares of Reliance at market price"
"Show my portfolio holdings"
"What's my available margin?"
"Create a GTT order for TCS at Rs 3500"
"Show my open positions"
All 68 Tools
Stocks (NSE/BSE) — 9 tools
Derivatives (F&O) — 5 tools
Indices — 5 tools
Mutual Funds — 6 tools
ETFs — 3 tools
Commodities (MCX) — 3 tools
Currency — 3 tools
IPO — 2 tools
Bonds / SGBs — 3 tools
Market Overview — 3 tools
Technical Analysis — 2 tools
Stock Screener — 3 tools
News & Sentiment — 5 tools
Company Financials — 6 tools
Candlestick Patterns — 2 tools
MF Analysis — 5 tools
Shareholding & Profile — 3 tools
Broker Mode
Unlock 11 additional tools for live trading by adding your broker credentials. Both brokers are free for API access.
Angel One (Recommended — completely free)
{
"mcpServers": {
"indian-market": {
"command": "uvx",
"args": ["indian-market-mcp[angel]"],
"env": {
"ANGEL_API_KEY": "your-api-key",
"ANGEL_CLIENT_ID": "your-client-id",
"ANGEL_PASSWORD": "your-password",
"ANGEL_TOTP_SECRET": "your-totp-secret"
}
}
}
}
To get credentials:
- Open an Angel One account (free)
- Go to SmartAPI and generate an API key
- Set up TOTP in your Angel One app and note the secret
Zerodha Kite Connect
{
"mcpServers": {
"indian-market": {
"command": "uvx",
"args": ["indian-market-mcp[zerodha]"],
"env": {
"KITE_API_KEY": "your-api-key",
"KITE_ACCESS_TOKEN": "your-access-token"
}
}
}
}
To get credentials:
- Sign up at Kite Connect
- Create an app and get your API key
- Generate an access token through the login flow
Broker Tools (11 additional tools)
Remote HTTP Server
Host as a public URL so anyone can use it without installing anything — just like https://mcp.tapetide.com/mcp.
Use the hosted server
{
"mcpServers": {
"indian-market": {
"type": "url",
"url": "https://indian-market-mcp-wweh.onrender.com/mcp"
}
}
}
Self-host with Docker
docker build -t indian-market-mcp .
docker run -p 8000:8000 indian-market-mcp
# Endpoint: http://localhost:8000/mcp
Self-host without Docker
MCP_TRANSPORT=http MCP_PORT=8000 uvx indian-market-mcp
Deploy to cloud
Environment variables
Data Sources
All public market data is free with no API keys or sign-ups:
Rate limiting & caching
NSE aggressively rate-limits requests (~3 per minute). The server uses intelligent disk-based caching:
Cache is stored at ~/.cache/indian-market-mcp/ (configurable, max 500MB).
Architecture
indian-market-mcp/
├── src/indian_market_mcp/
│ ├── server.py # FastMCP entry point (stdio + HTTP)
│ ├── tools/ # 20 tool modules
│ │ ├── stocks.py # 9 tools — quotes, history, search, gainers/losers
│ │ ├── derivatives.py # 5 tools — option chain, PCR, max pain, futures, OI
│ │ ├── indices.py # 5 tools — indices, constituents, sectors
│ │ ├── mutual_funds.py # 6 tools — NAV, history, compare, categories
│ │ ├── etfs.py # 3 tools — ETF list, quotes, history
│ │ ├── commodities.py # 3 tools — gold, silver, crude, natural gas
│ │ ├── currency.py # 3 tools — USDINR, EURINR, GBPINR, JPYINR
│ │ ├── ipo.py # 2 tools — upcoming, past IPOs
│ │ ├── bonds.py # 3 tools — SGBs
│ │ ├── market.py # 3 tools — status, FII/DII, breadth
│ │ ├── technicals.py # 2 tools — indicators, support/resistance
│ │ ├── screener.py # 3 tools — custom, fundamental, preset screens
│ │ ├── news.py # 5 tools — market, stock, sector news
│ │ ├── financials.py # 6 tools — P&L, balance sheet, ratios, peers
│ │ ├── candlestick.py # 2 tools — pattern detection, bulk scan
│ │ ├── shareholding.py # 3 tools — holding pattern, profile
│ │ ├── mf_analysis.py # 5 tools — MF recommendations, hidden gems, SIP backtest
│ │ ├── trading.py # 5 tools — orders, GTT (broker mode)
│ │ ├── portfolio.py # 4 tools — holdings, positions, margins (broker mode)
│ │ └── market_depth.py # 2 tools — depth, LTP (broker mode)
│ └── sources/ # Data source layer
│ ├── nse.py # NSE India scraper with session management
│ ├── amfi.py # AMFI mutual fund data
│ ├── mcx.py # Commodities & currency via Yahoo Finance
│ ├── cache.py # Disk-based caching with TTL
│ └── broker/
│ ├── angel.py # Angel One SmartAPI integration
│ └── zerodha.py # Zerodha Kite Connect integration
├── Dockerfile # Production container
├── pyproject.toml # Dependencies and build config
└── LICENSE # MIT
Development
# Clone
git clone https://github.com/afthabvp/indian-market-mcp.git
cd indian-market-mcp
# Install all dependencies including broker extras
uv sync --all-extras
# Run in stdio mode (for local MCP clients)
uv run indian-market-mcp
# Run as HTTP server
MCP_TRANSPORT=http uv run indian-market-mcp
# Run with broker mode
ANGEL_API_KEY=xxx ANGEL_CLIENT_ID=xxx ANGEL_PASSWORD=xxx ANGEL_TOTP_SECRET=xxx uv run indian-market-mcp
Running tests
# Full validation of all 68 tools against live data
uv run python test_all_tools.py
# Unit tests
uv run pytest
Code formatting
uv run ruff check --fix .
uv run ruff format .
Roadmap
- Publish to PyPI (
pip install indian-market-mcp) - Hosted public server (
https://indian-market-mcp-wweh.onrender.com/mcp) - BSE-specific tools (more granular BSE data)
- Options Greeks calculator
- Backtesting tools
- Watchlist management (persistent)
- Alert system (price/volume triggers)
- Tax calculator (STCG/LTCG for holdings)
- Upstox / Groww broker integration
Contributing
Contributions welcome! Please open an issue first to discuss what you'd like to add.
- Fork the repo
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes
- Push and open a PR
Disclaimer
This tool is for informational and educational purposes only. It does not constitute financial advice. Always do your own research before making investment decisions. The authors are not responsible for any financial losses incurred through the use of this tool.
Market data is sourced from publicly available APIs and may have delays. Broker mode executes real trades — use with caution.
License
MIT — use it however you want.