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.
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.
npm install mcp-stock-analysis
Configure your MCP client (e.g., Claude Desktop) to connect to the server:
{ "mcpServers": { "mcp-stock-analysis": { "command": "npx", "args": ["-y", "mcp-stock-analysis"], } } }
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.
Contributions are welcome! Please open an issue or pull request.
MIT
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!