A股实时行情MCP服务器 - 基于Model Context Protocol的A股数据查询工具
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"a-stock-mcp-server","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# A股实时行情MCP服务器 v2.0 [](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](https://modelcontextprotocol.io/) [](https://badge.fury.io/py/a-stock-mcp-server) [](https://pepy.tech/project/a-stock-mcp-server) 这是一个基于Model Context Protocol (MCP) 的A股实时行情查询服务器,采用多数据源架构,支持查询A股实时价格、历史数据、财务信息等。专为AI助手和金融分析工具设计。 ## 🚀 新版本特性 (v2.0) - **多数据源架构**: 支持故障转移和负载均衡 - **模块化设计**: 工具和数据源完全解耦 - **智能缓存**: 提高响应速度和减少API调用 - **增强错误处理**: 完善的异常处理和重试机制 - **完整测试覆盖**: 单元测试和集成测试 ## 功能特性 ### 🔥 核心功能 - **实时价格查询**: 获取A股实时价格、涨跌幅、成交量等 - **股票基本信息**: 查询股票的基本信息和公司概况 - **市场概况**: 获取上证、深证等主要指数信息 - **历史数据**: 查询股票的历史K线数据 - **财务数据**: 获取利润表、资产负债表、现金流量表 ### 🛠️ 支持的工具 1. `get_realtime_price` - 获取实时价格 2. `get_stock_info` - 获取股票基本信息 3. `get_market_summary` - 获取市场概况 4. `get_stock_history` - 获取历史数据 5. `get_financial_data` - 获取财务数据 ## 安装和使用 ### 🚀 PyPI安装(推荐) ```bash pip install a-stock-mcp-server ``` ### 📦 从源码安装 ```bash # 克隆仓库 git clone https://github.com/Llldmiao/a-stock-mcp-server.git cd a-stock-mcp-server # 使用Poetry安装(推荐) poetry install # 或者使用pip安装 pip install -r requirements.txt pip install -e . ``` ### 🤖 MCP服务器使用 #### 快速配置 在你的MCP客户端配置文件中添加: ```json { "mcpServers": { "a-stock-realtime": { "command": "python", "args": ["-m", "a_stock_mcp_server"] } } } ``` #### 可用工具 1. **get_realtime_price** - 获取实时价格 - 参数: `symbol` (股票代码,如"000001") 2. **get_stock_info** - 获取股票基本信息 - 参数: `symbol` (股票代码) 3. **get_market_summary** - 获取市场概况 - 参数: 无 4. **get_stock_history** - 获取历史数据 - 参数: `symbol`, `period`(daily/weekly/monthly), `start_date`, `end_date` 5. **get_financial_data** - 获取财务数据 - 参数: `symbol`, `report_type`(income/balance/cashfl…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.