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
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.
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.
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.
{"mcpServers":{"a-share-mcp":{"command":"uv","args":["--directory","/path/to/a_share_mcp","run","python","mcp_server.py"],"transport":"stdio"}}}