china-stock
MCP server from peikuo/china-stock-mcp-server
claude mcp add --transport stdio peikuo-china-stock-mcp-server python main.py
How to use
China Stock MCP Server provides a unified API to access real-time and historical Chinese stock market data via the AKShare integration. Once the server is running, clients can query a variety of endpoints for A-shares, B-shares, indices, ETFs, and related market data such as real-time quotes, historical prices (daily, minute, tick), and fundamental information. The server exposes multiple MCP endpoints that map to AKShare functions, enabling developers to build apps that fetch live quotes, historical data, company fundamentals, and market intelligence without needing to manage multiple data sources. Typical usage involves starting the MCP server and then issuing requests to the configured endpoints to retrieve the data you need, for example real-time spot data or daily price history for a given symbol.
How to install
Prerequisites:
- Python 3.8+ (recommended 3.9+)
- Git
- Internet access to install dependencies from PyPI
Installation steps:
-
Clone the repository: git clone https://github.com/yourusername/china-stock-mcp.git cd china-stock-mcp/china-stock-mcp-server
-
Create and activate a virtual environment: python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies: pip install -r requirements.txt
-
Run the server: python main.py
Notes:
- Ensure your environment has network access to fetch data from AKShare-supported sources.
- If you modify dependencies or Python version, re-create the virtual environment as needed.
Additional notes
Tips and considerations:
- The server relies on AKShare for data access; data availability may vary by exchange and data type. If a data source is temporarily unavailable, the corresponding endpoint may fail or return partial data.
- Check for updates in AKShare compatibility when upgrading Python or dependencies.
- If you plan to deploy in production, consider using a process manager (e.g., systemd, PM2) and enable logging to monitor uptime and data freshness.
- For environment-specific configuration (e.g., proxies, API keys if required by AKShare adapters), set the appropriate environment variables prior to launching the server.
- Review the API documentation within the server for endpoint names, parameters, and return formats to integrate with your applications smoothly.
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