{
  "markdown": "# india-stock-mcp\n\n[![CI](https://github.com/Akhilgovind02/india-stock-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Akhilgovind02/india-stock-mcp/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/india-stock-mcp)](https://www.npmjs.com/package/india-stock-mcp)\n\nMCP server for Indian stock market data — NSE/BSE quotes, historical prices, fundamentals, mutual fund NAV, indices, corporate actions, F&O option chains, IPOs, and portfolio analysis.\n\nWorks with any MCP client: Claude Desktop, Claude Code, Cursor, etc. **No API keys, no auth, all free data sources.**\n\n## Tools (16)\n\n| Tool | What it does |\n|---|---|\n| `get_quote` | Live price, volume, 52-week range for NSE/BSE stocks and indices |\n| `get_historical` | OHLCV history — daily / weekly / monthly |\n| `search_symbol` | Find stock symbols by company name |\n| `get_fundamentals` | P/E, EPS, ROE, margins, debt, growth rates |\n| `compare_stocks` | 2–5 stocks side by side |\n| `get_index` | Any NSE index (P/E, P/B, advances/declines) + SENSEX |\n| `get_market_status` | Is the market open? Session info per segment |\n| `get_gainers_losers` | Top NIFTY 50 movers ranked by % change |\n| `get_corporate_actions` | Dividends, splits, bonuses — per stock or market-wide |\n| `get_options_chain` | F&O chain around ATM: LTP, OI, OI change, IV, volume |\n| `get_ipo_list` | Current / upcoming / recently listed IPOs |\n| `search_funds` | Search 15,000+ Indian mutual fund schemes |\n| `get_fund_nav` | NAV history for a scheme |\n| `get_fund_details` | Fund house, category, current NAV |\n| `compare_funds` | 2–4 funds: NAV + % return over any period |\n| `portfolio_summary` | Holdings → current value, P&L, allocation breakdown |\n\n## Requirements\n\n- Node.js 22+\n\n## Setup\n\n### Via npm (recommended)\n\nNo clone, no build:\n\n**Claude Code**\n```bash\nclaude mcp add india-stock -- npx -y india-stock-mcp\n```\n\n**Claude Desktop** — add to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\\Claude\\`):\n\n```json\n{\n  \"mcpServers\": {\n    \"india-stock\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"india-stock-mcp\"]\n    }\n  }\n}\n```\n\n### From source\n\n```bash\ngit clone https://github.com/Akhilgovind02/india-stock-mcp.git\ncd india-stock-mcp\nnpm install\nnpm run build\nclaude mcp add india-stock -- node /absolute/path/to/india-stock-mcp/dist/index.js\n```\n\nRestart Claude Desktop fully, then look for the tools icon in a new chat.\n\n### Example prompts\n\n- \"Quote for RELIANCE and how far is it from its 52-week high?\"\n- \"Compare HDFC Bank vs ICICI Bank vs SBI fundamentals\"\n- \"Top 5 NIFTY 50 gainers today\"\n- \"NIFTY option chain — where's the max open interest?\"\n- \"Compare Parag Parikh Flexi Cap vs Quant Small Cap over 3 years\"\n- \"Analyze my portfolio: 10 RELIANCE @ 1200, 5 TCS @ 3000\"\n\n## Development\n\n```bash\nnpm run dev                      # run from TypeScript directly\nnpx tsx scripts/test-mcp.ts      # end-to-end test of all 16 tools (live data)\nnpx tsx scripts/test-edge.ts     # 24 edge-case assertions\nnpm run build                    # compile to dist/\n```\n\n### Sample test output\n\nReal output from `npx tsx scripts/test-mcp.ts` (live data, market hours, June 2026 — trimmed):\n\n```\nTOOLS: get_quote, get_historical, search_symbol, search_funds, get_fund_nav,\nget_fundamentals, compare_stocks, get_index, get_market_status, get_gainers_losers,\nget_corporate_actions, get_options_chain, get_ipo_list, get_fund_details,\ncompare_funds, portfolio_summary\n\nPASS get_quote: {\"source\":\"Yahoo Finance\",\"symbol\":\"RELIANCE.NS\",\"name\":\"RELIANCE\n  INDUSTRIES LTD\",\"price\":1266,\"changePct\":0.23,\"volume\":6107188,...}\nPASS get_index: {\"source\":\"NSE\",\"index\":\"NIFTY BANK\",\"last\":55915,\"percentChange\":1.34,\n  \"yearHigh\":61764.85,\"pe\":...}\nPASS get_market_status: [{\"market\":\"Capital Market\",\"marketStatus\":\"Open\",...}]\nPASS get_gainers_losers: {\"type\":\"gainers\",\"universe\":\"NIFTY 50\",\"data\":[{\"symbol\":\n  \"SHRIRAMFIN\",\"changePct\":3.17,...}]}\nPASS get_corporate_actions: {\"symbol\":\"RELIANCE\",\"actions\":[{\"subject\":\"Dividend -\n  Rs 5.5 Per Share\",\"exDate\":\"14-Aug-2025\",...}]}\nPASS get_options_chain: {\"symbol\":\"NIFTY\",\"underlyingValue\":23331,\"atmStrike\":23350,\n  \"availableExpiries\":[\"16-Jun-2026\",...],\"data\":[{\"strikePrice\":...,\"CE\":{\"lastPrice\":\n  130.95,\"openInterest\":144769,\"impliedVolatility\":12.26},...}]}\nPASS get_ipo_list: {\"type\":\"current\",\"ipos\":[{\"companyName\":\"Utkal Speciality\n  Industries India Limited\",\"status\":\"Active\",...}]}\nPASS compare_funds: {\"comparison\":[{\"name\":\"Parag Parikh Flexi Cap Fund - Direct\n  Plan - Growth\",\"latestNAV\":88.484,...}]}\nPASS portfolio_summary: {\"summary\":{\"totalInvested\":41000,\"totalCurrentValue\":38663,\n  \"totalPnL\":-2337,\"totalPnLPct\":-5.7,...}}\n\n... all 16 tools PASS\n```\n\n## Data sources\n\n| Source | Used for | Notes |\n|---|---|---|\n| Yahoo Finance (`yahoo-finance2`) | Quotes, history, fundamentals, search | Primary source, may be delayed a few minutes |\n| NSE India (`nse-bse-api`) | Market status, indices, corporate actions, IPOs, option chains | Some NSE endpoints (quote, autocomplete) are no longer publicly accessible — the server falls back to Yahoo automatically |\n| [mfapi.in](https://www.mfapi.in) | Mutual fund NAV and search | Free, occasionally flaky — requests retry once |\n| [mfdata.in](https://mfdata.in) | Fund ratings / expense ratio | Often unreachable; falls back to mfapi.in |\n\n### Known limitations\n\n- `get_gainers_losers` ranks a built-in NIFTY 50 constituent list (verified June 2026). NSE reconstitutes the index ~2×/year — update `NIFTY50_SYMBOLS` in `src/index.ts` when that happens.\n- Quotes may be delayed (Yahoo free feed); not suitable for live trading decisions.\n- NSE may rate-limit or block heavy usage.\n\n## Disclaimer\n\nData comes from free public sources and may be delayed, incomplete, or wrong. This is not financial advice and not a substitute for a licensed broker or advisor. Do your own research before trading or investing.\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 5960,
  "sha": "8c9c37cc79b1205bc2581e587c1874ae75cc543ebfb10078cb193f51ab239e16",
  "repo_slug": "akhilgovind02/india-stock-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_akhilgovind02_india_stock_mcp_885c5d0a/readme"
}