Back to Browse

Astock MCP Server

Developer ToolsUse Caution4.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

A-share quant toolkit MCP: quotes, 60-pt scoring, signals, backtests. Public data, zero auth.

About

A-share quant toolkit MCP: quotes, 60-pt scoring, signals, backtests. Public data, zero auth.

Security Report

4.2
Use Caution4.2High Risk

The server is a zero-auth wrapper around public A-share quote and kline endpoints, and its network and subprocess use matches its quant-data purpose with no sign of exfiltration or malicious code. The main issues are a user-supplied stock code interpolated unvalidated into request URLs and passed to curl.exe through subprocess, plus missing module-level imports (subprocess, sys, re) that will raise NameError on the Sina, Tencent-kline, and batch-quote code paths. Several referenced modules (kline_em, rate_limit, fourier_analyzer) were not provided and could not be reviewed. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 5 high severity).

7 files analyzed · 13 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

process_spawn

Check that this permission is expected for this type of plugin.

How to Install

Install command not verified. See the repository for install instructions.

View repository

Documentation

View on GitHub

From the project's GitHub README.

astock-mcp-server

China A-share quant toolkit exposed as Model Context Protocol tools. Zero auth, public data sources, standard public indicators.

Tools

ToolInputReturns
stock_quotecode (e.g. "600519")realtime snapshot: price/open/high/low/change%/volume/PE
stock_scorecode60-point technical score + signal list (MA position, Bollinger band, RSI, KDJ, MACD, trend)
stock_signalscode, days=120multi-indicator resonance: bullish/bearish count, strength stars, per-indicator detail
stock_backtestcode, strategy, days=500total return, buy-and-hold, annualized, Sharpe, max drawdown, win rate, trade count

Available backtest strategies

ma_cross · bollinger_reversal · kdj_overtrade · rsi_meanreversion · macd_cross · fusion_ma_bollinger · fusion_boll_kdj · fusion_triple

Code format

Shanghai: 600519 (6xxxxx) · Shenzhen: 000001 / 300750 · auto-detected. Do not prefix with sh/sz.

Data sources

  • Realtime quotes: Tencent qt.gtimg.cn
  • Daily klines (qfq): EastMoney push2his.eastmoney.com (Tencent kline endpoint used as primary, EastMoney fallback on WAF throttling)
  • Rate limiting + TTL caching + exponential-backoff retry built in, safe for concurrent MCP clients

All indicators are standard public formulas (MA/RSI/MACD/KDJ/Bollinger). No proprietary logic is included.

Install

pip install astock-mcp-server

Claude Desktop / any MCP client config

{
  "mcpServers": {
    "astock-quant": {
      "command": "python",
      "args": ["-m", "astock_mcp_server_runner"]
    }
  }
}

Or run directly after cloning:

pip install mcp pandas numpy
python server.py

Example

{"tool": "stock_backtest", "args": {"code": "600519", "strategy": "rsi_meanreversion", "days": 500}}
{"总收益": "25.49%", "买入持有": "3.83%", "年化": "12.13%", "夏普": 0.86, "回撤": "-9.71%", "胜率": "52%", "交易": "17次"}

Disclaimer

Historical simulation and technical indicators for reference only. Not investment advice.

Reviews

No reviews yet

Be the first to review this server!