Skip to content

Tools & Resources

stock-sdk-mcp provides 32 MCP Tools and 7 MCP Resources, covering all core features of stock-sdk.

MCP Tools

Real-time Quotes

ToolDescription
get_quotes_by_queryRecommended — Get quotes by name, code, or pinyin with auto market detection
get_a_share_quotesGet A-share / index real-time quotes (40+ fields)
get_hk_quotesGet HK stock real-time quotes
get_us_quotesGet US stock real-time quotes
get_fund_quotesGet mutual fund real-time NAV
get_all_a_share_quotesGet whole-market A-share quotes (5000+ stocks)
get_all_hk_quotesGet whole-market HK stock quotes (2000+ stocks)
get_all_us_quotesGet whole-market US stock quotes (8000+ stocks)

K-line Data

ToolDescription
get_history_klineGet A-share historical K-line (daily / weekly / monthly)
get_hk_history_klineGet HK stock historical K-line
get_us_history_klineGet US stock historical K-line
get_minute_klineGet A-share minute K-line (1 / 5 / 15 / 30 / 60 minutes)
get_today_timelineGet A-share today's timeline
get_kline_with_indicatorsKey — Get K-line with technical indicators (MA / MACD / BOLL / KDJ / RSI etc.)

Key Tool: get_kline_with_indicators

This is the most important tool for AI. Regular APIs only return raw OHLC data, making it difficult for AI to calculate indicators like MACD or RSI directly. This tool performs indicator calculations on the server side, so each data point already includes ma5, ma20, macd_dif, macd_dea, rsi, kdj, and other fields ready for analysis.

Sector Data

ToolDescription
get_industry_listGet industry sector list
get_industry_spotGet industry sector real-time quotes
get_industry_constituentsGet industry sector constituents
get_industry_klineGet industry sector K-line
get_concept_listGet concept sector list
get_concept_spotGet concept sector real-time quotes
get_concept_constituentsGet concept sector constituents
get_concept_klineGet concept sector K-line

Code Lists

ToolDescription
get_a_share_code_listGet all A-share codes (5000+ stocks)
get_hk_code_listGet all HK stock codes (2000+ stocks)
get_us_code_listGet all US stock codes (8000+ stocks)
get_fund_code_listGet all fund codes (26000+ funds)
ToolDescription
search_stockSearch stocks (supports code, name, pinyin fuzzy matching)

Extended Features

ToolDescription
get_fund_flowGet stock / sector fund flow
get_panel_large_orderGet large order ratio
get_trading_calendarGet A-share trading calendar
get_dividend_detailGet dividend details

MCP Resources

MCP Resources are static data that AI can proactively read without calling a Tool:

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

Usage Examples

After configuring the MCP Server, simply type natural language in your AI chat:

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

Fetch Tencent (00700) daily K-line for the last 30 days with MACD and Bollinger Bands

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

Get real-time quotes for all STAR Market stocks, sorted by gain

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

Released under the ISC License.