How nikhilcherry/indian-stock-mcp works
This repository is an MCP server that exposes Indian stock-market data to MCP clients such as Claude Desktop. The principal workflow is a client tool call, dispatch to a registered market-data handler, an authenticated request to the Indian Stock Exchange API, and a formatted result or explicit request error returned to the client. The handlers cover news, stock details/prices/history, market movers, and commodities. All runtime logic is in src/index.ts; the graph groups its distinct responsibilities. The source excerpts show the registered calls and API boundary; the README documents the client setup.
Main entry points: index.ts MCP server
Components 9
MCP interface
- MCP server
src/index.ts
Market data tools
- News tool
src/index.ts - Stock tools
src/index.ts - Market movers
src/index.ts - Commodities tool
src/index.ts
API integration
- API request
src/index.ts - Result formatter
src/index.ts
Other components
- MCP client
- Indian Stock API
Connections 14
- MCP client → MCP server: calls tools
README.md - MCP server → News tool: registers
src/index.ts - MCP server → Stock tools: registers
src/index.ts - MCP server → Market movers: registers
src/index.ts - MCP server → Commodities tool: registers
src/index.ts - News tool → API request: requests data
src/index.ts - Stock tools → API request: requests data
src/index.ts - Market movers → API request: requests data
src/index.ts - Commodities tool → API request: requests data
src/index.ts - News tool → Result formatter: formats result
src/index.ts - Stock tools → Result formatter: formats result
src/index.ts - Market movers → Result formatter: formats result
src/index.ts - Commodities tool → Result formatter: formats result
src/index.ts - API request → Indian Stock API: fetches data
src/index.ts