← Back to directory
A

A-Share MCP Server

Community
MCP server for China A-share market data and financials via Baostock
Category
Other #42 of 230
Stars
★ 646 Popular
Transport
stdio (local process)
Runtime
Python 3.10+ · Prebuilt binary uv package manager
Credentials
No credential needed
License
MIT
Last commit
⚠
Tools
41
64FMRS · C

This server offers broad coverage (41 tools) for China A-share market, financial, and macroeconomic data queries. Setup requires manually specifying absolute paths and the project was primarily developed/validated on Windows, making it suitable for individual developers and research use, but it lacks authentication and depends on a free third-party data source, so it is not suited for production environments requiring strict data reliability or timeliness.

Strongest · Documentation 16/20 Weakest · Reliability 7/20

Reliability
7/20
Security and permissions
15/20
Maintenance
12/20
Documentation
16/20
Setup experience
14/20
Why each score
Reliability 7/20
The README lists 41 tools with clear categorization, but the repository provides no verifiable test suite, CI configuration, or documented error-handling behavior for cases like missing data, API timeouts, or bad parameters. Since this is a static review with no execution and no test/CI evidence present, the score is capped at 12 per the calibration rule; given the plausible but entirely unverified nature of the claims, a 7 is assigned.
Security and permissions 15/20
The server relies on the free Baostock data source and exposes only read-style market/financial data query tools (K-line, financial statements, macro data, etc.), with no evidence of credential storage, financial transactions, file writes, or irreversible destructive actions, and no apparent need for elevated network egress — so no red-line risk is present. However, the documentation does not explicitly describe permission scoping, data boundaries, input validation, or abuse safeguards, nor does it discuss rate limiting or third-party data compliance, so it falls short of full marks; 15 is given, reflecting incomplete disclosure of scoping/permissions rather than any concrete risk.
Maintenance 12/20
The project carries an MIT license, has meaningful community traction (646 stars, 17 open issues, not archived), and the README documents a recent update (2025-12-25, adding the get_fina_indicator tool), indicating some ongoing maintenance. However, there is no visible release history, commit cadence, issue-response SLA, dependency update policy, or security contact channel, leaving governance and versioning largely undocumented; 12 is given.
Documentation 16/20
The README is fairly comprehensive, covering project structure, prerequisites, Baostock's data update schedule, installation steps (uv venv/uv sync), concrete configuration examples for two mainstream clients (JSON-based IDEs and CherryStudio), and a full categorized list of the 41 tools with Chinese descriptions. It lacks per-tool parameter/return-format documentation, rate-limit details, error codes, or a dedicated troubleshooting section, and non-Windows platform details are sparse; 16 is given.
Setup experience 14/20
Setup steps are clear and short (create a virtual environment, uv sync, then write a JSON or CherryStudio config), with concrete config examples and path-escaping notes that lower the barrier to entry. However, the project was explicitly developed and apparently tested only on Windows ('本项目于 Windows 环境下开发'), with no full verification evidence for macOS/Linux, and there is no automated install script, CI smoke test, or execution evidence to raise confidence; per the static calibration rule this dimension cannot exceed 15, so 14 is given.

Static review · not runListed 2026-08-26

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

Best for

  • Developers who need programmatic access to A-share market and financial data
  • Users doing A-share Q&A or research/analysis through an AI assistant
  • Individuals wanting free A-share data access without a paid data account

Not for

  • High-frequency trading scenarios needing real-time tick-level or order-book data
  • Users needing Hong Kong, US, or other non-A-share market data
  • Institutional production environments with strict requirements on data accuracy/timeliness (data source is the free, unofficial Baostock service)

Required permissions

  • Runs a local Python process launched via uv
  • Outbound network access to fetch market and financial data from Baostock
  • No API keys or account credentials required

Risks and side effects

  • Data comes from the free third-party source Baostock, not officially guaranteed, with update delays (e.g. daily K-line data isn't stored until after 17:30)
  • The project was primarily developed and tested on Windows; cross-platform (macOS/Linux) compatibility is not thoroughly verified
  • No authentication mechanism — any client with access to the MCP server can call all tools and query all data
  • If Baostock's underlying interface changes, some tools may break without official support

Setup

Before you start

Runtime:Python 3.10+ · Prebuilt binary uv package manager

1) Ensure Python 3.10+ and the uv package manager are installed; 2) Clone the repo and run uv venv in the project root to create a virtual environment; 3) Activate it (Windows: .venv\Scripts\activate; macOS/Linux: source .venv/bin/activate); 4) Run uv sync to install dependencies; 5) In an MCP-capable client (Cursor, VS Code, Trae, CherryStudio, etc.), add a stdio MCP server entry with command set to uv (or its absolute path) and args set to --directory, the absolute path to the project root, run, python, mcp_server.py; 6) If the client reports ModuleNotFoundError, also set workingDirectory to the project root's absolute path.

claude_desktop_config.json
{"mcpServers":{"a-share-mcp":{"command":"uv","args":["--directory","/path/to/a_share_mcp","run","python","mcp_server.py"],"transport":"stdio"}}}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "a-share-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/a_share_mcp",
        "run",
        "python",
        "mcp_server.py"
      ],
      "transport": "stdio"
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add a-share-mcp -- uv --directory /path/to/a_share_mcp run python mcp_server.py

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After configuring the client, check that tools like get_historical_k_data appear in the tool list; or ask 'Is today a trading day?' — a result from is_trading_day confirms the connection works.

Troubleshooting

  1. On ModuleNotFoundError, verify `uv sync` was run and try explicitly setting workingDirectory to the project root in the client config
  2. Confirm the uv path in `command` is accessible/executable by the client; use the absolute path to uv.exe if needed
  3. On Windows, escape paths with double backslashes (e.g. `C:\\Users\\...`); macOS/Linux use forward slashes with no escaping needed
  4. If today's data is missing, check Baostock's official data ingestion schedule (e.g. daily K-line after 17:30, minute K-line the next day after 11:00)
  5. In CherryStudio, if the enable toggle appears unresponsive after configuration, navigate to another menu and back to the MCP settings page to refresh the status

Things to try

Once connected, you can ask your AI assistant things like:

  • Fetch the last 30 days of historical K-line data for Kweichow Moutai
  • List all constituents of the CSI 300 index
  • Show me the financial indicator summary for Ping An Bank this quarter
  • Is today a trading day? What is the nearest trading day?

Tools 41

get_historical_k_data read-only
get_stock_basic_info read-only
get_dividend_data read-only
get_adjust_factor_data read-only
get_profit_data read-only
get_operation_data read-only
get_growth_data read-only
get_balance_data read-only
Show 33 more tools
get_cash_flow_data read-only
get_dupont_data read-only
get_performance_express_report read-only
get_forecast_report read-only
get_fina_indicator read-only
get_trade_dates read-only
get_all_stock read-only
search_stocks read-only
get_suspensions read-only
get_stock_industry read-only
get_index_constituents read-only
get_sz50_stocks read-only
get_hs300_stocks read-only
get_zz500_stocks read-only
list_industries read-only
get_industry_members read-only
get_deposit_rate_data read-only
get_loan_rate_data read-only
get_required_reserve_ratio_data read-only
get_money_supply_data_month read-only
get_money_supply_data_year read-only
get_latest_trading_date read-only
get_market_analysis_timeframe read-only
is_trading_day read-only
previous_trading_day read-only
next_trading_day read-only
get_last_n_trading_days read-only
get_recent_trading_range read-only
get_month_end_trading_dates read-only
get_stock_analysis read-only
normalize_stock_code read-only
normalize_index_code read-only
list_tool_constants read-only

Use cases

Query a stock's historical K-line data, adjustment factors, and dividend/distribution records
Retrieve financial indicators such as profitability, growth, and solvency for listed companies
Look up constituents and industry classification for indices like SSE 50, CSI 300, CSI 500
Query macroeconomic data such as deposit/loan rates and money supply
Perform trading-calendar date calculations (previous/next trading day, last N days, etc.)

Supported clients

Claude DesktopPartial support
Cursor
VS Code
Trae
CherryStudio

Listed from the project's documentation, not tested by this site.

Overview

a-share-mcp is an MCP server focused on the China A-share stock market, built on the free Baostock data source. It exposes 41 tools covering stock basic info, historical K-line (candlestick) data, adjustment factors, dividend records, six categories of financial indicators (profitability, operations, growth, solvency, cash flow, DuPont analysis), performance express/forecast reports, index constituents (SSE 50, CSI 300, CSI 500), industry classification, macroeconomic data (deposit/loan rates, reserve requirement ratio, money supply), and trading-calendar/date utilities. It is written in Python, managed with uv, and communicates with MCP clients over stdio.

Similar servers

BioMCP 75 · B

One binary. One grammar. Evidence from the biomedical sources you already trust.

★ 659 · Tools 11 Compare with this →

Source revision 4a2d4b730e13 Data synced 2026-10-19 Read the FMRS scoring method