CN A-Stock Data MCP

CN A-Stock Data MCP exposes Chinese equity reference, financial and technical-indicator data through a Python HTTP server backed by an MSD database.

Remote serverstreamable-httpPython

What is the CN A-Stock Data MCP Server?

CN A-Stock Data MCP exposes Chinese equity reference, financial and technical-indicator data through a Python HTTP server backed by an MSD database.

Choose the needed data depth

The project implements brief, medium and full tools. Brief supplies basic and market data, medium adds financial information, and full includes technical indicators. These are data retrieval interfaces for an assistant, not a trading or brokerage connection.

Prepare the data backend

Self-hosting requires an MSD database populated with the documented price, dividend, share, financial and capital-flow tables. The repository uses py-alpha-lib for indicator calculation. Configure MSD_HOST for that database and launch the implemented HTTP server. Current project metadata requires Python 3.14 or later.

Verify coverage before analysis

Start with a known stock code and compare the response with the database rows and chosen market reference. Check units, corporate-action treatment and available history before asking the assistant to summarize an indicator. A sample database does not represent complete current market coverage. The README's public test address uses plain HTTP; use a controlled deployment for operational access instead of treating that demo as an authenticated production data service.

Project documentation

Repository and setup guide

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
brief给定股票的基本信息,行情数据
medium提供所有基本数据和一些财务数据
full提供所有中等数据和技术指标

How to install the CN A-Stock Data MCP Server

uv run main.py --transport=http

Run from the source checkout after preparing the MSD database and configuring MSD_HOST. Connect the client to your own deployment’s /mcp endpoint.

Configuration

Python 3.14 or later, uv, the populated MSD database and the project’s indicator dependencies.

VariableDescriptionRequired
MSD_HOSTURL of the MSD database used by the self-hosted service.Yes

Example prompts to try

  • “Use 中国股票数据 to brief.”
  • “Use 中国股票数据 to medium.”
  • “Use 中国股票数据 to full.”

Frequently asked questions

The documented tools retrieve equity data and indicators. They do not provide brokerage execution.