Atlas / MCP servers / xinkuang / China Stock

China StockCAUTION

mcp/xinkuang/china-stock-1

MCP server that provides access to Chinese stock market data using akshare-one

Verdict
CAUTION
Grade
B
Trust score
89 /100
Exposed tools
4 4r · 0w · 0d
Transport
streamable-http
License
MIT
Stars
46
01

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。默认:day
  • interval_multiplier (int): 时间周期乘数
  • start_date (string): 开始日期,格式为 YYYY-MM-DD
  • end_date (string): 结束日期,格式为 YYYY-MM-DD
  • adjust (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
Read from source at commit 76b0ebee44cbOBSERVED · 2026-10-08
02

Connect

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-code
claude mcp add china-stock-mcp -- uvx china-stock-mcp
claude-desktop
{
  "mcpServers": {
    "china-stock-mcp": {
      "command": "uvx",
      "args": [
        "china-stock-mcp"
      ]
    }
  }
}
03

Exposed tools (4)

4 read · 0 write · 0 destructive.

ToolRiskDescription
get_all_cni_indicesread获取所有指数的代码和基本信息
get_stock_a_code_nameread获取沪深京 A 股股票代码和股票简称数据.
get_stock_board_industry_summaryread获取同花顺行业板块实时行情数据.
get_time_inforead获取当前时间(ISO格式、时间戳)和最近一个交易日.
04

Trust audit

CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (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)

MEDIUMFilesystem / path · fs.destructive · CWE-22, CWE-59
src/china_stock_mcp/cache_utils.py:95
os.remove(cache_file) # 删除损坏的缓存文件
MEDIUMFilesystem / path · fs.destructive · CWE-22, CWE-59
src/china_stock_mcp/cache_utils.py:98
os.remove(cache_file) # 删除过期缓存文件
MEDIUMAuth / authz · mcp.remote_no_auth · CWE-287, CWE-862
streamable-http
Why it matters. a network transport with no auth environment variable found
Fix. require a token
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
uvicorn, starlette, fastmcp, akshare, akshare-one, openpyxl, pyarrow
Why it matters. 7 requirement(s) not pinned with ==
Fix. pin exact versions

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha 76b0ebee44cbfull audit observations/trust-audit/mcp-server/xinkuang__china-stock-1.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-0876b0ebee44cbCAUTIONB89first audit
06

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.

Advertisement