# xinkuang-china-stock-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/xinkuang/china-stock-mcp  
**GitHub Stars:** 48  
**Views:** 19  
**Installs:** 1  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/xinkuang-china-stock-mcp

## Description
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…

## Tools
Capabilities this server exposes over MCP:

- **get_hist_data** — 获取指定的股票历史行情数据及技术指标
- **get_realtime_data** — 获取指定的股票实时行情数据
- **get_news_data** — 获取股票相关的新闻数据
- **get_balance_sheet** — 获取公司的资产负债表
- **get_income_statement** — 获取指定股票代码的公司的利润表
- **get_cash_flow** — 获取指定股票代码的公司的现金流量表
- **get_fund_flow** — 获取股票资金流向数据 (近100交易日)
- **get_inner_trade_data** — 获取公司内部股东交易数据
- **get_financial_metrics** — 获取公司关键财务指标
- **get_time_info** — 获取当前时间（ISO格式、时间戳）和最近一个交易日
- **get_stock_basic_info** — 获取指定股票的基本概要信息
- **get_macro_data** — 获取宏观经济指标数据，支持多个指标
- **get_investor_sentiment** — 分析投资者情绪数据，包括用户关注指数、日度市场参与意愿、股票评级记录和机构参与度。
- **get_shareholder_info** — 获取指定股票的股东情况
- **get_product_info** — 获取公司主要产品/业务构成
- **get_profit_forecast** — 获取股票的业绩预测数据，包括预测年报净利润和每股收益
- **get_stock_fhps_detail** — 获取指定股票的分红配送情况
- **get_stock_cyq** — 获取指定股票的筹码分布情况
- **get_stock_research_report** — 获取指定股票的个股研报及盈利预测
- **get_stock_circulate_stock_holder** — 获取指定股票的流通股东情况
- **get_stock_management_change** — 获取指定股票的高管持股变动情况
- **get_stock_restricted_release_queue** — 获取指定股票的个股限售解禁情况
- **get_stock_value** — 获取指定股票的个股估值分析数据
- **get_stock_a_code_name** — 获取沪深京 A 股股票代码和股票简称数据
- **get_stock_volatility** — 通过分钟级历史行情计算指定个股的波动率指标
- **get_all_cni_indices** — 获取所有指数的代码和基本信息
- **get_cni_index_hist** — 获取指定指数的日频率历史行情数据
- **get_cni_index_detail** — 获取指定指数的成分股样本详情
- **get_stock_technical_rank** — 获取技术选股指标数据，包括创新高、创新低、连续上涨、连续下跌、持续放量、持续缩量、向上突破、向下突破、量价齐升、量价齐跌、险资举牌。
- **get_stock_board_industry_summary** — 获取所有行业板块实时行情数据

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "xinkuang-china-stock-mcp": {
    "command": "uvx",
    "args": ["china-stock-mcp"]
  }
}
```

## Documentation

## What xinkuang-china-stock-mcp does

xinkuang-china-stock-mcp exposes China financial-market queries as MCP tools. Coverage includes A-shares, B-shares, and Hong Kong stocks, along with company fundamentals, market activity, investor information, news, macroeconomic indicators, and Chinese index data.

The server can return results in JSON, CSV, XML, Excel, Markdown, or HTML for most data tools. This makes it suitable for agents that need either machine-readable records or formatted research output.

## How it works

FastMCP handles MCP communication, while the `akshare-one` library supplies the underlying market-data access. Data retrieval can use Eastmoney, direct Eastmoney endpoints, Sina Finance, or Xueqiu, depending on the tool. A fallback mechanism tries alternate sources when a preferred source fails or returns no data.

Caching is available in memory and on disk. Cached index information is also supported for the tool that lists China Securities Index data. The server can run locally over stdio or as an HTTP service for network access.

Historical stock data supports minute, hourly, daily, weekly, monthly, and yearly intervals, optional price adjustment modes, and calculated technical indicators. More than 30 indicators are available, including SMA, EMA, RSI, MACD, Bollinger Bands, stochastic indicators, ATR, CCI, ADX, OBV, MFI, and others.

## Setup and configuration

The source installation requires Python 3.12 or later, Git, and preferably `uv`. After cloning the repository, install dependencies with `uv sync`, or use `pip install -r requirements.txt`.

Run the default local mode with:

```bash
uv run -m china_stock_mcp
```

For container deployment, pull `ghcr.io/xinkuang/china-stock-mcp:latest` and publish port 8081:

```bash
docker run -p 8081:8081 ghcr.io/xinkuang/china-stock-mcp:latest
```

Smithery provides an installation route for Claude Desktop through its CLI:

```bash
npx -y @smithery/cli install @xinkuang/china-stock-mcp
```

## Tools and capabilities

Available tools cover:

- Historical and real-time stock prices, trading data, volatility, fund flows, and technical rankings.
- Balance sheets, income statements, cash-flow statements, financial metrics, valuation, forecasts, dividends, and products or business composition.
- News, research reports, shareholder records, circulating holders, insider transactions, management changes, restricted-share releases, and chip-distribution data.
- Basic stock information, all A-share code and name listings, investor sentiment, and macro indicators such as money supply, GDP, CPI, PMI, and stock summaries.
- China Securities Index listings, historical index prices, and constituent details.
- Industry-board real-time summaries and current-time or latest-trading-day information.

Most stock-specific tools accept a symbol and output format. Historical and volatility tools additionally accept date ranges and period or adjustment settings, while technical history can receive a list of indicators to calculate.

## Limitations and notes

Market coverage and results depend on the upstream sources used by `akshare-one` and the configured fallback sequence. Historical technical calculations apply to the data retrieved for the requested symbol, dates, and interval. The server is a data-access and analysis interface; it does not provide order execution tools.

_Full upstream README: https://allmcps.com/mcp/xinkuang-china-stock-mcp/readme_

