India Market MCP
Click on "Deploy 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., "@India Market MCPHow did the market do today, and which sectors led?"
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.
India Market MCP
An MCP server that gives Claude and other AI assistants live Indian market data: NSE quotes and indices, option chains with positioning analytics, company financials, shareholding, corporate actions, exchange filings and mutual fund performance. No API keys needed.
Ask things like:
"How did the market do today, and which sectors led?"
"Compare HDFC Bank and ICICI Bank on valuation, growth and promoter holding."
"What is NIFTY's option chain saying for this week's expiry? Where are the OI walls and max pain?"
"Show Parag Parikh Flexi Cap's 3, 5 and 10-year returns and its worst drawdown."
"What did Reliance announce to the exchange this month?"
Tools
Tool | What it returns |
| Market status, major indices and India VIX with 1w/1m/1y moves, NIFTY 50 P/E and P/B, sectors ranked by move, NIFTY 500 breadth, NIFTY 50 top movers, FII/DII net flows, USD/INR, upcoming holidays |
| NSE symbols (stocks, ETFs, SME) and indices matching a company or index name |
| Price, day range, VWAP, volume, delivery %, 52-week range, market cap, P/E vs sector P/E, sector, index membership. Index names return the index level, returns, P/E, P/B and breadth |
| OHLCV bars plus total return, CAGR, annualised volatility, max drawdown, 20/50/200-day averages, RSI, dividends and splits. Stocks, NSE indices and SENSEX |
| An index's level, returns, valuation and breadth, with every constituent's move, distance from its 52-week high and approximate weight |
| Strikes around the money with LTP, OI, change in OI, volume, IV, bid/ask and delta, plus put-call ratio, max pain, OI support and resistance, biggest OI build-ups, ATM IV, straddle-implied move and ATM Greeks |
| Black-Scholes price and Greeks, or implied volatility from a market price (works offline) |
| Annual or quarterly revenue, EBITDA, profit, EPS, margins, YoY growth, balance sheet, cash flow, ROE, debt/equity, current ratio, interest cover (₹ crore) |
| Promoter and public holding by quarter, with the promoter stake's QoQ and YoY change |
| Dividends (with amount per share), bonuses, splits, rights, buybacks, upcoming ex-dates, trailing 12-month dividend and yield |
| Exchange filings with a summary and PDF link, filterable by keyword |
| Scheme codes by name, filtered to direct/regular and growth/IDCW |
| Latest NAV, trailing returns (1 week to 10 years and since inception), calendar-year returns, 3-year volatility, max drawdowns |
The server also provides three prompts: research_stock, market_brief and options_positioning.
Related MCP server: Tapetide MCP Server
Set up
You need uv. It fetches the right Python and runs the server without a separate install step.
Claude Code
claude mcp add -s user india-market -- uvx --from git+https://github.com/kcodweb/india-market-mcp india-market-mcpClaude Desktop, Cursor, Windsurf and other clients. Add this to the client's MCP config (for Claude Desktop: Settings → Developer → Edit Config):
{
"mcpServers": {
"india-market": {
"command": "uvx",
"args": ["--from", "git+https://github.com/kcodweb/india-market-mcp", "india-market-mcp"]
}
}
}Restart the client and ask about the market.
From a clone
git clone https://github.com/kcodweb/india-market-mcp
cd india-market-mcp
uv sync
uv run india-market-mcp # stdio, for local clients
uv run india-market-mcp --transport streamable-http --port 8000 # HTTP at http://127.0.0.1:8000/mcpData sources
Data | Source | Freshness |
Quotes, indices, option chains, FII/DII, filings, shareholding, corporate actions | NSE website APIs | A few minutes delayed; cached 20 s |
Price history | Yahoo Finance | End of day, adjusted for splits and bonuses |
Financial statements | Yahoo Finance (from company filings) | Updated after results; the tool warns when the latest period looks stale |
Mutual fund NAVs | AMFI via mfapi.in | Daily |
How it works
NSE access. NSE's JSON endpoints sit behind bot protection. The server loads a normal page first to collect session cookies, sends browser-like headers, refreshes the session once if NSE answers 401/403, spaces its requests at least 350 ms apart and caches responses. It uses the endpoints NSE's current website calls, several of which replaced the older
/api/quote-equityfamily that NSE now blocks.Compact output. Results are small JSON documents: nulls dropped, money in ₹ crore, long lists capped with a note on how to see more. That keeps an assistant's context free for reasoning.
Errors the model can act on. A mistyped symbol returns suggestions (
RELIANC→ "Did you mean: RELIANCE (Reliance Industries Limited)…"), an unknown expiry lists the live ones, and a blocked request says why.Analytics in plain Python. Black-Scholes, Greeks, the implied-volatility solver, max pain, CAGR, drawdown, RSI and the rest have no NumPy or SciPy dependency, and all are unit-tested.
Limitations
These are unofficial website endpoints, not a licensed data feed. NSE changes them from time to time, and it blocks many cloud and non-Indian networks. Run the server on your own machine; a server in a US data centre will likely be refused.
Shareholding covers promoter and public totals only; NSE's summary does not break out FII, DII or mutual fund holdings.
Yahoo's statements for banks and financial companies are less complete than for other companies.
This is market data for research and education, not investment advice. Check the terms of use of NSE, Yahoo and AMFI before building anything commercial on it. Not affiliated with NSE, BSE, AMFI or Yahoo.
Development
uv sync # installs the dev tools too
uv run pytest # 118 offline tests, about a second
uv run pytest -m live # checks the real endpoints (run from an Indian connection)
uv run ruff check src tests && uv run ruff format --check src testsThe offline suite replays real responses recorded in tests/fixtures/, through a real MCP client, so it is
deterministic and never calls NSE from CI. To refresh the recordings, run python tests/record_fixtures.py
from a network NSE allows, update RECORDED_AT in tests/scenarios.py, and fix any assertions that depend
on the data.
src/india_market_mcp/
server.py tool and prompt definitions, CLI
features/ one module per area: market, history, derivatives, company, funds
sources/ HTTP clients for NSE, Yahoo Finance and mfapi.in
analytics/ option pricing and return statistics (pure functions)License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Stock market data for AI agents: real-time quotes, financials, options, SEC filings and news.
Indian NSE/BSE research data and mechanically-computed ratios; read-only market tools.
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time and historical Indian stock market data from NSE and BSE exchanges with 66 tools covering quotes, options chains, corporate actions, IPOs, and market analytics for LLM-powered financial analysis.44 npm12MIT
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to real-time Indian stock market data with 34 tools for search, screening, analysis, portfolio tracking, and market insights across all NSE and BSE stocks.118 npm115MIT
- FlicenseAqualityDmaintenanceEnables real-time and historical Indian stock market data retrieval, including prices, news, recommendations, and top gainers/losers.11-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to perform deep Indian stock research with fundamentals, forensic scores, DCF valuation, screening, and news for 6000+ NSE/BSE stocks.8 npm1MIT