Complete AI Training

MCP server · Finance and crypto

BaoStock MCP server

by HuggingAGI

Lets your AI look up Chinese stock data like prices, financials, dividends and index history.

Flow diagram: you ask your AI “Show me daily prices for Ping An Bank in January 2023”, the BaoStock MCP server connects it to BaoStock, and you get back your answer in the chat.

This is a small helper that connects your AI to BaoStock, a free source of Chinese stock market data. Once it is set up, you can ask your AI questions about Chinese shares and indexes in plain words and get real numbers back. It is handy for anyone who follows the Chinese market but does not want to click through finance websites by hand.

What is an MCP server? The 30-second version

On its own, your AI can only chat with you. An MCP server is a small helper program that gives your AI a new skill or a connection to an app or service. This one connects your AI to BaoStock, a Chinese stock data service. So when you ask about a share, your AI can go and look it up there for you instead of guessing.

What this MCP server does

You ask your AI a question about a Chinese stock or index in normal words. Your AI passes that request to this helper program. The helper talks to BaoStock and pulls back the data you asked for, like prices, financial figures or dividend records. Then your AI shows you the answer in the chat, often as a list or a small table. You do not have to write any code or open a finance website yourself.

Flow diagram: you ask your AI “Show me daily prices for Ping An Bank in January 2023”, the BaoStock MCP server connects it to BaoStock, and you get back your answer in the chat. Click to zoom

What you can do with it

  • Look up basic details about a Chinese stock, like its listing date and industry
  • Get daily price history (K-line data) for a stock over a date range
  • Check which industry a company belongs to
  • See dividend and payout records for a company in a given year
  • Read quarterly profitability figures such as net profit and gross margin
  • Review quarterly operating and growth figures like revenue growth
  • Get index history, for example the CSI 300 over a full year
  • Check valuation numbers such as price-to-earnings and price-to-book

Try asking your AI

  • “Give me the basic info for Kweichow Moutai, sh.600519”
  • “Show me the daily prices for Ping An Bank sz.000001 from January 1 to January 31 2023”
  • “What industry does Ping An sh.601318 belong to?”
  • “Get me the CSI 300 index sh.000300 daily data for all of 2023”
  • “Show Kweichow Moutai's profitability figures for the first quarter of 2023”

What it gives back to you

You get back lists of numbers and short summaries in the chat. For prices you get rows of dates with open, close, high and low values. For financials you get the figures you asked about, like net profit or gross margin. For company info you get plain facts such as listing date and industry.

Before you start

What you need

  • Python 3.10 or newer installed on your computer
  • The baostock and pandas packages (the setup steps install these for you)
  • A tool called uv to run the server, if you follow the README command

Good to know

The data comes from BaoStock and may be delayed or incomplete, so do not treat it as live trading information.

Install it with your AI

Add BaoStock MCP server to your AI, no technical skills needed

You don't install anything by hand. You copy one prompt, paste it into an AI that can work on your computer, and it checks, installs and connects the server for you, asking you when it needs something.

Sign in to get the install prompt

Members get a ready-made prompt that lets the Claude desktop app check BaoStock MCP server, install it and connect it for them, step by step. You don't need any technical skills: you copy, paste and answer a few questions. Your connected AI can also find and install any of the 4,066 MCP servers here for you.

Sign in Become a member

Who it's for

People who follow Chinese stocks, like analysts, finance students or anyone curious about the Chinese market who prefers asking their AI instead of browsing data sites.