Skip to main content
Glama
giptilabs

MCP Stock Analysis Server

by giptilabs

MCP Stock Analysis Server by Akshay Bavkar

This is an MCP server that provides access to real-time and historical Indian stock data using the Yahoo Finance API. It allows stock data retrieval to be used as context by local LLMs via Claude Desktop, Cursor, and other MCP-compatible agents.

Available Features

  • getStockQuote: Get the current quote for an Indian stock.

  • getHistoricalData: Get historical data for an Indian stock with custom intervals and periods.


Related MCP server: Indian Stock Exchange MCP Server

Setup

npm install mcp-stock-analysis

Usage in Host

Configure your MCP client (e.g., Claude Desktop) to connect to the server:

{
  "mcpServers": {
    "mcp-stock-analysis": {
      "command": "npx",
      "args": ["-y", "mcp-stock-analysis"],
    }
  }
}

Tools

getStockQuote

Get the current quote for a stock.

Input:

symbol: The stock symbol (e.g., RELIANCE.NS)

Output:

{
  "symbol": "RELIANCE.NS",
  "price": 2748.15,
  "name": "Reliance Industries Ltd"
}

getHistoricalData

Get historical data for a stock.

Input:

  • symbol: the stock symbol (e.g., RELIANCE.NS)

  • interval: the time interval for the data (daily, weekly, or monthly) (optional, default: daily)

Output:

{
    "date": "2025-03-21T00:00:00+05:30",
    "open": 2735,
    "high": 2750,
    "low": 2725,
    "close": 2748.15,
    "volume": 21780769
}

JSON object containing the historical data. The structure of the output depends on the interval parameter.

Contributing

Contributions are welcome! Please open an issue or pull request.

License

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables real-time and historical Indian stock market data retrieval, including prices, news, recommendations, and top gainers/losers.
    11
    -
  • 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.
    14
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables 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.
    28
    1
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables self-hosted Indian stock research for Claude or any MCP client, pulling quotes, fundamentals, financials, a screener, option chains, FII/DII flows, and more from NSE India and Yahoo Finance without API keys, plus optional Zerodha Kite portfolio pairing.
    23
    MIT