A Multi-Call Protocol server providing comprehensive access to Chinese stock market data through a unified API, leveraging AKShare to fetch real-time and historical data from various Chinese exchanges.
China Stock MCP Server is a Multi-Call Protocol (MCP) server that provides comprehensive access to Chinese stock market data through a unified API. It leverages the AKShare library to fetch real-time and historical data from various Chinese stock exchanges including Shanghai (SSE), Shenzhen (SZSE), and Beijing (BSE).
# 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
The server exposes numerous endpoints for accessing different types of stock market data. Each function is well-documented with parameter descriptions and return value formats. Some key functions include:
stock_zh_a_spot_em()
: Get real-time A-share market datastock_zh_a_daily(symbol, start_date, end_date, adjust)
: Get historical daily data for a specific stockstock_individual_info_em(symbol)
: Get detailed information for a specific stockstock_financial_analysis_indicator(symbol)
: Get financial analysis indicators for a specific stockThis project is licensed under the MIT License - see the LICENSE file for details.
中国股票 MCP 服务器是一个多调用协议(MCP)服务器,通过统一的 API 提供对中国股票市场数据的全面访问。它利用 AKShare 库从上海证券交易所(SSE)、深圳证券交易所(SZSE)和北京证券交易所(BSE)等各种中国证券交易所获取实时和历史数据。
# 克隆仓库 git clone https://github.com/yourusername/china-stock-mcp.git cd china-stock-mcp/china-stock-mcp-server # 创建并激活虚拟环境 python -m venv .venv source .venv/bin/activate # Windows 系统: .venv\Scripts\activate # 安装依赖 pip install -r requirements.txt
# 启动 MCP 服务器 python main.py
服务器暴露了许多用于访问不同类型股票市场数据的端点。每个函数都有详细的参数描述和返回值格式。一些关键功能包括:
stock_zh_a_spot_em()
:获取 A 股实时市场数据stock_zh_a_daily(symbol, start_date, end_date, adjust)
:获取特定股票的历史日线数据stock_individual_info_em(symbol)
:获取特定股票的详细信息stock_financial_analysis_indicator(symbol)
:获取特定股票的财务分析指标该项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。
Last Updated: 2025-04-14
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!