Skip to main content
Glama
nse-research-mcp

nse-research-mcp

by sanjeev0291

nse-research-mcp

Indian stock market research for Claude (or any MCP client), self-hosted. Quotes, fundamentals, financial statements, a screener, shareholding, corporate actions, announcements, FII/DII flows, option chains and index data, pulled straight from NSE India and Yahoo Finance by a small Python server running on your own machine. No API keys, no sign-up, no third-party service in between.

Pairs with Zerodha's official Kite MCP, so Claude can look at your real holdings and research them in the same conversation. A /portfolio-review skill for exactly that is included.

Why self-host

  • Your questions and your portfolio never leave your machine, except as plain requests to nseindia.com and finance.yahoo.com (the same requests a browser makes).

  • No per-day call quota. Responses are cached (60 s for live data, 1 h for filings) so NSE stays happy.

  • 23 tools, MIT licensed, ~800 lines of Python you can read in one sitting.

Related MCP server: Zerodha MCP Server

Requirements

  • uv (installs the right Python for you): curl -LsSf https://astral.sh/uv/install.sh | sh

  • Claude Code, Claude Desktop, or any MCP client. macOS and Linux tested; Windows should work.

The first start on a machine downloads about 100 MB of dependencies (numpy, pandas and friends), which can take longer than Claude Code's 30-second server timeout. Warm it up once from a terminal before the first session:

uvx --from git+https://github.com/sanjeev0291/nse-research-mcp nse-research-mcp --check

That prints the tool count and confirms both data sources respond. If you installed the Claude Code plugin, warm up its own environment instead (the plugin runs from its install folder):

uv run --directory "$(ls -d ~/.claude/plugins/cache/nse-research-mcp/nse-research/*/ | tail -1)" nse-research-mcp --check

After that the server starts in a second or two. If you skip this and the first connection times out, run /mcp and reconnect; the download continues where it left off.

Install

Easiest: let Claude do it

Open Claude Code (terminal, or the Code tab in Claude Desktop) and paste:

Set up https://github.com/sanjeev0291/nse-research-mcp on this machine. Read its README, install uv if it is missing, install the Claude Code plugin from that repo, run the --check warm-up command, add Zerodha's Kite MCP server, and apply the read-only permission rule for the Kite order tools. Then tell me how to start the Stock Desk dashboard.

Claude will run the steps below for you. You need a Zerodha account for the portfolio features; everything else works without one.

Claude Code, as a plugin (server + /portfolio-review skill)

claude plugin marketplace add sanjeev0291/nse-research-mcp
claude plugin install nse-research@nse-research-mcp

Restart Claude Code and run /mcp: nse-research should show as connected.

Claude Code, server only

claude mcp add --scope user nse-research -- uvx --from git+https://github.com/sanjeev0291/nse-research-mcp nse-research-mcp

Claude Desktop

Settings → Developer → Edit Config, then add (merge into an existing mcpServers block if you have one):

{
  "mcpServers": {
    "nse-research": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/sanjeev0291/nse-research-mcp", "nse-research-mcp"]
    }
  }
}

If Desktop cannot find uvx, replace it with the full path from which uvx (usually ~/.local/bin/uvx). Restart the app and look for the tools icon.

From a local clone (hackable)

git clone https://github.com/sanjeev0291/nse-research-mcp && cd nse-research-mcp
uv sync
claude mcp add --scope user nse-research -- uv run --directory "$PWD" nse-research-mcp

Stock Desk: the web dashboard

The same package ships a local web app that puts everything in one place: your Zerodha portfolio, orders and GTT triggers, research pages with charts, a screener, a market view, a watchlist, and an "Ask Claude" box that runs Claude Code on your machine with your holdings as context.

uvx --from git+https://github.com/sanjeev0291/nse-research-mcp nse-desk

or from a clone: uv run nse-desk. It opens http://127.0.0.1:8765 in your browser. Click Connect (top right) to log in to Zerodha through Kite's own login page; the session is remembered until Kite expires it. Orders and GTTs are sent through Zerodha's official Kite MCP server and every action asks for confirmation first. Ask Claude needs the Claude Code CLI installed; it never gets your Kite session, only a snapshot of your holdings.

Alerts. The Alerts tab lets you set rules such as "TCS moves more than 3% today", "INFY goes below ₹1,000", "any holding moves more than 2% today" or "any holding is down 10% from my buy price". While the desk is running, rules are checked every minute during NSE hours (configurable). A triggered rule shows in the dashboard (bell icon and browser notification), pops a macOS or Linux desktop notification, and can be sent to your phone through a Telegram bot you own (instructions in the tab). Rules and history live in ~/.config/nse-research/alerts.json. Without the browser open, run nse-alerts run in a terminal for the same checks, or nse-alerts add TCS move 3 --direction down, nse-alerts list, nse-alerts check, nse-alerts test.

The desk listens on localhost only. Nothing is stored except the Kite session id, the watchlist and NSE's daily CSVs, all under ~/.config/nse-research and ~/.cache/nse-research.

Pair with your Zerodha account (optional)

Zerodha hosts an official MCP server for Kite. Nothing to install:

claude mcp add --transport http --scope user kite https://mcp.kite.trade/mcp

Ask Claude anything about your holdings; it calls Kite's login tool and gives you a link. Complete the Kite 2FA in your browser and tell Claude you are done. Sessions expire every morning (around 6 AM IST), so expect to log in once a day.

The hosted Kite server can also place orders. To keep Claude read-only, add this to ~/.claude/settings.json:

{
  "permissions": {
    "deny": [
      "mcp__kite__place_order", "mcp__kite__modify_order", "mcp__kite__cancel_order",
      "mcp__kite__place_gtt_order", "mcp__kite__modify_gtt_order", "mcp__kite__delete_gtt_order"
    ]
  }
}

Then /portfolio-review (full), /portfolio-review quick (no research enrichment) or /portfolio-review TCS (deep-dive one holding).

Tools

Tool

What it returns

Source

search_stocks

Symbols by name or partial symbol, with ISIN, NSE industry, index membership

NSE

screen_stocks

Server-side screener over all NSE stocks: market cap, PE, PB, ROE, dividend yield, growth, 52-week change, sector

Yahoo

get_company_profile

Sector, industry, cap bucket, index membership, summary, headline valuation

Yahoo + NSE

get_stock_quote

Price, change, day range, volume vs average, 52-week range, SMA50/200, PE, PB

Yahoo

get_price_history

OHLCV candles plus returns (1w to 1y), SMA20/50/200, RSI14, drawdown, volatility

Yahoo

get_key_ratios

Valuation, margins, ROE/ROA, growth, leverage, cash flow, per-share, ownership

Yahoo

get_financials

Income statement, balance sheet, cash flow; annual or quarterly, in ₹ crore

Yahoo

get_shareholding

Promoter vs public trend by quarter from filings, plus institution split

NSE + Yahoo

get_corporate_actions

Dividends, bonus, splits, rights with ex/record dates; upcoming board meetings

NSE

get_announcements

Latest exchange filings with subject, text and PDF link

NSE

get_analyst_view

Consensus, targets and upside, recommendation trend, earnings dates and surprises

Yahoo

compare_stocks

Side-by-side metrics for up to 15 symbols

Yahoo

get_market_pulse

Market status, key indices, VIX, sector leaders/laggards, latest FII/DII

NSE

get_index_performance

Every NSE index with 1d/30d/1y change and index PE/PB/yield

NSE

get_index_constituents

Members of NIFTY 50/500, midcap, smallcap and sectoral indices with industries

NSE

get_top_movers

Gainers or losers in NIFTY, BANKNIFTY, NEXT 50, F&O or all stocks

NSE

get_most_active

Most traded by value or volume

NSE

get_52_week_breakouts

Stocks at new 52-week highs or lows today

NSE

get_fii_dii

Latest FII/FPI and DII cash buy/sell/net in ₹ crore

NSE

get_bulk_block_deals

Today's bulk, block and short-sale disclosures

NSE

get_option_chain

Chain for NIFTY/BANKNIFTY/F&O stocks: PCR, max pain, OI walls, IV, strikes around ATM

NSE

get_market_holidays

NSE trading holidays, upcoming first

NSE

manage_watchlist

Local watchlist (get with live quotes, add, remove, clear)

local + Yahoo

Things to ask

  • "Screen NSE for companies above ₹20,000 cr market cap with PE under 15 and ROE over 15%"

  • "Compare TCS, Infosys, Wipro and HCL Tech on valuation and growth"

  • "Has the promoter stake in Reliance changed over the last two years?"

  • "What did the FIIs do yesterday, and which sectors led?"

  • "NIFTY option chain for the nearest expiry: where are the OI walls and max pain?"

  • "Show me the last 5 announcements from Tata Motors"

  • "Which NIFTY 500 stocks are at a 52-week low today?"

  • "Run /portfolio-review" (with Kite connected)

Limits and caveats

  • NSE throttles automated traffic. The server uses a browser-like session and caching, but a burst of calls can still get a temporary block; wait a minute and retry. A few NSE endpoints refuse bots outright (per-stock quote page, historical candles); those come from Yahoo instead.

  • Yahoo fundamentals can lag filings by a few days and occasionally miss a field. Verify before acting.

  • Sector names in the screener are Yahoo's eleven sectors; NSE's own industry label is added where the stock is in NIFTY 500 / MIDCAP 150 / SMALLCAP 250 / MICROCAP 250.

  • Renamed or delisted symbols return "no data"; use search_stocks to find the current symbol.

  • Option chains exist only for F&O instruments.

  • Data, not investment advice.

Files on your machine

  • Cache: ~/.cache/nse-research/ (NSE constituent and equity-master CSVs, refreshed daily)

  • Watchlist: ~/.config/nse-research/watchlist.json

Override with the NSE_RESEARCH_CACHE and NSE_RESEARCH_HOME environment variables.

Troubleshooting

  • --check fails on Yahoo: your network blocks finance.yahoo.com, or Yahoo is rate limiting; retry.

  • --check fails on NSE with HTTP 403/503: NSE's bot protection is throttling you; wait a minute. Some corporate networks and VPNs are blocked outright by NSE.

  • Claude Code says the server timed out on first start: dependencies were still downloading. Run the --check command above, then /mcp → reconnect.

  • Claude Desktop shows no tools: GUI apps have a minimal PATH. Use the full path to uvx in the config.

  • uv complains it cannot install Python: install Python 3.11+ yourself (Homebrew, python.org, or your package manager) and uv will use it.

Development

uv sync
uv run python tests/smoke.py          # live checks of every tool (needs internet)
uv run python tests/mcp_roundtrip.py  # spawns the server over stdio like a real client

Layout: src/nse_research_mcp/server.py (tools), nse.py (NSE client), yahoo.py (Yahoo wrappers), symbols.py (search, index lists), indicators.py, cache.py. Plugin manifest in .claude-plugin/, MCP declaration in .mcp.json, the skill in skills/portfolio-review/.

License

MIT

Available Tools

23 tools
compare_stocksA

Side-by-side key metrics for up to 15 NSE symbols: valuation (PE, PB, EV/EBITDA), ROE, margins, growth, leverage, dividend yield, 52-week performance and analyst consensus.

Inputs: symbols_list (required).

get_52_week_breakoutsA

Stocks that hit a new 52-week high or low today (NSE). which: high | low.

Inputs: limit, which.

get_analyst_viewB

Analyst consensus (buy/hold/sell), price targets with upside, recommendation trend over recent months, and past/upcoming earnings dates with EPS estimates and surprises.

Inputs: symbol (required).

get_announcementsC

Latest corporate announcements filed with NSE (results, orders, resignations, investor presentations…) with subject, short text and PDF link.

Inputs: symbol (required), limit.

get_bulk_block_dealsB

Today's bulk deals, block deals and short-selling disclosures on NSE (who bought/sold what, at what price).

Inputs: limit.

get_company_profileA

Company overview for an NSE symbol: sector, industry (Yahoo and NSE classifications), market-cap bucket, index membership, business summary, employees, website, headline valuation.

Inputs: symbol (required).

get_corporate_actionsB

Dividends, bonus, splits, rights and buybacks with ex-dates and record dates (NSE), plus upcoming and recent board meetings (results dates etc.).

Inputs: symbol (required).

get_fii_diiA

Latest day's FII/FPI and DII cash-market buy, sell and net flows in ₹ crore (NSE).

Inputs: no named parameters.

get_financialsA

Financial statements in ₹ crore. statement: income | balance | cashflow | all. period: annual (last 4-5 fiscal years, FY ends 31 Mar) | quarterly (last 5 quarters).

Inputs: symbol (required), period, statement.

get_index_constituentsB

Constituent stocks of an NSE index with industry labels (from NSE's official lists). Supports NIFTY 50/NEXT 50/100/200/500, MIDCAP 50/100/150, SMALLCAP 100/250, MICROCAP 250 and sectoral indices (BANK, IT, AUTO, PHARMA, FMCG, METAL, REALTY, ENERGY, FINANCIAL SERVICES, HEALTHCARE, OIL & GAS…).

Inputs: index.

get_index_performanceA

All NSE indices with last value, 1-day/30-day/1-year % change, PE, PB, dividend yield. group: all | broad | sectoral | thematic | strategy.

Inputs: group.

get_key_ratiosC

Valuation, profitability, growth, leverage, cash flow, per-share and ownership ratios for a stock.

Inputs: symbol (required).

get_market_holidaysA

NSE equity (capital market) trading holidays for the current year, upcoming ones first.

Inputs: no named parameters.

get_market_pulseA

One-call market snapshot: market status, key broad and sectoral indices with % change and index PE/PB, India VIX, sector leaders and laggards today, and the latest FII/DII cash flows.

Inputs: no named parameters.

get_most_activeC

Most actively traded stocks today by traded value or volume (NSE).

Inputs: by, limit.

get_option_chainA

Option chain from NSE for an index (NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY) or an F&O stock. Returns spot, expiry list, put-call ratio (OI), max-pain strike, top OI strikes for calls (resistance) and puts (support), and a compact table of strikes around the money with OI, OI change, IV, LTP, volume. expiry format DD-Mon-YYYY (e.g. 29-Sep-2026); defaults to the nearest expiry.

Inputs: expiry, symbol, strikes_around.

get_price_historyA

Historical OHLCV plus computed stats. period: 1mo 3mo 6mo 1y 2y 5y 10y max (or 5d/1d for intraday intervals). interval: 1d 1wk 1mo (intraday: 5m 15m 1h, max 60 days). Daily data also returns returns over 1w/1m/3m/6m/1y, SMA20/50/200, RSI14, max drawdown and annualised volatility. candles = how many most-recent bars to include (≤ 400).

Inputs: symbol (required), period, candles, interval.

get_shareholdingB

Promoter vs public shareholding trend from NSE filings (quarterly), plus Yahoo's insider/institution split. Rising promoter stake and falling pledge are usually read as positive.

Inputs: symbol (required), quarters.

get_stock_quoteA

Latest quote for an NSE symbol: price, change, day range, volume vs 3-month average, 52-week range and distance from it, 50/200-day averages, market cap, PE, PB, dividend yield.

Inputs: symbol (required).

get_top_moversA

Today's top gainers or losers. index: NIFTY | BANKNIFTY | NIFTYNEXT50 | FNO (all F&O stocks) | ALL (all securities). direction: gainers | losers.

Inputs: index, limit, direction.

manage_watchlistA

Personal watchlist stored locally (~/.config/nse-research/watchlist.json). action: get (returns symbols with live quotes) | add | remove | clear.

Inputs: action, symbols_list.

screen_stocksA

Screen all NSE-listed stocks by fundamentals and price action (server-side, fast). Filters: market cap in ₹ crore, PE (ttm), PB, ROE %, dividend yield %, quarterly revenue growth %, EPS growth %, 52-week change %, price, 3-month average volume, Yahoo sector (one of: Basic Materials, Communication Services, Consumer Cyclical, Consumer Defensive, Energy, Financial Services, Healthcare, Industrials, Real Estate, Technology, Utilities) or industry. sort_by: market_cap | pe | dividend_yield | change_1d | change_52w | volume | price. limit ≤ 250.

Inputs: limit, max_pb, max_pe, min_pe, +15 more.

search_stocksB

Find NSE symbols by company name or partial symbol (e.g. "tata motors", "hdfc", "INFY"). Returns symbol, name, ISIN, listing date, NSE industry and index membership (NIFTY 50/500 etc.).

Inputs: query (required), limit. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools are cleanly separated by data category: quotes, financials, indices, flows, options, etc. A few pairs like get_top_movers vs get_most_active or get_company_profile vs get_key_ratios could be momentarily confused, but the descriptions make the boundaries clear.

    Naming Consistency5/5

    All tools follow a consistent snake_case action_object pattern: get_* for data retrieval, plus search_stocks, screen_stocks, compare_stocks, and manage_watchlist. Even get_52_week_breakouts fits predictably despite the numeric prefix.

    Tool Count3/5

    At 23 tools, the set is on the heavy side, though each tool maps to a distinct NSE research need and no tool feels redundant. The breadth is coherent for a full research server, but the count is high enough that an agent may have to scan many options before selecting the right one.

    Completeness4/5

    The server covers the NSE research lifecycle well: discovery, screening, quotes and history, fundamentals, corporate actions, market breadth, index/options data, and watchlists. Minor gaps exist, such as limited historical bulk-deal data and no futures data, but core equity research workflows have no dead ends.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides 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
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language access to Zerodha trading accounts for retrieving portfolio holdings, positions, orders, funds, and real-time market prices. Supports secure authentication for Indian stock market trading operations via Claude, Cursor, and other MCP-compatible AI tools.
      1
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Indian stock market MCP server exposing 55 tools covering all 8,200+ NSE and BSE listed stocks, letting users pull live quotes, quarterly financials, technical indicators, a 326-ratio screener, FII/DII flows, option chains and IV, corporate filings, IPOs, bulk deals and portfolio P&L through plain-English prompts. It can be added to Claude, ChatGPT, Cursor, VS Code, Codex or Gemini CLI either as a remote OAuth endpoint or as a local npx/uvx stdio bridge.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives AI assistants live, structured data on all 8,200+ NSE and BSE listed stocks through 55 tools, covering quotes, financials, a 326-ratio screener, technical indicators, FII/DII flows, option chains and IV, corporate filings, IPOs, bulk deals and portfolio P&L. Runs either remotely over OAuth or locally over stdio, so it works in Claude, ChatGPT, Cursor, VS Code, Codex, Gemini CLI and any other MCP client.
      MIT