A-share financial data server
Top 84.4% on sourcepulse
This project provides a Model Context Protocol (MCP) server specifically designed for the A-share stock market. It offers comprehensive data querying capabilities, including stock fundamentals, historical K-line data, financial metrics, and macroeconomic indicators, aiming to answer virtually any question about the A-share market for researchers and financial analysts.
How It Works
The server leverages the Baostock API as its primary data source, ensuring no cost for data access. It is built with Python and utilizes uv
for package management. The architecture includes a main server entry point (mcp_server.py
), a data source interface, and various modules for data formatting and specific market tools (stock market, financial reports, indices, macroeconomic data). This modular design facilitates extensibility and maintainability.
Quick Start & Requirements
uv sync
within a virtual environment created by uv venv
.uv run python mcp_server.py
with appropriate working directory arguments.Highlighted Details
stdio
transport for MCP clients.Maintenance & Community
The project welcomes contributions via Issues or Pull Requests. A "buy me a coffee" link is available for donations.
Licensing & Compatibility
The project is licensed under the MIT License, permitting commercial use and integration with closed-source projects.
Limitations & Caveats
Data availability is subject to Baostock's update schedule; real-time data might not be immediately accessible after market close. The project was primarily developed and tested on Windows, though macOS/Linux configurations are mentioned.
1 week ago
Inactive