MCP BaoStock Server

by MCP-Mirror

523 downloads
Not rated
GitHub

About

A stock data server built on BaoStock that provides multiple MCP interfaces for querying Chinese stock market data, including basic info, historical K-line data, industry classification, dividends, quarterly financial indicators, index data, and valuation metrics.

Details

Author
MCP-Mirror
Downloads
523
Categories
Other

- Query stock basic information (listing date, industry)
- Retrieve historical daily K-line data (with forward adjustment)
- Look up industry classification for a stock
- Get dividend and bonus distribution records
- Access quarterly profitability, operational, and growth metrics
- Fetch index data (e.g., CSI 300 daily line)
- Obtain valuation indicators (P/E, P/B, etc.)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP BaoStock Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies (Python 3.10+, baostock, pandas) and run the server with uv run mcp-baostock-server. The server exposes nine MCP tools, each demonstrated with Python test cases for specific stocks and date ranges.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp baostock server": {
            "HuggingAGI_mcp-baostock-server": {
                "command": "uv",
                "args": [
                    "run",
                    "mcp-baostock-server"
                ]
            }
        }
    }
}

McpServers

{
    "HuggingAGI_mcp-baostock-server": {
        "command": "uv",
        "args": [
            "run",
            "mcp-baostock-server"
        ]
    }
}

MCP BaoStock Server

一个基于BaoStock的股票数据服务器,提供了多个接口用于获取股票市场数据。

功能特点

- 提供股票基本信息查询
- 支持K线历史数据获取
- 行业分类数据查询
- 分红派息数据查询
- 季度财务指标数据(盈利能力、营运能力、成长能力)
- 指数数据查询
- 估值指标数据查询

安装与使用

依赖要求

- Python 3.10+
- baostock
- pandas

使用说明

安装使用

uv run mcp-baostock-server

接口测试用例

以下是各个接口的测试用例示例:

1. 获取股票基本信息

```python
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.