Skip to content

Tools & Resources

stock-sdk-mcp (v0.2.x) provides 69 MCP Tools, 7 static Resources + 4 Resource Templates, 6 Prompts, and 5 Skills, covering all core features of stock-sdk. Every tool carries semantic annotations (readOnlyHint / openWorldHint).

MCP Tools

Real-time Quotes (8)

ToolDescription
get_quotes_by_query[Recommended] Query by name, code, or pinyin; auto-detects A-share / HK / US
get_a_share_quotesA-share / index real-time quotes (40+ fields)
get_hk_quotesHK stock real-time quotes
get_us_quotesUS stock real-time quotes
get_fund_quotesMutual fund real-time NAV
get_all_a_share_quotes[Batch] All A-share quotes (5000+, filterable by market)
get_all_hk_quotes[Batch] All HK quotes (2000+)
get_all_us_quotes[Batch] All US quotes (8000+, filterable by market)

K-line Data (6)

ToolDescription
get_history_klineA-share historical K-line (daily / weekly / monthly)
get_hk_history_klineHK historical K-line
get_us_history_klineUS historical K-line
get_minute_klineA-share minute K-line (1 / 5 / 15 / 30 / 60 min)
get_today_timelineA-share intraday timeline
get_kline_with_indicators[Core] K-line with indicators (MA / MACD / BOLL / KDJ / RSI, computed server-side; A / HK / US)

Key tool: get_kline_with_indicators

The most useful tool for AI. Plain quote APIs only return raw OHLC, which AI struggles to turn into MACD or RSI. This tool computes indicators server-side, so each candle already carries ma5, ma20, macd, kdj, rsi — ready for analysis.

Search (1)

ToolDescription
search_stockSearch stocks (fuzzy by code / name / pinyin, cross-market)

Code Lists (4)

ToolDescription
get_a_share_code_listAll A-share codes (5000+, filterable by market)
get_hk_code_listAll HK codes (2000+)
get_us_code_listAll US codes (8000+, filterable by market)
get_fund_code_listAll fund codes (26000+)

Industry / Concept Sectors (10)

ToolDescription
get_industry_list / get_concept_listIndustry / concept sector list (name, code, change, leading stock)
get_industry_spot / get_concept_spotSector real-time quotes
get_industry_constituents / get_concept_constituentsSector constituents
get_industry_kline / get_concept_klineSector historical K-line (adjust supported)
get_industry_minute_kline / get_concept_minute_klineSector minute K-line / timeline

Fund Flow (5)

ToolDescription
get_fund_flowSingle-day fund flow for a stock / sector (main vs retail net inflow & ratio)
get_stock_fund_flow_historyHistorical fund flow for a stock (super-large / large / medium / small orders)
get_market_fund_flowMarket-wide (SH + SZ) fund flow
get_fund_flow_rankFund flow ranking (scope = stock / sector)
get_sector_fund_flow_historyHistorical fund flow for a single sector

Northbound / Stock Connect (3)

ToolDescription
get_northbound_realtimeNorthbound / southbound real-time (intraday curve + summary)
get_northbound_historyNorthbound history (scope = market / stock holdings)
get_northbound_holding_rankNorthbound holdings ranking by stock

Limit-Up Pool / Stock Changes (3)

ToolDescription
get_zt_poolLimit-up pools (6 pools: limit-up / yesterday / strong / sub-new / broken / limit-down; historical dates)
get_stock_changesIntraday stock changes (22 types: rocket launch / large buy / sealed limit-up / 60-day high, etc.)
get_board_changesToday's sector changes

Dragon-Tiger List (3)

ToolDescription
get_dragon_tiger_listDragon-Tiger detail (by date range, with reason & buy/sell amounts)
get_dragon_tiger_statsDragon-Tiger stats (type = stock / institution / branch)
get_dragon_tiger_seat_detailPer-stock seat detail for a date (buy & sell lists)

Block Trade / Margin Trading (2)

ToolDescription
get_block_tradeBlock trades (type = overview / detail / daily stat)
get_margin_dataMargin trading (type = account stats / target list)

Futures (6)

ToolDescription
get_futures_klineDomestic futures historical K-line (with open interest)
get_global_futures_spotGlobal futures real-time (crude / gold / copper, etc.)
get_global_futures_klineGlobal futures historical K-line
get_futures_inventory_symbolsList of inventory-queryable futures symbols
get_futures_inventoryFutures warehouse / inventory data
get_comex_inventoryCOMEX gold / silver inventory

Options (10)

ToolDescription
get_index_option_spotIndex option T-quotes (CSI 300 / CSI 1000, etc.)
get_index_option_klineIndex option contract daily K-line
get_cffex_option_quotesCFFEX option real-time list
get_etf_option_monthsETF option available contract months
get_etf_option_expire_dayETF option expiry info
get_etf_option_minuteETF option intraday minute data
get_etf_option_daily_klineETF option contract daily K-line
get_commodity_option_spotCommodity option T-quotes
get_commodity_option_klineCommodity option daily K-line
get_option_lhbOption Dragon-Tiger list

Compound Analysis (5, multi-step in one call)

ToolDescription
analyze_stockFull stock analysis (quote + indicator K-line + fund flow + northbound + dividends)
compare_stocksMulti-stock comparison (quotes + recent indicators side by side)
scan_marketScreening (server-side filter by change / volume ratio / turnover / PE)
get_market_overviewMarket overview (indices + sector TOP10 + advancers/decliners + northbound + changes)
get_sector_analysisSector deep-dive (quote + K-line + leading stocks)

Extended (3)

ToolDescription
get_panel_large_orderLarge / small order buy-sell ratio
get_trading_calendarA-share trading calendar
get_dividend_detailDividend details (bonus / transfer, ex-date, pay date, 20+ fields)

MCP Resources

Static data resources the AI can read directly without calling a Tool (7 total):

URIDescription
stock://calendar/tradingA-share trading calendar
stock://market/a-share/codesA-share code list
stock://market/hk/codesHK code list
stock://market/us/codesUS code list
stock://market/fund/codesFund code list
stock://board/industry/listIndustry sector list
stock://board/concept/listConcept sector list

Resource Templates

Parameterized resource templates for reading dynamic data via URI (4 total):

URI TemplateDescriptionExample
stock://quotes/{code}Single-stock real-time quotestock://quotes/sh600519
stock://kline/{code}/{period}Single-stock K-linestock://kline/600519/daily
stock://board/industry/{code}Industry sector detail (quote + top constituents)stock://board/industry/BK1027
stock://board/concept/{code}Concept sector detail (quote + top constituents)stock://board/concept/BK0800

Usage Examples

Once the MCP Server is configured, just type natural language in your AI chat:

Get me the real-time quote for Kweichow Moutai (600519)

Get Tencent's (00700) last 30 daily candles and compute MACD and Bollinger Bands

Show the constituents of the AI concept sector and today's top 5 gainers

Get all STAR Market stocks sorted by gain

What's Apple's recent RSI? Is it overbought?

Show me the rebar futures main contract trend and recent COMEX gold inventory

Track today's smart money: what are northbound funds, Dragon-Tiger institutions, and block trades buying?

Released under the ISC License.