NSE MCP Explorer

Examples

Every example uses only tools that NSE MCP actually exposes. Run them interactively on the Examples page (npm run dev → http://localhost:5180/#/examples), where each one shows the live response, a visual view, the raw JSON-RPC and TypeScript/Python/curl code. LAST_TRADING_DAY below stands for the most recent weekday (yyyy-MM-dd).

Contents

Market: Is the live data fresh?

What are we trying to achieve? Before showing “live” numbers, check when NSE last refreshed its caches.

Which tools?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cm_get_data_status",
    "arguments": {}
  }
}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "cm_get_allstocks_status",
    "arguments": {}
  }
}

How to interpret the response

Use it in your app: Call these once when your app starts and show a “data as of …” badge. Warn users if lastCrawled is older than ~15 minutes during market hours.

Market: How broad was the last session’s move?

What are we trying to achieve? Count advancing vs declining stocks for a trading day.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_market_breadth",
    "arguments": {
      "date": "LAST_TRADING_DAY"
    }
  }
}

How to interpret the response

Use it in your app: Call it for the last 10–20 trading days to chart breadth over time — the Insights page does exactly that.

Stocks: Live quote for one stock

What are we trying to achieve? Show the latest price, change, intraday range and 52-week range for RELIANCE.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cm_get_stock_quote",
    "arguments": {
      "symbol": "RELIANCE"
    }
  }
}

How to interpret the response

Use it in your app: Use the exact NSE symbol. If users type company names, resolve them first with nse_lookup_symbol.

Stocks: Find the right symbol

What are we trying to achieve? A user types “HDFC” — which NSE tickers match?

Which tools?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "nse_lookup_symbol",
    "arguments": {
      "query": "HDFC"
    }
  }
}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "search_symbols",
    "arguments": {
      "query": "HDFC"
    }
  }
}

How to interpret the response

Use it in your app: Back an autocomplete box with nse_lookup_symbol and show search_symbols details on hover.

Stocks: Three months of daily prices

What are we trying to achieve? Chart TCS’s daily OHLCV for the last 3 months.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_stock_history",
    "arguments": {
      "symbol": "TCS",
      "months": 3,
      "endDate": "today"
    }
  }
}

How to interpret the response

Use it in your app: Loop: call with endDate=”today”, then with each next_end_date until you have enough rows. De-duplicate dates at chunk boundaries.

Stocks: What did it close at on a given day?

What are we trying to achieve? Get RELIANCE’s close on a specific date (e.g. a purchase date).

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_ltp_by_date",
    "arguments": {
      "symbol": "RELIANCE",
      "date": "2026-01-01"
    }
  }
}

How to interpret the response

Use it in your app: Useful for “what is my holding worth vs the day I bought it” calculations — parse the text as a number.

Stocks: Watchlist snapshot in one call

What are we trying to achieve? End-of-day OHLC and % change for a whole watchlist.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_bulk_quote",
    "arguments": {
      "symbols": [
        "RELIANCE",
        "TCS",
        "INFY",
        "HDFCBANK",
        "ICICIBANK",
        "SBIN"
      ]
    }
  }
}

How to interpret the response

Use it in your app: Prefer this over N separate calls for daily summaries or portfolio valuation.

Market movers: Today’s top gainers and losers in NIFTY 50

What are we trying to achieve? Rank the NIFTY 50 constituents by today’s % change.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "nse_get_market_movers",
    "arguments": {
      "indexName": "NIFTY",
      "limit": 10
    }
  }
}

How to interpret the response

Use it in your app: Poll every 5 minutes at most — that is how often NSE refreshes this cache.

Market movers: Biggest losers on a past date (with a corporate-action trap)

What are we trying to achieve? Find the top losers for a historical session and avoid misreading splits/bonuses as crashes.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_top_movers",
    "arguments": {
      "date": "LAST_TRADING_DAY",
      "n": 10,
      "direction": "loss"
    }
  }
}

How to interpret the response

Use it in your app: For each loser below −20%, call get_corporate_actions(symbol, date, date) and label confirmed events instead of showing them as losses.

Volume: Most active stocks by turnover

What are we trying to achieve? Which stocks saw the most money change hands in the last session?

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_top_by_volume",
    "arguments": {
      "date": "LAST_TRADING_DAY",
      "n": 15,
      "sortBy": "value"
    }
  }
}

How to interpret the response

Use it in your app: Show both rankings side by side — the difference is itself informative.

Volume: Is volume unusual for this stock?

What are we trying to achieve? Compare INFY’s recent volume with its 30-day average.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_volume_analysis",
    "arguments": {
      "symbol": "INFY",
      "days": 30
    }
  }
}

How to interpret the response

Use it in your app: Combine with nse_get_market_movers to flag movers on unusual volume — see “Unusual volume” on the Insights page.

Technicals: 50-day moving average

What are we trying to achieve? Is HINDALCO trading above its 50-day SMA?

Which tools?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "moving_average",
    "arguments": {
      "symbol": "HINDALCO",
      "days": 50
    }
  }
}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "cm_get_stock_quote",
    "arguments": {
      "symbol": "HINDALCO"
    }
  }
}

How to interpret the response

Use it in your app: For a full SMA/EMA/RSI series, fetch history and compute locally (shared/analytics.ts) — the Insights page shows how.

Technicals: Where is it in its 52-week range?

What are we trying to achieve? How far is TCS from its 52-week high and low?

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_52_week_high_low",
    "arguments": {
      "symbol": "TCS"
    }
  }
}

How to interpret the response

Use it in your app: Great for screeners: call for a list of symbols and sort by position_in_range_pct.

Technicals: Compare IT majors over 6 months

What are we trying to achieve? Rank TCS, INFY, WIPRO and HCLTECH by return and drawdown.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "compare_stocks",
    "arguments": {
      "symbols": [
        "TCS",
        "INFY",
        "WIPRO",
        "HCLTECH"
      ],
      "months": 6
    }
  }
}

How to interpret the response

Use it in your app: Up to 10 symbols and 1–24 months per call. Check corporate actions for each symbol if a result looks extreme.

Corporate actions: Dividends, splits and bonuses

What are we trying to achieve? List corporate actions for RELIANCE over the last 5 years.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_corporate_actions",
    "arguments": {
      "symbol": "RELIANCE",
      "fromDate": "",
      "toDate": ""
    }
  }
}

How to interpret the response

Use it in your app: Apply the factors to get_stock_history output to build an adjusted price series — shared/analytics.ts has adjustForCorporateActions().

Segments: Browse the SME platform live

What are we trying to achieve? List live prices for SME-segment stocks.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cm_get_sme_stocks",
    "arguments": {
      "limit": 25,
      "symbolFilter": ""
    }
  }
}

How to interpret the response

Use it in your app: symbolFilter is a prefix match; limit is capped at 500.

Segments: Bonds, G-secs, SGBs, InvITs and REITs

What are we trying to achieve? See the non-equity instruments traded in the CM segment.

Which tool?

Request (JSON-RPC tools/call):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cm_get_bond_stocks",
    "arguments": {
      "limit": 25,
      "symbolFilter": "SGB"
    }
  }
}

How to interpret the response

Use it in your app: Use the series column to group instruments by type.

Multi-tool recipes (Insights page)

These live in server/src/analytics/recipes.ts and are exposed at /api/recipes/*.

Recipe Tools composed Analytics added API
Stock deep dive cm_get_stock_quote, get_corporate_actions, get_52_week_high_low, chained get_stock_history split/bonus back-adjustment, SMA 20/50, EMA 20, RSI 14, volatility, drawdown, gap detection GET /api/recipes/deep-dive?symbol=RELIANCE&months=6
Movers × unusual volume nse_get_market_movers + get_volume_analysis per mover relative volume and session-pace projection GET /api/recipes/unusual-volume?index=NIFTY&limit=10
Breadth trend get_market_breadth for each recent weekday holiday de-duplication, sentiment label GET /api/recipes/breadth?days=10
Peer comparison compare_stocks, get_bulk_quote, get_corporate_actions per symbol flags splits/bonuses inside the window GET /api/recipes/peers?symbols=TCS,INFY&months=6

Verified live on 2026-10-06: a 24-month RELIANCE deep dive found a raw −49.76% “crash” on 2024-10-28, matched it to the 1:1 bonus (factor 0.5) from get_corporate_actions, and produced a continuous adjusted series.

AI agent

With ANTHROPIC_API_KEY set, the AI agent demo page sends your question to Claude together with all 26 tool definitions from tools/list. Claude decides which NSE tools to call; the backend executes them over MCP and returns the results until Claude answers. Try: “Show me today’s top gainers with unusually high volume.”

Not available through NSE MCP