mcp-baostock
MCP server from HuggingAGI/mcp-baostock-server
claude mcp add --transport stdio huggingagi-mcp-baostock-server uvx mcp-baostock-server
How to use
This MCP server provides access to BaoStock-based stock market data through a set of endpoints implemented in Python. It supports querying basic stock information, historical K-line data, industry classifications, dividend information, quarterly financial indicators (profitability, efficiency, growth), index data, and valuation indicators. Once running, you can invoke the server's endpoints to fetch data for specified tickers and time ranges. Use the included examples as guidance for requesting different data types and consult the server's API documentation (if provided) for the exact path names and query parameters.
How to install
Prerequisites:
- Python 3.10+
- baostock
- pandas
Installation steps:
- Create and activate a virtual environment (recommended): python3 -m venv venv source venv/bin/activate # Linux/macOS .\venv\Scripts\activate # Windows
- Install required Python packages: pip install baostock pandas
- Install the MCP BaoStock server package (the server implementation): pip install mcp-baostock-server # if the package name matches the MCP server
- Run the MCP server (as shown in the README): uv run mcp-baostock-server
Notes:
- If you are deploying in a container or different environment, ensure Python 3.10+ is used and dependencies are installed accordingly.
Additional notes
Environment variables and configuration tips:
- Make sure network access to BaoStock APIs is available from your deployment environment.
- If you encounter SSL or certificate issues with external APIs, configure the system trust store or disable strict SSL temporarily (not recommended for production).
- The server may expose multiple endpoints for stock basics, K-line data, industry classifications, dividends, quarterly indicators, indices, and valuations; refer to the API documentation for exact route paths and query parameters.
- For debugging, enable verbose logs if the server supports it and ensure the BaoStock package is up to date.
- If running inside a container, map appropriate ports and provide any necessary API keys or access tokens if the server requires authentication for certain endpoints.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP