Indian Stock Exchange

io.github.prakharv-opsv2.0.0更新于 Oct 11, 2026

Indian stocks (NSE/BSE): quotes, fundamentals, analyst targets, IPOs, mutual funds, commodities.

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

只读型 MCP 服务器,让助手获取印度股市实时数据:NSE/BSE 行情、基本面、分析师目标价、IPO、共同基金与大宗商品。

功能
提供 27 个只读工具,覆盖印度股票与基金。可将名称解析为 NSE/BSE 代码,返回价格快照、历史走势、财务报表、持股结构、分析师预测与目标价、公司行动与公告,以及市场涨跌榜、新闻、IPO 日历、MCX 商品期货和共同基金搜索与详情。还附带五个分析提示词和三个资源,其中包括按股票查询的资源。输出经过精简,便于分析而非原始接口数据。
适用场景
适合助手需要印度市场最新信息的研究类问题:比较上市公司、撰写个股研究笔记、查看当日市场动向、了解即将上市的 IPO,或筛选共同基金。不用于交易或投资组合执行。
运行要求
以 npm 包形式通过 stdio 在本地运行,需要 Node.js 20 或更高版本。必须通过 ISE_API_KEY 环境变量(或 .env 文件)提供来自 indianapi.in 的 API 密钥。可选的 HTTP 模式默认绑定本机,可用 HOST 和 PORT 覆盖。需要访问数据提供方的网络。
安装前请注意
需要 ISE_API_KEY 密钥,该密钥会发送给第三方数据提供方,请勿将其提交到代码仓库。所有工具均标注为只读,不会执行交易或写入操作。可选 HTTP 模式没有身份验证,若要在本机之外暴露,应先置于带认证的反向代理之后。输出仅供参考,不构成投资建议;金额单位为印度卢比,市值为千万卢比(crore)。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Indian Stock Exchange,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Indian Stock Exchange MCP Server

An MCP server that gives Claude (and any MCP client) live access to the Indian market: NSE/BSE equities, fundamentals, analyst targets, IPOs, mutual funds and commodities. Ask things like:

  • "Compare TCS, Infosys and Wipro on valuation, margins and momentum."
  • "Give me a research note on Reliance: financials, shareholding changes, analyst targets and recent filings."
  • "What's moving the market today? Any IPOs opening this week?"
  • "Shortlist the best mid-cap mutual funds by 3-year return and compare the top three."

Data comes from the Indian Stock Market API.

[Demo: the compare-stocks tool returning TCS, Infosys and Wipro side by side]

Real output from the compare-stocks tool. Regenerate it with node scripts/capture-demo.mjs && scripts/render-demo.sh.

Features

  • 27 tools, all read-only and annotated as such, with compact, analysis-ready output instead of raw API dumps
  • One-call stock snapshot: price, ranges, valuation, profitability, growth, leverage, returns, moving-average trend, analyst consensus and peers
  • Fundamentals: multi-year P&L, balance sheet, cash flow, ratios, shareholding pattern, analyst estimates and price targets
  • Market: gainers/losers, most active, price shockers, 52-week highs/lows, news, IPO calendar, commodity futures
  • Mutual funds: search, browse by category and return, full scheme details
  • 5 prompts (analyze-stock, compare-stocks, market-briefing, dividend-and-events, mutual-fund-picks) and 3 resources (news, IPO calendar, ise://stock/{name})
  • Reliable client: request timeout, retry with backoff on 429/5xx, in-memory TTL cache, in-flight de-duplication, clear error messages, and the API key is never exposed in output
  • stdio transport for desktop clients and stateless Streamable HTTP for remote use

Tools

AreaToolWhat it does
Stockssearch-stocksResolve a name to NSE/BSE codes and ISIN
get-stock-snapshotCondensed overview of a stock (start here)
get-stock-priceLatest price, day range, 52-week range
get-stock-detailsProfile, key metrics, shareholding, actions, news by section
get-stock-historyPrice, P/E, P/B, margins or EV history over 1m to max
compare-stocksSide-by-side comparison of 2-5 stocks
get-peersPeer companies with valuation and returns
get-stock-recommendationsAnalyst rating breakdown and trend
Fundamentalsget-financial-statementsQuarterly/annual results, balance sheet, cash flow, ratios
get-shareholding-patternPromoter/FII/DII/public holding over time
get-analyst-estimatesConsensus forecasts or actuals (EPS, sales, net income, EBITDA, ROE, ...)
get-price-targetMean/high/low targets and consensus recommendation
get-corporate-actionsDividends, bonus, splits, rights, board meetings
get-announcementsRecent exchange filings with links
Marketget-market-overviewMovers, activity, shockers and headlines in one call
get-top-gainers / get-top-losersToday's biggest movers
get-most-activeHighest-volume stocks (NSE or BSE)
get-price-shockersUnusual price moves (NSE or BSE)
get-52-week-highs-lowsStocks at 52-week extremes
get-news / get-market-newsLatest headlines with summaries
get-iposUpcoming, active, closed and listed IPOs
get-commoditiesMCX futures with open-interest signal
Mutual fundssearch-mutual-fundsFind schemes by name
get-mutual-fund-detailsNAV, returns, risk, expense ratio, holdings
list-mutual-fundsBrowse and rank by category and return period

Setup

Requires Node.js 20+ and an API key from indianapi.in.

sh
git clone <this repo> && cd Indian-Stock-Exchange-MCPcp .env.example .env        # then set ISE_API_KEYnpm installnpm run build

The key is read from the ISE_API_KEY environment variable, .env, or src/.env. Never commit it; all three files are git-ignored.

Claude Desktop

Settings > Developer > Edit Config:

json
{  "mcpServers": {    "indian-stock-exchange": {      "command": "node",      "args": ["/absolute/path/to/Indian-Stock-Exchange-MCP/build/index.js"],      "env": { "ISE_API_KEY": "your_api_key_here" }    }  }}

Restart Claude Desktop.

Claude Code

sh
claude mcp add indian-stock-exchange --env ISE_API_KEY=your_api_key_here -- node /absolute/path/to/build/index.js

HTTP mode

sh
npm run start:http          # http://127.0.0.1:3000/mcp  (health check: /health)

Stateless Streamable HTTP, bound to localhost by default (HOST and PORT override). It has no authentication, so put it behind a reverse proxy with auth before exposing it beyond your machine.

Development

sh
npm test         # build + unit tests (mocked HTTP, no key needed)npm run smoke    # calls every tool against the live API (needs ISE_API_KEY)
src/  index.ts          entry point: stdio or --http  server.ts         builds the McpServer and registers everything  client.ts         API client: auth, timeout, retry, cache  tools/            stocks, fundamentals, market, funds  prompts.ts        reusable analysis prompts  resources.ts      news, IPO and per-stock resources

Notes

  • Amounts are in INR; market caps are in crore.
  • get-top-gainers/get-top-losers come from the API's trending list, which is BSE-listed; use get-price-shockers with exchange: NSE for NSE.
  • Responses are cached for 60 seconds by default (ISE_CACHE_TTL_MS); history and fundamentals for longer.
  • This server provides information, not investment advice.

License

MIT

来源:README.md,提交 b75b84a

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v2.0.0最新Oct 11, 2026