get_historical_k_dataLABSCO SUMMARY
Having macro series beside company financials is what makes this answer questions rather than return numbers.
A-share analysis leans on the macro backdrop more than most markets, and normally that means one source for the company and another for the policy environment. Both behind one connection means a question can span them without you stitching series together by hand. Built on a free data source, so treat coverage and revision history as you would any free feed — check before anything depends on it.
What it is
A data server for the Chinese A-share market, built on Baostock, covering both company-level and macroeconomic series.
What you get
- Company basic information
- Historical K-line data
- Financial indicators
- Macroeconomic data
Requirements
Python and the uv package manager. MIT licensed. Documentation is in Chinese.
Setup effort
Build from source
USE CASES
Looking at one listed company
Basics, K-lines and financial indicators together.
Putting it in context
Macro series from the same connection.
41 tools
Listed in project docs. Your client may show a different list.
get_stock_basic_infoget_dividend_dataget_adjust_factor_dataget_profit_dataget_operation_dataget_growth_dataget_balance_dataget_cash_flow_dataget_dupont_dataget_performance_express_reportget_forecast_reportget_fina_indicatorget_trade_datesget_all_stocksearch_stocksget_suspensionsget_stock_industryget_index_constituentsget_sz50_stocksget_hs300_stocksget_zz500_stockslist_industriesget_industry_membersget_deposit_rate_dataget_loan_rate_dataget_required_reserve_ratio_dataget_money_supply_data_monthget_money_supply_data_yearget_latest_trading_dateget_market_analysis_timeframeis_trading_dayprevious_trading_daynext_trading_dayget_last_n_trading_daysget_recent_trading_rangeget_month_end_trading_datesget_stock_analysisnormalize_stock_codenormalize_index_codelist_tool_constantsBEFORE YOU INSTALL
What to know first
Tools you get
41 tools named in the project's documentation.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/24mlight/a-share-mcp-is-just-i-need
cd a-share-mcp-is-just-i-need1. Create the virtual environment (this only creates it — nothing is installed yet)
uv venv2. Activate it — Windows
.venv\Scripts\activate2. Activate it — macOS/Linux
source .venv/bin/activate3. Install all dependencies (run this inside the activated environment)
uv syncMCP Clients
Cherry Studio
Name: a-share-mcp (or any name you like)
Type: Standard input/output (stdio)
Command:
uvArguments, each on its own line, in this order: --directory, the absolute path of your a-share-mcp-is-just-i-need folder, run, python, mcp_server.py
Environment variables: usually left empty
Cursor
{
"mcpServers": {
"a-share-mcp": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_A_SHARE_MCP_IS>",
"run",
"python",
"mcp_server.py"
],
"transport": "stdio"
}
}
}<YOUR_PATH_TO_A_SHARE_MCP_IS> is the absolute path of the folder git clone created. On Windows write it with doubled backslashes, e.g. C:\\Users\\YourName\\Projects\\a-share-mcp-is-just-i-need.