stock-nse-india
Market data from the National Stock Exchange of India: quotes, history, option chains and reports
Market data for China A-shares, Hong Kong and US stocks, funds, futures and options over MCP
By Link (individual) TypeScript Local · stdio Finance and paymentsData and analytics
73 popularity score ★ 2.0k ↓ 1.9k/wk
Opens the app, which asks before it adds the server.
claude mcp add stock-sdk -- npx -y stock-sdk mcp{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": [
"-y",
"stock-sdk",
"mcp"
]
}
}
}{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": [
"-y",
"stock-sdk",
"mcp"
]
}
}
}{
"servers": {
"stock-sdk": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"stock-sdk",
"mcp"
]
}
}
}[mcp_servers.stock-sdk]
command = "npx"
args = ["-y", "stock-sdk", "mcp"]gemini mcp add --scope user stock-sdk npx -- -y stock-sdk mcpSTOCK_SDK_MCP_TOOLS |
Optional: Which tools to expose: core (default, 26 tools), full (all 93) or a comma-separated list of tool names. |
|---|---|
STOCK_SDK_MCP_PROMPTS |
Optional: Which built-in prompts (AI Skills) to expose: core (default), full or a comma-separated list. |
STOCK_SDK_MCP_TIMEOUT |
Optional: Request timeout in milliseconds for the upstream data calls; the SDK default applies when unset. |
stock-sdk is a zero-dependency JavaScript/TypeScript library for stock market data, and since v2 its npm package also ships a command-line tool and a built-in MCP server started with `stock-sdk mcp`. The server speaks MCP over stdio only and opens no network port; its protocol layer is written by hand rather than with the official MCP SDK.
Every tool maps to a read-only method of the library: real-time and historical quotes and candles for China A-shares, Hong Kong and US stocks and Chinese mutual funds, technical indicators and signal detection, holder cost distribution, industry and concept sectors, money flow, Stock Connect northbound data, limit-up pools, the dragon-tiger list, block trades, margin data, domestic and global futures, exchange options, fund details and a trading calendar. The data is pulled live from public finance endpoints such as Tencent Finance and East Money; for A-share candles it falls back to Tencent and then Sina when East Money throttles. It is aimed above all at the Chinese market, and many tool descriptions and field names are in Chinese.
The tool set is chosen with `STOCK_SDK_MCP_TOOLS`. At v2.4.6 the source registers 93 tools, of which 26 are marked core and exposed by default; `full` exposes all of them, or a comma-separated list picks individual tools. The README says 92, and the docs' overview page says the server offers tools only, but the v2.4.6 server also serves MCP prompts ("AI Skills" such as `analyze_stock`), filtered the same way by `STOCK_SDK_MCP_PROMPTS` (src/spec/methods.ts, src/mcp/server.ts).
| Runtime | Node.js 18+ |
|---|
Node.js 18 or later with npx (the package is run from npm). No account, API key or sign-in. The machine needs outbound internet access to the public finance endpoints (Tencent Finance, East Money, Sina) it pulls data from.
Quotes come from public endpoints and are not exchange-matched real time: its README says they usually lag by tens of seconds to minutes and are not suited to high-frequency trading decisions. Only 26 of the 93 tools are on unless STOCK_SDK_MCP_TOOLS=full is set; a prompt that needs a non-core tool fails until it is enabled. Coverage is uneven by market: block trades and margin data are A-share only, and Hong Kong and US calendars give market status only. Transport is stdio only, with no HTTP/SSE or resources. No trading or account access: the raw passthrough method is deliberately not exposed as a tool. Upstream endpoints can rate-limit, which the SDK handles with retries and fallbacks.
Suits developers, analysts and hobby investors who want an assistant to pull Chinese A-share, Hong Kong, US stock, fund, futures or options data, sector and money-flow figures, or indicator-based signals, without an API key or paid data plan, running locally through npx. It is read-only, so it cannot place orders or see a brokerage account. It is not official from any exchange or data vendor, relies on unofficial public endpoints that can change or throttle, and has delayed quotes, so pick a licensed market-data feed when you need guaranteed, real-time or redistributable data. Its strongest coverage is mainland China; for mostly US data a US-focused data server may fit better.
get_a_share_quotesget_hk_quotesget_us_quotesget_fund_quotesget_today_timelineget_history_klineget_minute_klineget_hk_history_klineget_us_history_klineget_kline_with_indicatorsget_kline_signalsget_chip_distributionget_industry_listget_industry_constituentsget_concept_listget_concept_constituentsget_futures_klineget_individual_fund_flowget_fund_flow_rankget_northbound_flow_summaryget_zt_poolget_dragon_tiger_detailget_theme_listis_trading_dayget_market_statussearchget_a_share_simple_quotesget_fund_flowget_panel_large_orderget_a_share_code_listget_hk_code_listget_us_code_listget_fund_code_listget_all_a_share_quotesget_all_hk_quotesget_all_us_quotesget_quotes_by_codesget_hk_minute_klineget_us_minute_klineget_hk_chip_distributionget_us_chip_distributionget_industry_spotget_industry_klineget_concept_spotget_concept_klineget_etf_option_daily_klineget_cffex_option_quotesget_global_futures_spotget_futures_inventoryget_comex_inventoryget_market_fund_flowget_sector_fund_flow_rankget_northbound_holding_rankget_stock_changesget_unusual_fluctuationget_block_trade_detailget_margin_target_listget_fund_nav_historyget_fund_profileget_trading_calendar