BaoStock-based MCP server exposing stock market data APIs: basic info, K-lines, industry classification, dividends, quarterly financial & valuation indicators, index data, etc.
https://github.com/HuggingAGI/mcp-baostock-serverStop wrestling with financial data APIs. This MCP server puts comprehensive Chinese stock market data directly into your LLM's toolkit through clean, structured tool calls.
You know the drill: your AI application needs real market data, but integrating financial APIs means authentication flows, rate limiting, data parsing, and endless documentation. BaoStock MCP server cuts through that complexity by exposing financial data as native LLM tools.
Your models can now directly query stock prices, historical K-line data, financial ratios, and dividend information without you writing a single API integration line.
Real-Time Market Access: Current prices, trading volumes, and market data through simple tool calls Historical Analysis: K-line data with customizable date ranges and technical indicators Financial Fundamentals: Quarterly earnings, profitability ratios, operational metrics, and growth indicators Dividend Intelligence: Comprehensive dividend history and yield calculations Index Tracking: Access to major market indices like SSE 50, CSI 300, and sector-specific indices
Quantitative Research Tools: Build AI assistants that can analyze market trends, calculate technical indicators, and compare stock performance across sectors without manual data gathering.
Investment Advisory Bots: Create conversational AI that can instantly pull up company financials, dividend histories, and valuation metrics during client conversations.
Financial Report Generation: Let your LLM automatically gather the latest financial data, historical performance, and market context when generating investment reports or analysis.
Portfolio Management: Build tools where your AI can track multiple stocks, compare performance metrics, and identify investment opportunities based on real-time market data.
# Get it running in under 30 seconds
git clone https://github.com/HuggingAGI/mcp-baostock-server.git
cd mcp-baostock-server
uv run mcp-baostock-server
Your LLM immediately gains access to tools like:
query_current_price("sh.600519") - Instant price dataquery_history_k_data_plus("sz.000001", "2024-01-01", "2024-12-31") - Historical analysisget_dividend_yield("sh.601318", 2024) - Dividend intelligenceZero Authentication Complexity: No API keys, no OAuth flows, no rate limit management. The server handles BaoStock's session management internally.
Structured Data Out of the Box: Returns clean, pandas-processed data that your LLM can immediately analyze, not raw JSON that needs parsing.
Comprehensive Coverage: Nine different financial data endpoints covering everything from basic company info to complex valuation metrics.
Chinese Market Expertise: Built specifically for Chinese stock exchanges with proper symbol formatting (sh.600519, sz.000001) and local market conventions.
This server works with any MCP-compatible client. Your existing Claude, ChatGPT, or custom LLM setups can immediately start making financial data queries. The server exposes standard MCP tools that integrate seamlessly with your current AI workflows.
Whether you're building financial analysis tools, investment research platforms, or market monitoring systems, this server eliminates the data integration bottleneck that usually slows down financial AI projects.
The Chinese stock market generates massive amounts of data daily. This server puts all of it within one tool call of your LLM.