nse-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., "@nse-mcp What's the live quote 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.
NSE MCP
An MCP (Model Context Protocol) server that turns National Stock Exchange of India (NSE) data into AI tools. If you use an AI assistant on your computer (Claude Desktop, Codex, Gemini CLI, Cursor, or similar), this lets that assistant answer questions about Indian stocks in plain English — "What's the live quote for RELIANCE?", "Is the market open right now?" — with real data instead of guesses.
MCP is the standard plug that lets AI apps use extra tools: you install the server once, connect it in the app's settings, and then just ask questions. Powered by jugaad-data.
Quick install
Install with one command. No Python or venv needed — the installer bundles its own runtime and prints the config entry to paste.
Windows: open PowerShell (search for "PowerShell" in the Start menu), then run:
powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/jugaad-py/nse-mcp/main/install.ps1 | iex"Linux / macOS: open the Terminal app, then run:
curl -LsSf https://raw.githubusercontent.com/jugaad-py/nse-mcp/main/install.sh | shYou should see a short log ending in nse-mcp installed. If Windows asks for
permission, click Yes. If something fails, copy the error text and show it
to your AI assistant.
Already have Python or uv? These work too (optional):
pip install nse-mcp
# or
uv tool install nse-mcp # on-demand alternative: uvx nse-mcpRelated MCP server: MyFinancial Market Data MCP
Connect your AI app
Your AI app (the "MCP client") reads a small settings file at startup. Add the block below to that file, save it, then fully quit and reopen the app:
{
"mcpServers": {
"nse-mcp": {
"command": "nse-mcp"
}
}
}This is the same block the installer prints in the terminal — paste whichever is easier.
Finding the settings file: the folders start with a dot (macOS/Linux) or are hidden by default (Windows). Fastest way — open the folder directly:
Windows: press
Win + R, paste%APPDATA%\Claude, press EntermacOS: in Finder choose Go → Go to Folder… (Cmd+Shift+G), paste
~/Library/Application Support/Claude, press EnterLinux: the file is at
~/.codex/config.toml— open the~/.codexfolder (in your file manager pressCtrl+Hto show hidden folders)
If the file already contains text: don't delete it. If it already has an
mcpServers section, add a comma after the last entry, then paste the block
after it.
Where the settings file lives, by app:
App | Settings file |
Claude Desktop |
|
ChatGPT desktop / Codex CLI |
|
Gemini CLI |
|
Claude Code, Cursor, VS Code |
|
ChatGPT on the web connects only to remote servers, so use a desktop app.
What you can ask
"Get a live quote for RELIANCE" — price, change, volume, market cap
"Is the NSE market open right now?"
"Which stocks gained the most today?"
"Show me INFY's closing price for the last 6 months"
"What's NIFTY 50's P/E compared to a year ago?"
Features
Live prices and trades — current price, the day's high and low, volume, buy/sell depth, and futures/options contracts for a symbol (
stock_quote,stock_quote_fno,trade_info,chart_data)Market overview — open/closed status, total turnover, biggest gainers and losers, pre-market prices, trading holidays, F&O securities, and large bulk trades (
market_status,market_turnover,pre_open_market,top_stocks,holiday_list,live_fno,block_deal_session)Indices — live index quotes and which stocks belong to an index (
all_indices,live_index,index_list)Option chains — the contracts available for an index, stock, or currency pair, with their set prices and dates (
index_option_chain,equities_option_chain,currency_option_chain,option_chain_contract_info)Corporate actions — announcements, symbol metadata, registrar details (
corporate_announcements,symbol_meta,reg_details)History — past daily prices for stocks and indices, plus index P/E, P/B, and dividend yield (
stock_history,index_history,index_pe_history)
Plain-language glossary for the jargon above:
Term | Meaning |
OHLC | Open, high, low, close — the day's price range |
F&O | Futures and options — contracts to buy or sell at a set price and date |
Option chain | All the contracts for a symbol at their set prices (strikes) and dates (expiries) |
P/E | Price-to-earnings — how expensive a stock is relative to its profits (P/B is the same idea, vs. its book value) |
Dividend yield | The annual dividend paid, as a percentage of the share price |
Block deal | A single very large trade, usually between institutions |
For developers
git clone https://github.com/jugaad-py/nse-mcp
cd nse-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txtRun the tests (live NSE data; needs a stable network):
.venv/bin/python -m pytest tests/ -vRun the server directly:
.venv/bin/python server.pyTroubleshooting
Tools don't appear after the config change? Fully quit and reopen the app.
Check the settings file is valid (quotes and commas in JSON, one
=per line in TOML) and thatnse-mcpstarts without errors when run in a terminal.NSE rate-limits IPs. A transient failure just means retry the question.
Project structure
nse-mcp/
├── server.py # MCP server: NSE tools, exposes the nse-mcp CLI entry
├── pyproject.toml # Packaging source of truth
├── install.sh # Linux/macOS one-line installer
├── install.ps1 # Windows one-line installer
├── .github/workflows/ # CI: tests, PyPI publish, version check
├── tests/ # Live-data pytest suite
└── requirements.txt # Developer dependenciesDisclaimer
For research and personal use. Data comes from public NSE endpoints and may be delayed or unavailable. Not investment advice.
Available Tools
24 toolsall_indicesC
All NSE indices.
Inputs: no named parameters.
block_deal_sessionD
NSE block deal session data.
Inputs: no named parameters.
chart_dataC
Intraday chart data for a symbol.
Inputs: symbol (required).
corporate_announcementsC
Corporate announcements for a segment, date range, or symbol.
Inputs: symbol, segment, to_date, from_date.
currency_option_chainB
Option chain for a currency pair.
Inputs: symbol.
equities_option_chainC
Option chain for an equity.
Inputs: symbol (required), expiry.
holiday_listB
NSE trading holidays.
Inputs: no named parameters.
index_historyC
Historical OHLC data for an index as records. Dates in YYYY-MM-DD.
Inputs: name (required), to_date (required), from_date (required).
index_listC
Indices that a stock belongs to.
Inputs: symbol (required).
index_option_chainD
Option chain for an index.
Inputs: expiry, symbol.
index_pe_historyB
Historical P/E, P/B, and dividend yield for an index. Dates in YYYY-MM-DD.
Inputs: name (required), to_date (required), from_date (required).
live_fnoD
Securities currently in the F&O segment.
Inputs: no named parameters.
live_indexC
Live quote for an index.
Inputs: symbol.
market_statusB
Current NSE market status (open or closed).
Inputs: no named parameters.
market_turnoverB
Today's NSE market turnover.
Inputs: no named parameters.
option_chain_contract_infoC
Expiries and strikes available for an option chain symbol.
Inputs: symbol (required).
pre_open_marketC
Pre-open market data for the given index key.
Inputs: key.
reg_detailsC
Registrar details for a symbol.
Inputs: symbol (required).
stock_historyC
Historical OHLCV data for a stock as records. Dates in YYYY-MM-DD.
Inputs: symbol (required), to_date (required), from_date (required), series.
stock_quoteA
Live quote for an NSE equity symbol (e.g. 'RELIANCE').
Inputs: symbol (required).
stock_quote_fnoC
Live F&O quotes for all contracts of a symbol.
Inputs: symbol (required).
symbol_metaC
Metadata for an NSE symbol.
Inputs: symbol (required).
top_stocksB
Top gainers, losers, most active, and 52-week high/low stocks.
Inputs: no named parameters.
trade_infoB
Order book depth and trade information for a symbol.
Inputs: symbol (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool targets a distinct data type (quotes, history, option chains, indices, etc.). A few pairs like stock_quote vs stock_quote_fno or index_history vs index_pe_history might initially seem similar, but descriptions clarify the difference clearly.
Most tools follow a snake_case 'resource_qualifier' pattern (e.g., stock_history, index_option_chain). Some variability exists: live_index vs index_list, pre_open_market, and option_chain_contract_info reverse the word order, but overall naming is predictable.
24 tools is on the heavier side but covers a wide range of NSE data: equities, indices, F&O, options, currency, corporate actions, and market stats. Each tool serves a distinct purpose, so the count seems justified for the server's broad scope.
The toolset covers most core workflows: live quotes, historical data, option chains, market status, and corporate announcements. Minor gaps include currency spot quotes and more detailed corporate action data, but these aren't essential for typical NSE data needs.
Maintenance
Related MCP Connectors
NSE/BSE stock data via Tickertape as JSON: index lists, screener, 10-year fundamentals.
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Licensed Borsa Istanbul (BIST) data for AI assistants: live or 15-minute delayed prices, OHLCV bars from 1 minute to monthly, financial statements, ratios, KAP disclosures, indices and sectors, indicator backtests and portfolio tracking for 600+ Turkish stocks. OAuth sign-in with an istfin subscription. Never places orders.
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.
Related MCP Servers
- AlicenseAqualityBmaintenanceIndian stock market (NSE & BSE) MCP server with 55 tools: live quotes, financials, technicals, a 326-ratio screener, FII/DII flows, option chains with IV, parsed annual reports and concall transcripts, IPOs and portfolio tracking for ~8,200 stocks.55143 npm151MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to query live NSE & BSE stock market data, with 55 tools covering quotes, financials, screeners, FII/DII flows, option chains, and company filings.55MIT
- AlicenseAqualityCmaintenanceGives AI assistants live Indian market data without any API keys, spanning NSE quotes and indices, option chains with Greeks, max pain and OI analytics, company financials, shareholding and corporate actions, plus mutual fund NAVs and trailing returns. It also ships research, market-brief and options-positioning prompts so users can compare stocks, trace sector leadership or size up an expiry through natural language.1013MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search, screen, and analyze 8,200+ NSE and BSE listed securities through 55 tools covering live quotes, financials, technical indicators, FII/DII flows, option chains, filings, IPOs, bulk deals, and portfolio P&L.-