Indian Market MCP
Enables live trading and portfolio management through Zerodha, including order placement, viewing holdings, margin, GTT orders, and open positions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Indian Market MCPWhat's the price of Reliance?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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?
Feature | indian-market-mcp | Tapetide | bshada/nse-bse | NseKit | Zerodha Official |
Total tools | 68 | 26 | 60 | 100+ | ~20 |
API key required | No | No | No | No | Yes |
Stocks + History | Yes | Yes | Yes | Yes | Yes |
F&O / Option Chain | Yes | No | Yes | Yes | No |
PCR + Max Pain | Yes | No | No | No | No |
Mutual Funds | Yes | No | No | No | Partial |
Commodities (MCX) | Yes | No | No | No | No |
Currency (INR pairs) | Yes | No | No | No | No |
Sovereign Gold Bonds | Yes | No | No | No | No |
Stock Screener | Yes | Yes | No | No | No |
Company Financials | Yes | Yes | No | No | No |
Candlestick Patterns | Yes | Yes | No | No | No |
News & Sentiment | Yes | Yes | No | No | No |
Shareholding Pattern | Yes | Yes | No | No | No |
Technical Analysis | Yes | Yes | No | No | No |
Order Placement | Yes | No | No | No | Yes |
Portfolio / Holdings | Yes | No | No | No | Yes |
Market Depth | Yes | No | No | No | Yes |
Multi-broker support | Yes | No | No | No | No |
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-mcpOption 3: Run without installing
uvx indian-market-mcpOption 4: Self-host HTTP
MCP_TRANSPORT=http uvx indian-market-mcp
# Server at http://localhost:8000/mcpOption 5: Docker
docker build -t indian-market-mcp .
docker run -p 8000:8000 indian-market-mcpRelated MCP server: stock-scanner-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
Tool | Description |
| Live price, volume, day high/low, 52-week range, market cap |
| Fuzzy search stocks by name or symbol |
| Historical OHLC candle data with date range |
| Today's top gaining stocks on NSE |
| Today's top losing stocks on NSE |
| All stocks at their 52-week high |
| All stocks at their 52-week low |
| Most traded stocks by volume or value |
| Dividends, stock splits, bonus issues, rights |
Derivatives (F&O) — 5 tools
Tool | Description |
| Full option chain — strike prices, premiums, OI, change in OI, IV. Works for indices (NIFTY, BANKNIFTY) and stocks |
| Put-Call Ratio with bullish/bearish interpretation |
| Max pain strike price calculation — where option writers face minimum loss |
| Futures contracts with lot size, expiry dates, OI, price |
| Open Interest data across all expiries and strike prices |
Indices — 5 tools
Tool | Description |
| Live index value with advances/declines (NIFTY 50, BANK NIFTY, NIFTY IT, etc.) |
| All stocks in an index with live prices |
| Every NSE index with current value and change |
| Historical data for any index with date range |
| All sectoral indices ranked by performance |
Mutual Funds — 6 tools
Tool | Description |
| Search 47,000+ schemes by name, AMC, or category |
| Latest NAV for any mutual fund scheme |
| Full historical NAV data or filtered by date range |
| All fund categories — Equity, Debt, Hybrid, etc. |
| Side-by-side comparison — NAV, returns (1M, 3M, 6M, 1Y) |
| Top performing funds in any category |
ETFs — 3 tools
Tool | Description |
| Every ETF listed on NSE — Gold, Debt, Equity, International |
| Detailed quote for a specific ETF |
| Historical price data for any ETF |
Commodities (MCX) — 3 tools
Tool | Description |
| Live price for Gold, Silver, Crude Oil, Natural Gas, Copper, Aluminium, Zinc, Lead, Nickel, Cotton |
| All commodity prices in one call |
| Historical OHLC data. Periods: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, max |
Currency — 3 tools
Tool | Description |
| Live exchange rate for USDINR, EURINR, GBPINR, JPYINR |
| All INR currency pair rates |
| Historical exchange rate data with configurable period |
IPO — 2 tools
Tool | Description |
| Upcoming and ongoing IPOs with dates, price band, issue size |
| Recently listed IPOs with listing price and returns |
Bonds / SGBs — 3 tools
Tool | Description |
| All Sovereign Gold Bonds listed on NSE with maturity dates |
| Detailed quote for a specific SGB tranche |
| Historical price data for any SGB |
Market Overview — 3 tools
Tool | Description |
| Market open/closed/pre-market status for all segments |
| Foreign & Domestic Institutional Investor buy/sell data |
| Market breadth — advancing, declining, unchanged stocks |
Technical Analysis — 2 tools
Tool | Description |
| All-in-one: SMA (20/50/200), EMA (12/26/50), RSI 14, MACD, Bollinger Bands, VWAP, trend signal |
| Pivot point based support (S1/S2/S3) and resistance (R1/R2/R3) levels |
Stock Screener — 3 tools
Tool | Description |
| Custom screener with filters: price range, % change, volume, sector, near 52w high/low. Sortable results |
| Screen by PE, PB, ROE, market cap, dividend yield. Uses Yahoo Finance fundamentals |
| 8 pre-built strategies: |
News & Sentiment — 5 tools
Tool | Description |
| Latest Indian stock market news from Google News |
| News for a specific stock |
| News for a sector — IT, Banking, Pharma, Auto, FMCG |
| Official NSE corporate announcements and filings |
| Upcoming and past board meeting dates for any stock |
Company Financials — 6 tools
Tool | Description |
| P&L statement — revenue, expenses, net income, EPS. Annual or quarterly |
| Assets, liabilities, equity, debt. Annual or quarterly |
| Operating, investing, financing cash flows. Annual or quarterly |
| 30+ financial ratios: PE, PB, ROE, ROA, debt/equity, margins, growth, EPS, dividend yield, beta, etc. |
| Compare any stock with its industry peers on key metrics |
| Quarterly/annual results as filed with NSE |
Candlestick Patterns — 2 tools
Tool | Description |
| Detect 12+ patterns: Doji, Hammer, Inverted Hammer, Hanging Man, Shooting Star, Bullish Engulfing, Bearish Engulfing, Morning Star, Evening Star, Marubozu, Three White Soldiers, Three Black Crows. Includes bullish/bearish bias summary |
| Scan up to 20 stocks at once for specific patterns. E.g., find all stocks showing Bullish Engulfing |
MF Analysis — 5 tools
Tool | Description |
| Deep analysis — returns (1M to 10Y CAGR), risk metrics (Sharpe, Sortino, max drawdown, volatility), rolling returns, consistency score |
| Smart ranking by investment horizon + risk appetite. Weighted scoring across returns, consistency, and risk-adjusted performance |
| Discover overlooked funds with exceptional risk-adjusted returns. Explains WHY each fund is a gem |
| Backtest SIP — total invested, current value, XIRR, units accumulated, month-by-month log |
| Head-to-head comparison with risk metrics, rolling returns, and summary (best returns, most consistent, lowest risk) |
Shareholding & Profile — 3 tools
Tool | Description |
| Promoter, FII, DII, public holding percentages from NSE |
| Full company overview: sector, industry, employees, description, fundamentals |
| Recent bulk and block deals on NSE |
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)
Tool | Description |
| Place buy/sell orders — MARKET, LIMIT, SL, SL-M. Supports DELIVERY, INTRADAY, MARGIN |
| Cancel any pending order by order ID |
| All orders placed today — pending, executed, cancelled |
| Good Till Triggered — auto-executes when price hits your target |
| View all active GTT orders |
| Complete portfolio — stocks owned, buy price, current price, P&L |
| Open intraday and overnight positions with live P&L |
| Available cash, used margin, and free margin for trading |
| Account details — name, client ID, registered exchanges |
| Level 2/3 order book — top 5/20 bid-ask with quantities |
| Fastest last traded price via broker API |
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/mcpSelf-host without Docker
MCP_TRANSPORT=http MCP_PORT=8000 uvx indian-market-mcpDeploy to cloud
Platform | How |
Railway | Connect GitHub repo, add env |
Fly.io |
|
Google Cloud Run |
|
AWS ECS / Fargate | Push Docker image, create service |
Render | Connect repo, select Docker, deploy |
Environment variables
Variable | Default | Description |
|
| Set to |
|
| Host to bind |
|
| Port to bind |
| — | Angel One API key (enables broker mode) |
| — | Angel One client ID |
| — | Angel One password |
| — | Angel One TOTP secret |
| — | Zerodha API key (enables broker mode) |
| — | Zerodha access token |
Data Sources
All public market data is free with no API keys or sign-ups:
Source | Data | Update Frequency |
Stocks, F&O, option chains, indices, ETFs, IPOs, SGBs, FII/DII, shareholding, corporate actions, announcements | Real-time (with 3-min cache) | |
Mutual fund NAVs for 47,000+ schemes, historical NAV | Daily | |
Commodities, currencies, historical OHLC, fundamentals, financials, technicals | Real-time | |
Market news, stock news, sector news | Real-time |
Rate limiting & caching
NSE aggressively rate-limits requests (~3 per minute). The server uses intelligent disk-based caching:
Data Type | Cache TTL |
Live quotes | 60 seconds |
Option chains, gainers/losers | 120 seconds |
Indices, ETFs, FII/DII | 300 seconds |
Historical data, MF NAVs | 300–3600 seconds |
IPOs, SGBs, shareholding | 600 seconds |
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 # MITDevelopment
# 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-mcpRunning tests
# Full validation of all 68 tools against live data
uv run python test_all_tools.py
# Unit tests
uv run pytestCode 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.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/afthabvp/indian-market-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server