india-markets-mcp
An MCP server that gives AI agents live Indian stock market data (NSE/BSE) — quotes, technical signals, valuation, and peer comparisons — with no API keys.
Get quotes (
get_quote): latest close, daily change, and 52-week range for a symbol.Get technical signals (
get_signals): RSI(14), volatility, max drawdown, 12-1 momentum, and an auditable rule-based trend regime.Compare performance (
compare_symbols): rank 2–10 symbols by return over 1mo/6mo/1y/2y/5y, with volatility and drawdown.Get fundamentals (
get_fundamentals): market cap in ₹ crore, P/E, P/B, ROE, debt/equity, dividend yield, sector.Compare valuations (
compare_fundamentals): side-by-side valuation of 2–10 symbols, cheapest P/E first.Find sector peers (
sector_peers): compare a large-cap against hand-picked same-sector peers via median P/E, P/B, and premium/discount.Indian-market native: handles NSE/BSE tickers plus NIFTY, BANKNIFTY, and SENSEX indices.
Agent-friendly: bundled skill keeps responses factual (no buy/sell advice), missing data is
null, and errors are explicit.
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-markets-mcp what's the RSI and trend regime for 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.
🇮🇳 india-markets-mcp
Give your AI agent a live view of the Indian stock market. Quotes, transparent technical signals, valuation and sector comparison for NSE/BSE, over MCP. No API keys.
See it work
You: Can you give me the price of TCS, and is it a good time to buy?
Agent (calls the india-markets tools): TCS closed at ₹2,407.50 on 13 Nov 2026, down 1.43% on the day. Whether it's a good time to buy is your decision. I can't give buy, sell or hold advice, but here is where the stock stands.
Metric
Value
52-week range
₹1,961.36 – ₹3,187.34
Distance from 52-week high
−24.5%
RSI(14)
50.7 (neutral)
30-day volatility (annualised)
32.8%
50-day / 200-day average
₹2,287.43 / ₹2,366.05
Market cap
₹8,71,055 crore
(Condensed from a real session using the bundled skill, so the agent reports facts instead of advice. Numbers move with the market.)
▶ Watch the 20-second version with sound
Related MCP server: MCP YFinance Stock Server
Why this one
Built for India.
RELIANCEjust works.NIFTY,BANKNIFTYandSENSEXare first-class. Market cap comes back in ₹ crore, not dollars.Signals you can audit. The trend regime is a plain rule on the 50/200-day averages and the 200-day slope, and the tool returns the rule text, so the agent can explain why, not just emit a label.
Honest about gaps. Missing data is
null, never guessed. Unknown tickers and upstream outages raise clear errors.Polite to the data source. 5-minute cache, 3 retries with backoff, bounded fan-out.
Tested offline. Indicator and tool logic is pure pandas with 34 tests, run in CI on Linux, macOS and Windows.
Comes with an agent skill that teaches the agent when to use each tool and keeps answers to facts, not buy/sell calls.
Tools
Tool | What it does |
| Latest close, daily change, 52-week range, volume |
| RSI(14), 30-day volatility, max drawdown, 12-1 momentum, rule-based trend regime |
| Rank 2-10 symbols by return, with volatility and drawdown |
| Market cap (₹ crore), P/E, P/B, ROE, debt/equity, dividend yield, sector |
| Side-by-side valuation of 2-10 symbols, cheapest P/E first |
| A large-cap vs hand-picked same-sector peers: median P/E and P/B and its premium or discount |
Symbols: RELIANCE → RELIANCE.NS · TCS.BO and ^NSEI pass through · NIFTY, BANKNIFTY, SENSEX map to the indices.
Try asking
"Give me a quick read on HDFCBANK: price, trend and valuation."
"Rank INFY, TCS, WIPRO and HCLTECH by 1-year return and by P/E."
"Is Reliance expensive compared with other oil and gas names?"
"Which of the big private banks has the lowest drawdown this year?"
Install
Claude Desktop / Claude Code / Cursor (any MCP client). The quickest way is uvx, which needs no install step:
{
"mcpServers": {
"india-markets": { "command": "uvx", "args": ["india-markets-mcp"] }
}
}With Claude Code you can register it in one line:
claude mcp add india-markets -- uvx india-markets-mcpPrefer pip?
pip install india-markets-mcpthen use "command": "india-markets-mcp" in the config above. If that command isn't on your PATH, use the full path to the executable (for a venv: .venv/Scripts/india-markets-mcp.exe on Windows, .venv/bin/india-markets-mcp elsewhere).
Optional: the agent skill
skills/india-markets/SKILL.md teaches an agent which tool to pick, how to read units and nulls, and to stay on facts (no buy/sell advice, ends with a disclaimer). Copy the folder into .claude/skills/ (Claude Code) or your agent's skills directory.
How it works
your agent ──MCP──▶ server.py ──▶ core.py ──▶ indicators.py (pure pandas, tested offline)
│
└──▶ data.py ──▶ yfinance (cache + retry) ← only network codeOnly data.py touches the network, so everything else is deterministic and easy to test.
Good to know
Not investment advice. Signals describe the past; they do not predict.
Data comes from Yahoo Finance via the unofficial
yfinancelibrary. It can be delayed, rate-limited or wrong, and Yahoo's terms limit commercial use. Fine for research and learning, not for trading systems.Fundamentals can be
null(loss-making companies, new listings, gaps in the source).sector_peersuses a small hand-picked list insectors.py, not an official classification. Edit it if you disagree with a grouping.
Develop
git clone https://github.com/Aarya-Mhatre69/india-markets-mcp
cd india-markets-mcp
pip install -e ".[dev]"
pytestContributions welcome: new peer groups, a better data source behind the same interface, more indicators. Open an issue first for anything big.
Roadmap
Quotes, signals, comparison
Fundamentals and sector peers
Caching, retries, CI, agent skill
Portfolio view: pass holdings, get concentration, sector mix and drawdown
Pluggable data sources behind one interface
Nifty 50 screener (oversold + cheap vs peers)
License
MIT
Available Tools
6 toolscompare_fundamentalsCompare FundamentalsA
Side-by-side valuation of 2-10 symbols, cheapest trailing P/E first.
Inputs: symbols (required). Returns: result
compare_symbolsCompare SymbolsA
Rank 2-10 symbols by return over a period (1mo, 6mo, 1y, 2y, 5y), with volatility and drawdown.
Inputs: symbols (required), period. Returns: result
get_fundamentalsGet FundamentalsC
Valuation snapshot: market cap (INR crore), P/E, P/B, ROE, debt/equity, dividend yield, sector.
Inputs: symbol (required). Returns: object
get_quoteGet QuoteB
Latest close, daily change and 52-week range for an NSE symbol (e.g. RELIANCE, TCS, NIFTY).
Inputs: symbol (required). Returns: object
get_signalsGet SignalsC
RSI, volatility, drawdown, 12-1 momentum and a rule-based trend regime for a symbol.
Inputs: symbol (required). Returns: object
sector_peersSector PeersA
Compare a large-cap stock with illustrative same-sector peers: median P/E and P/B and its premium.
Inputs: symbol (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct angle: fundamentals snapshot, multi-symbol valuation comparison, sector-relative peer check, return ranking, single quote, and technical signals. The only soft overlap is between compare_fundamentals and sector_peers, both of which produce peer valuation comparisons, but the descriptions (arbitrary symbol set vs. large-cap vs. sector median premium) make the boundary workable.
Five of six tools follow a clean verb_noun pattern (get_fundamentals, compare_fundamentals, compare_symbols, get_quote, get_signals). sector_peers breaks the convention as a bare noun phrase, a minor but noticeable deviation.
Six tools is well-scoped for a read-only market data server, and each one covers a genuinely different analysis need. No redundant or filler tools are present.
Valuation, quotes, peer comparison, and technical signals are covered, but there is no historical OHLC/time-series tool, no symbol search or listing of valid NSE tickers, and no index/sector breadth data. Agents can do point-in-time analysis but will hit dead ends for charting or discovery workflows.
Maintenance
Related MCP Connectors
Hosted MCP server for Indian NSE/BSE stock research: 59 tools for quotes, financials and ratios, peers, shareholding and pledge, filings with extracted facts, screens, F&O and FII/DII context. Source and freshness on every answer; no buy/sell calls.
Yahoo Finance stock quotes and multi-ticker comparison as agent tools.
Yahoo Finance for AI agents: quotes, price history, options with Greeks, financials, news, movers.
Free public stock research, market context, and comparisons for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides access to real-time and historical Indian stock data via Yahoo Finance API, enabling local LLMs to retrieve stock information through MCP-compatible agents like Claude Desktop and Cursor.2-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to retrieve real-time stock data, manage watchlists, and perform comprehensive technical analysis using Yahoo Finance API. Provides 18+ tools for stock price tracking, trend analysis, volatility assessment, and financial indicators through MCP integration.MIT
- FlicenseAqualityDmaintenanceEnables real-time and historical Indian stock market data retrieval, including prices, news, recommendations, and top gainers/losers.11-
- AlicenseAqualityDmaintenanceEnables LLM clients to perform fundamental analysis of NSE/BSE-listed Indian stocks, covering financial statements, ratios, valuation, screening, and investment memos using Yahoo Finance data.281MIT