Skip to main content
Glama
24mlight

A-Share MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
get_historical_k_dataA
    Fetches historical K-line (OHLCV) data for a Chinese A-share stock.

    Args:
        code: The stock code in Baostock format (e.g., 'sh.600000', 'sz.000001').
        start_date: Start date in 'YYYY-MM-DD' format.
        end_date: End date in 'YYYY-MM-DD' format.
        frequency: Data frequency. Valid options (from Baostock):
                     'd': daily
                     'w': weekly
                     'm': monthly
                     '5': 5 minutes
                     '15': 15 minutes
                     '30': 30 minutes
                     '60': 60 minutes
                   Defaults to 'd'.
        adjust_flag: Adjustment flag for price/volume. Valid options (from Baostock):
                       '1': Forward adjusted (后复权)
                       '2': Backward adjusted (前复权)
                       '3': Non-adjusted (不复权)
                     Defaults to '3'.
        fields: Optional list of specific data fields to retrieve (must be valid Baostock fields).
                If None or empty, default fields will be used (e.g., date, code, open, high, low, close, volume, amount, pctChg).
        limit: Max rows to return. Defaults to 250.
        format: Output format: 'markdown' | 'json' | 'csv'. Defaults to 'markdown'.

        Returns:
            A Markdown formatted string containing the K-line data table, or an error message.
            The table might be truncated if the result set is too large.
        
get_stock_basic_infoA
    Fetches basic information for a given Chinese A-share stock.

    Args:
        code: The stock code in Baostock format (e.g., 'sh.600000', 'sz.000001').
        fields: Optional list to select specific columns from the available basic info
                (e.g., ['code', 'code_name', 'industry', 'listingDate']).
                If None or empty, returns all available basic info columns from Baostock.

    Returns:
        Basic stock information in the requested format.
    
get_dividend_dataA
    Fetches dividend information for a given stock code and year.

    Args:
        code: The stock code in Baostock format (e.g., 'sh.600000', 'sz.000001').
        year: The year to query (e.g., '2023').
        year_type: Type of year. Valid options (from Baostock):
                     'report': Announcement year (预案公告年份)
                     'operate': Ex-dividend year (除权除息年份)
                   Defaults to 'report'.

    Returns:
        Dividend records table.
    
get_adjust_factor_dataA
    Fetches adjustment factor data for a given stock code and date range.
    Uses Baostock's "涨跌幅复权算法" factors. Useful for calculating adjusted prices.

    Args:
        code: The stock code in Baostock format (e.g., 'sh.600000', 'sz.000001').
        start_date: Start date in 'YYYY-MM-DD' format.
        end_date: End date in 'YYYY-MM-DD' format.

    Returns:
        Adjustment factors table.
    
get_profit_dataD

Quarterly profitability data.

get_operation_dataD

Quarterly operation capability data.

get_growth_dataD

Quarterly growth capability data.

get_balance_dataD

Quarterly balance sheet data.

get_cash_flow_dataC

Quarterly cash flow data.

get_dupont_dataD

Quarterly Dupont analysis data.

get_performance_express_reportC

Performance express report within date range.

get_forecast_reportC

Earnings forecast report within date range.

get_fina_indicatorA
    Aggregated financial indicators from 6 Baostock APIs into one convenient query.

    **Data is returned by QUARTER** (Q1, Q2, Q3, Q4) based on financial report dates.
    Input date range determines which quarters to fetch.

    Combines data from:
    - 盈利能力 (Profitability): roeAvg, npMargin, gpMargin, epsTTM
    - 营运能力 (Operation): NRTurnRatio, INVTurnRatio, CATurnRatio
    - 成长能力 (Growth): YOYNI, YOYEquity, YOYAsset
    - 偿债能力 (Solvency): currentRatio, quickRatio, liabilityToAsset
    - 现金流量 (Cash Flow): CFOToOR, CFOToNP, CAToAsset
    - 杜邦分析 (DuPont): dupontROE, dupontAssetTurn, dupontPnitoni

    Output columns include prefixes: profit_*, operation_*, growth_*,
    balance_*, cashflow_*, dupont_* to distinguish data sources.
    
get_stock_industryC

Get industry classification for a specific stock or all stocks on a date.

get_sz50_stocksD

SZSE 50 constituents.

get_hs300_stocksD

CSI 300 constituents.

get_zz500_stocksD

CSI 500 constituents.

get_index_constituentsC

Generic index constituent fetch (hs300/sz50/zz500).

list_industriesC

List distinct industries for a given date.

get_industry_membersC

Get all stocks in a given industry on a date.

get_trade_datesA
    Fetch trading dates within a specified range.

    Args:
        start_date: Optional. Start date in 'YYYY-MM-DD' format. Defaults to 2015-01-01 if None.
        end_date: Optional. End date in 'YYYY-MM-DD' format. Defaults to the current date if None.

    Returns:
        Markdown table with 'is_trading_day' (1=trading, 0=non-trading).
    
get_all_stockC
    Fetch a list of all stocks (A-shares and indices) and their trading status for a date.

    Args:
        date: Optional. The date in 'YYYY-MM-DD' format. If None, uses the current date.

    Returns:
        Markdown table listing stock codes and trading status (1=trading, 0=suspended).
    
search_stocksA
    Search stocks by code substring on a date.

    Args:
        keyword: Substring to match in the stock code (e.g., '600', '000001').
        date: Optional 'YYYY-MM-DD'. If None, uses current date.
        limit: Max rows to return. Defaults to 50.
        format: Output format: 'markdown' | 'json' | 'csv'. Defaults to 'markdown'.

    Returns:
        Matching stock codes with their trading status.
    
get_suspensionsA
    List suspended stocks for a date.

    Args:
        date: Optional 'YYYY-MM-DD'. If None, uses current date.
        limit: Max rows to return. Defaults to 250.
        format: Output format: 'markdown' | 'json' | 'csv'. Defaults to 'markdown'.

    Returns:
        Table of stocks where tradeStatus==0.
    
get_deposit_rate_dataD

Benchmark deposit rates.

get_loan_rate_dataD

Benchmark loan rates.

get_required_reserve_ratio_dataD

Required reserve ratio data.

get_money_supply_data_monthC

Monthly money supply data.

get_money_supply_data_yearC

Yearly money supply data.

get_latest_trading_dateB

Get the latest trading date up to today.

get_market_analysis_timeframeD

Return a human-friendly timeframe label.

is_trading_dayC

Check if a specific date is a trading day.

previous_trading_dayC

Get the previous trading day before the given date.

next_trading_dayC

Get the next trading day after the given date.

get_last_n_trading_daysC

Return the last N trading dates.

get_recent_trading_rangeB

Return a date range string covering the recent N trading days.

get_month_end_trading_datesB

Return month-end trading dates for a given year.

get_stock_analysisB
    提供基于数据的股票分析报告,而非投资建议。

    Args:
        code: 股票代码,如'sh.600000'
        analysis_type: 'fundamental'|'technical'|'comprehensive'
    
normalize_stock_codeC

Normalize a stock code to Baostock format.

normalize_index_codeC

Normalize common index codes to Baostock format.

list_tool_constantsB
    List valid constants for tool parameters.

    Args:
        kind: Optional filter: 'frequency' | 'adjust_flag' | 'year_type' | 'index'. If None, show all.
    

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/24mlight/a-share-mcp-is-just-i-need'

If you have feedback or need assistance with the MCP directory API, please join our Discord server