Content
# MCP BaoStock Server
A stock data server based on BaoStock, providing multiple interfaces for obtaining stock market data.
## Features
- Provides stock basic information queries
- Supports historical K-line data retrieval
- Industry classification data queries
- Dividend data queries
- Quarterly financial metrics data (profitability, operational capability, growth capability)
- Index data queries
- Valuation metrics data queries
## Installation and Usage
### Dependency Requirements
- Python 3.10+
- baostock
- pandas
### Usage Instructions
To run the server, use the following command:
```bash
uv run mcp-baostock-server
```

## API Test Cases
Here are examples of test cases for each interface:
### 1. Get Basic Stock Information
```python
# Retrieve basic information for Kweichow Moutai (sh.600519), including listing date, industry classification, and other basic data
```
### 2. Get Historical K-line Data
```python
Retrieve daily K-line data for Ping An Bank (sz.000001) from January 1, 2023, to January 31, 2023, using the adjusted for previous dividends method
```
### 3. Get Industry Classification Data
```python
Query the industry classification information for China Ping An (sh.601318)
```
### 4. Get Dividend Data
```python
View detailed dividend information for Industrial and Commercial Bank of China (sh.601398) in 2022
```
### 5. Get Quarterly Profitability Data
```python
Retrieve profitability data for Kweichow Moutai in the first quarter of 2023, including net profit, gross margin, and other metrics
```
### 6. Get Quarterly Operational Capability Data
```python
Analyze the operational capability metrics for China Merchants Bank (sh.600036) in the second quarter of 2023, including accounts receivable turnover and inventory turnover
```
### 7. Get Quarterly Growth Capability Data
```python
Evaluate the growth capability of BYD (sz.002594) in the third quarter of 2023, including revenue growth rate and net profit growth rate
```
### 8. Get Index Data
```python
Retrieve daily market data for the CSI 300 Index (sh.000300) from January 1, 2023, to December 31, 2023
```
### 9. Get Valuation Metrics Data
```python
Analyze the changes in valuation metrics for Alibaba (sh.688699) from the beginning of 2023 to the present, including price-to-earnings ratio and price-to-book ratio
```
## Technical Communication
- WeChat: iamxxn886
You Might Also Like
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
solana-agent-kit
An open-source toolkit for AI agents to interact with Solana protocols.

Stripe
The Stripe Agent Toolkit integrates agent frameworks with Stripe APIs for...
debugg-ai-mcp
AI-powered MCP Server for testing, debugging, and code analysis.
aws-lambda-mcp-cookbook
AWS Lambda MCP Cookbook provides Python examples for MCP server integration.
mcp-server-macos-use
MCP server in Swift for controlling macOS apps via accessibility APIs.