HuggingAGI
服务介绍
MCP BaoStock Server
A stock data server based on BaoStock, providing multiple interfaces for acquiring stock market data.
Features
- Provides stock basic information queries
- Supports historical K-line data acquisition
- Industry classification data query
- Dividend and bonus data query
- Quarterly financial indicators (profitability, operational capability, growth capability)
- Index data query
- Valuation indicator data query
Installation and Usage
Dependency Requirements
- Python 3.10+
- baostock
- pandas
Usage Instructions
To install and use:
bash
uv run mcp-baostock-server

API Test Cases
Below are sample test cases for each of the APIs:
1. Get Stock Basic Information
python
Obtain basic information about Kweichow Moutai (sh.600519), including listing date, industry classification, etc.
2. Get Historical K-Line Data
python
Acquire daily K-line data for Ping An Bank (sz.000001) from January 1, 2023 to January 31, 2023, using pre-adjusted prices
3. Get Industry Classification Data
python
Query the industry classification information for China Ping An (sh.601318)
4. Get Dividend and Bonus Data
python
View detailed dividend and bonus information for Industrial and Commercial Bank of China (sh.601398) in 2022
5. Get Quarterly Profitability Data
python
Obtain the first quarter 2023 profitability data for Kweichow Moutai, including net profit, gross margin, etc.
6. Get Quarterly Operational Capability Data
python
Analyze the second quarter 2023 operational capability indicators for China Merchants Bank (sh.600036), including accounts receivable turnover rate and inventory turnover rate
7. Get Quarterly Growth Capability Data
python
Evaluate BYD (sz.002594)'s third quarter 2023 growth capability, including revenue growth rate and net profit growth rate
8. Get Index Data
python
Acquire daily index data for CSI 300 (sh.000300) from January 1, 2023 to December 31, 2023
9. Get Valuation Indicator Data
python
Analyze changes in valuation indicators for Alibaba (sh.688699) from the beginning of 2023 to present, including P/E ratio, P/B ratio, etc.
Technical Communication
- WeChat: iamxxn886