home / mcp / stock analysis mcp server

Stock Analysis MCP Server

Provides access to real-time and historical Indian stock data via Yahoo Finance for use by local MCP agents.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can access real-time and historical Indian stock data through an MCP server that exposes two core actions: getStockQuote for the latest price and getHistoricalData for past performance. This server enables local LLMs and MCP-compatible agents to retrieve stock data as context, quickly and efficiently.

How to use

Connect your MCP client to the stock analysis server using the provided MCP configuration. Once connected, you can request the latest quote for a stock symbol or retrieve historical data with selectable intervals to support decision making, research, or context for your AI workflows.

Available actions include getStockQuote to fetch a current quote for a symbol such as RELIANCE.NS, and getHistoricalData to obtain historical price data with a chosen interval like daily, weekly, or monthly. Use these endpoints to augment answers with up-to-date market context within your local AI tools.

How to install

Prerequisites: You need Node.js and npm installed on your machine.

Install the MCP stock analysis package from your project or global location inside your environment.

npm install mcp-stock-analysis

Configuration to connect with your MCP client

Configure your MCP client to connect to this server by including the following connection entry. This uses npx to run the MCP stock analysis server locally.

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

Available tools

getStockQuote

Fetch the current quote for a stock symbol using the stock data source.

getHistoricalData

Retrieve historical price data for a stock with configurable interval (daily, weekly, monthly) and period.