Skip to main content
Glama
mcp-indian-stocks

mcp-indian-stocks

by NagrajADesai

Indian Stock Market MCP Server

An MCP (Model Context Protocol) server built in Python that provides real-time and historical data from the Indian Stock Market (BSE and NSE).

πŸš€ Quick Start Guide

1. Get Your API Key

  1. Go to IndianAPI.in - Indian Stock Market API.

  2. Sign up and copy your API key.

2. Set Up the .env File

  1. Clone this repository to your computer.

  2. In the root of the project folder, create a new file named exactly .env.

  3. Open the .env file and paste your API key like this:

INDIAN_STOCK_API_KEY=your_api_key_here

3. Connect to Claude Desktop

To use this with Claude Desktop, update your configuration file.

(On Windows, this is usually at %APPDATA%\Claude\claude_desktop_config.json)

Add this to the mcpServers section:

{
  "mcpServers": {
    "IndiaStockExchange": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "fastmcp",
        "fastmcp",
        "run",
        "<file-path>\\main.py"
      ],
      "env": {}
    }
  }
}

Important: Replace <file-path> with the actual path where you saved this repository (e.g., C:\\Users\\yourname\\mcp-indian-stocks).


Related MCP server: Indian Stock Exchange API2 MCP Server

πŸ› οΈ Available Tools

  • get-market-news - Get the latest general market news.

  • get-news - Get specific Indian Stock Exchange news.

  • get-stock-details - Get comprehensive details for a specific stock.

  • get-stock-history - Get historical pricing data for a stock.

  • get-stock-price - Get the real-time stock price.

  • get-stock-recommendations - Get stock recommendations based on market trends.

  • get-top-gainers - Get a list of the top gaining stocks.

  • get-top-losers - Get a list of the top losing stocks.

Available Tools

11 tools
get_commoditiesGet CommoditiesB

Get commodity futures and spot prices.

Inputs: no named parameters. Returns: result

get_corporate_actionsGet Corporate ActionsB

Get data on dividends, splits, and other corporate actions for a stock.

Inputs: stock_name (required). Returns: result

get_historical_dataGet Historical DataC

Get historical price and metric data for a stock.

Inputs: period (required), stock_name (required), filter. Returns: result

get_ipo_dataGet Ipo DataB

Get ongoing and upcoming IPO data.

Inputs: no named parameters. Returns: result

get_newsGet NewsA

Get the latest stock market and financial news.

Inputs: no named parameters. Returns: result

get_price_shockersGet Price ShockersB

Get stocks with significant intraday price/volume movements.

Inputs: no named parameters. Returns: result

get_stock_detailsGet Stock DetailsC

Get detailed company profiles, stock prices, and financials.

Inputs: name (required). Returns: result

get_stock_forecastsGet Stock ForecastsB

Get analyst forecasts and target prices for a stock.

Inputs: stock_id (required). Returns: result

search_industrySearch IndustryC

Search for companies by industry.

Inputs: query (required). Returns: result

search_mutual_fundSearch Mutual FundA

Search for mutual funds by name or keyword.

IMPORTANT: Use short keywords (1-3 words), NOT full fund names. The API does not support long search strings.

Inputs: query (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 11 tools

    Disambiguation4/5

    Each tool targets a distinct data category (mutual funds, IPOs, news, forecasts, corporate actions, commodities, etc.), so purposes are largely separable. Minor risk: get_price_shockers vs get_trending_stocks both surface 'notable stocks,' and get_stock_details vs get_historical_data both touch price data, but descriptions differentiate them adequately.

    Naming Consistency4/5

    Strong get_* verb_noun pattern (get_ipo_data, get_news, get_stock_details, etc.) across most tools. Two tools deviate with search_* (search_mutual_fund, search_industry), which is a reasonable distinction for search semantics but breaks pure consistency.

    Tool Count5/5

    11 tools is well within the ideal 3-15 range for a market-data server, with each tool covering a meaningful distinct data source. No redundant or filler tools are apparent.

    Completeness4/5

    Broad coverage spanning news, IPOs, forecasts, corporate actions, commodities, trending stocks, industry search, and historical data. A direct real-time stock quote or watchlist/portfolio operation is a minor gap, but agents can work around it via get_stock_details.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides 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.
      43 npm
      13
      MIT
    • F
      license
      C
      quality
      D
      maintenance
      Enables access to comprehensive Indian stock market data from the NSE and BSE, including historical statistics, corporate actions, and IPO information. It also provides tools for mutual fund searches, analyst recommendations, and tracking market-active or trending stocks.
      16
      -
    • A
      license
      A
      quality
      B
      maintenance
      Indian 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.
      55
      143 npm
      151
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides live market data from Indian Stock Exchanges (BSE & NSE) via MCP, powered by IndianAPI. Enables querying stock data, trending stocks, and more through natural language.
      16
      MIT