a-stock-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@a-stock-mcp What are today's limit-up stocks?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A股量化MCP Server
基于 FastMCP + akshare 的 A 股金融数据 MCP 服务器,提供选股筛选、北向资金追踪、龙虎榜分析和融资融券查询。
功能
工具 | 说明 |
| A股多条件选股:行业/PE/涨跌幅/涨停跌停筛选 |
| 扫描今日涨停股列表 |
| 扫描今日跌停股列表 |
| 北向资金净流入趋势 + 今日汇总 |
| 龙虎榜上榜个股明细(按日期/原因/净买额) |
| 融资融券:市场汇总或单只个股两融余额 |
| 行业板块涨跌幅排序 |
| 板块历史走势追踪 |
| MACD/KDJ/RSI技术指标分析 |
| 新股申购信息查询 |
| 涨跌停统计汇总 |
所有数据来自 akshare(东方财富/新浪财经公开接口),仅供参考,不构成投资建议。
Related MCP server: A-Share MCP Server
安装
pip install a-stock-mcp使用
在 OpenCode 中使用
在 opencode.json 中配置:
{
"mcpServers": {
"a-stock-mcp": {
"command": "python",
"args": ["-m", "src.server"]
}
}
}在 Hermes 中使用
在 config.yaml 中配置:
mcp_servers:
a-stock-mcp:
command: python
args:
- -m
- src.server
cwd: /path/to/a-stock-mcp
enabled: true开发
# 克隆仓库
git clone https://github.com/RedSamerai/a-stock-mcp.git
cd a-stock-mcp
# 安装依赖
pip install -e ".[dev]"
# 运行测试
pytest tests/ -v项目结构
a-stock-mcp/
├── src/
│ ├── server.py # MCP服务器入口
│ ├── data/
│ │ └── akshare_client.py # 数据接口封装
│ └── tools/
│ ├── screener.py # 选股工具
│ ├── north_flow.py # 北向资金
│ ├── dragon_tiger.py # 龙虎榜
│ ├── margin.py # 融资融券
│ ├── sector.py # 板块分析
│ ├── technical.py # 技术指标
│ ├── ipo.py # 新股信息
│ └── stats.py # 涨跌统计
├── tests/ # 单元测试
└── pyproject.toml # 项目配置License
MIT License
Available Tools
11 toolsa_stock_screenerA Stock ScreenerB
A股选股筛选器,支持多条件组合筛选。
Inputs: top_n, pe_max, industry, limit_up, +5 more. Returns: object
dragon_tiger_analyzerDragon Tiger AnalyzerC
龙虎榜分析:查询指定日期的上榜个股明细。
Inputs: date, top_n, reason, min_net_buy. Returns: object
ipo_analyzerIpo AnalyzerA
新股申购分析:当前可申购新股列表。
Returns
dict { "count": int, "list": [{"symbol", "name", "subscribe_code", "issue_price", "subscribe_date", "exchange", "board"}, ...], "error": str | None, }
Inputs: no named parameters. Returns: object
limit_statsLimit StatsA
涨跌停统计:当日涨停/跌停股数量及幅度范围。
Returns
dict { "limit_up_count": int, "limit_up_min_pct": float, "limit_up_max_pct": float, "limit_down_count": int, "limit_down_min_pct": float, "limit_down_max_pct": float, "total_traded": int, "error": str | None, }
Inputs: no named parameters. Returns: object
margin_analysisMargin AnalysisA
融资融券分析:市场汇总或个股明细。
Inputs: code, period. Returns: object
north_flow_trackerNorth Flow TrackerB
北向资金追踪:近期净流入趋势 + 持股 Top N。
Inputs: days, top_n. Returns: object
scan_limit_down_stocksScan Limit Down StocksA
扫描今日跌停股列表(涨跌幅 <= -9.9%)。
Returns
dict {"count": int, "results": [...], "error": str | None}
Inputs: no named parameters. Returns: object
scan_limit_up_stocksScan Limit Up StocksA
扫描今日涨停股列表(涨跌幅 >= 9.9%)。
Returns
dict {"count": int, "results": [...], "error": str | None}
Inputs: no named parameters. Returns: object
sector_analyzerSector AnalyzerB
行业板块涨跌幅排序。
Inputs: top_n, min_change_pct. Returns: object
sector_flow_trackerSector Flow TrackerC
行业板块历史走势追踪。
Inputs: sector (required), days. Returns: object
technical_indicatorTechnical IndicatorC
技术指标分析:MACD / KDJ / RSI。
Inputs: symbol (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target distinct areas: limit-up/down scanners list individual stocks while limit_stats provides aggregate counts, and sector_analyzer vs sector_flow_tracker differ in current ranking vs historical trends. The only mild ambiguity is between scan_limit_up_stocks and limit_stats, but their outputs are clearly different.
The set mostly follows a noun_suffix pattern (technical_indicator, margin_analysis, sector_analyzer, ipo_analyzer), but scan_limit_up_stocks and scan_limit_down_stocks use a verb-first pattern and a_stock_screener is noun-only without a consistent suffix. This mix is readable but not fully consistent.
With 11 tools, the server covers a broad range of A-share market analysis workflows without feeling bloated. Each tool contributes a distinct analytical capability, and the count is well within the ideal range for a domain-focused server.
The tool surface covers major A-share workflows: limit-up/down scanning, capital flows, sector analysis, technical indicators, margin data, dragon-tiger lists, IPO analysis, and a screener. Minor gaps exist such as no direct individual stock quote or historical K-line tool, but the set is reasonably complete for its apparent analytical focus.
Related MCP Connectors
China A-share market data over MCP: 22 tools for quotes, K-line, financials, money flow, top-trader boards, sectors, macro, convertible bonds and factor screening. Five tools need no API key, so you can connect and try it immediately.
China A-share data for AI agents: 57 read-only tools plus 6 tools for your own watchlist.
China A-share screening, filings, holdings, flows and calendars as agent tools.
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables real-time stock market analysis through AKShare API integration. Supports retrieving live stock prices, historical data, technical indicators (MA, MACD, RSI), market sentiment analysis, stock search, and financial news.5-
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive A-share (Chinese stock market) data including stock information, historical prices, financial reports, macroeconomic indicators, technical analysis, and valuation metrics through the free Baostock data source.27MIT
- AlicenseNot gradedqualityDmaintenanceProvides real-time A-share (Chinese stock market) data through AKShare integration, enabling access to market overviews, company information, real-time quotes, and historical price data for Shanghai and Shenzhen stock exchanges.1Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides real-time quotes, fund flows, and corporate announcements for Chinese A-share stocks. It enables users to search for stocks, analyze financial indicators, and summarize quarterly reports through natural language.-