China StockCAUTION
MCP server that provides access to Chinese stock market data using akshare-one
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://smithery.ai/server/@xinkuang/china-stock-mcp) 一款股票 MCP (Model Context Protocol) 服务器,为中国股市数据提供接口。提供了一系列工具,用于获取财务信息,包括历史股票数据、实时数据、新闻数据、财务报表等。
🚀 核心特性
- 双模式运行: 支持 stdio 本地模式和 HTTP 网络模式
- 丰富的财务数据: 涵盖 A/B/H 股数据的全方位获取
- 实时数据: 支持实时股价、交易信息等
- 财务报表: 资产负债表、利润表、现金流量表等
- 技术指标: 30+ 种技术指标自动计算和添加
- 新闻数据: 股票相关新闻和公告信息
- 易用性: 简单配置即可集成到 AI 助手 (Claude、Cursor 等)
- 数据缓存: 内置内存和磁盘缓存机制,提高数据获取效率和响应速度
- 容器化: 支持 Docker 部署
🛠️ 架构概览
主要组件
server.py: MCP 服务器核心,定义所有工具和数据接口__main__.py: 命令行入口,支持多种运行模式- FastMCP 框架: 处理 MCP 协议通信
- akshare-one 库: 提供底层的中国股市数据获取能力
cache_utils.py: 缓存工具,提供内存和磁盘缓存功能
支持的数据源
- \\数据源故障切换\\: 内置 \
\_fetch\_data\_with\_fallback\机制,支持按优先级自动切换数据源。当首选数据源失败或返回空数据时,系统将自动尝试备用数据源,从而提高数据获取的稳定性和可靠性。
- 东方财富 (eastmoney, eastmoney_direct)
- 新浪财经 (sina)
- 雪球 (xueqiu)
📋 可用工具
1. 获取股票的历史行情数据,支持多种数据源和技术指标 (gethistdata)
获取股票历史行情数据。
参数:
symbol(string): 股票代码 (例如: '000001')interval(Literal): 时间周期: minute, hour, day, week, month, year。默认:dayinterval_multiplier(int): 时间周期乘数start_date(string): 开始日期,格式为 YYYY-MM-DDend_date(string): 结束日期,格式为 YYYY-MM-DDadjust(Literal): 复权类型: none, qfq(前复权), hfq(后复权)。默认:none- \
indicators\_list\\(string\|list\): 要添加的技术指标,可以是逗号分隔的字符串(例如: 'SMA,EMA')或字符串列表(例如: \['SMA', 'EMA'\])。支持的指标包括: SMA, EMA, RSI, MACD, BOLL, STOCH, ATR, CCI, ADX, WILLR, AD, ADOSC, OBV, MOM, SAR, TSF, APO, AROON, AROONOSC, BOP, CMO, DX, MFI, MINUS\DI, MINUS\DM, PLUS\DI, PLUS\DM, PPO, ROC, ROCP, ROCR, ROCR100, TRIX, ULTOSC。常用指标:SMA, EMA, RSI, MACD, BOLL, STOCH, OBV, MFI,建议不超过10个。 output_format(Literal): 输出数据格式: json, csv, xml, excel, markdown, html。默认:markdown
2. 获取股票的实时行情数据,支持多种数据源 (getrealtimedata)
获取实时股票行情数据,支持的数据源包括:eastmoney, eastmoney\_direct, xueqiu。
参数:
symbol(string): 股票代码 (例如: '000001')output_format(Literal): 输出数据格式: json, csv, xml, exce
76b0ebee44cbOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add china-stock-mcp -- uvx china-stock-mcp
{
"mcpServers": {
"china-stock-mcp": {
"command": "uvx",
"args": [
"china-stock-mcp"
]
}
}
}Exposed tools (4)
4 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
get_all_cni_indices | read | 获取所有指数的代码和基本信息 |
get_stock_a_code_name | read | 获取沪深京 A 股股票代码和股票简称数据. |
get_stock_board_industry_summary | read | 获取同花顺行业板块实时行情数据. |
get_time_info | read | 获取当前时间(ISO格式、时间戳)和最近一个交易日. |
Trust audit
CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- UNDECLARED (2 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (4)
os.remove(cache_file) # 删除损坏的缓存文件
os.remove(cache_file) # 删除过期缓存文件
streamable-http
uvicorn, starlette, fastmcp, akshare, akshare-one, openpyxl, pyarrow
Gates applied: no_behavioural_pass.
76b0ebee44cbfull audit observations/trust-audit/mcp-server/xinkuang__china-stock-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 76b0ebee44cb | CAUTION | B | 89 | first audit |
Questions
What is the China Stock MCP server?
MCP server that provides access to Chinese stock market data using akshare-one
What tools does China Stock expose?
4 in total: 4 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is China Stock safe to connect to an agent?
With care. The audit graded it B (89/100) and found 4 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does China Stock need?
No credential environment variables were found in its source, so it appears to need none.
How does China Stock run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on PyPI as china-stock-mcp.
How current is this page?
The grade is for one exact copy of the source (76b0ebee44cb), read on 2026-10-08. The repository is watched and re-audited when it changes.