A股量化MCP Server
基于 FastMCP + akshare 的 A 股金融数据 MCP 服务器,提供选股筛选、北向资金追踪、龙虎榜分析和融资融券查询。
功能
| 工具 | 说明 |
|---|---|
a_stock_screener |
A股多条件选股:行业/PE/涨跌幅/涨停跌停筛选 |
scan_limit_up_stocks |
扫描今日涨停股列表 |
scan_limit_down_stocks |
扫描今日跌停股列表 |
north_flow_tracker |
北向资金净流入趋势 + 今日汇总 |
dragon_tiger_analyzer |
龙虎榜上榜个股明细(按日期/原因/净买额) |
margin_analysis |
融资融券:市场汇总或单只个股两融余额 |
sector_analyzer |
行业板块涨跌幅排序 |
sector_flow_tracker |
板块历史走势追踪 |
technical_indicator |
MACD/KDJ/RSI技术指标分析 |
ipo_analyzer |
新股申购信息查询 |
limit_stats |
涨跌停统计汇总 |
所有数据来自 akshare(东方财富/新浪财经公开接口),仅供参考,不构成投资建议。
安装
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
Metadata
Release files for a-stock-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| a_stock_mcp-0.1.1.tar.gz | 21.0 kB | Without provenance | Details for a_stock_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| a_stock_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for a_stock_mcp-0.1.1-py3-none-any.whl |
Total release size: 44.0 kB
Release files / a_stock_mcp-0.1.1.tar.gz
| Download URL | a_stock_mcp-0.1.1.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5791d5041b778471fef0c4cc18d8a78a43bfddd82521073bd48412d0b3f1fbe9
|
|
BLAKE2b-256 checksum How to use checksums |
6f41164a5e89975c40c323eaf8d3f64d102f664c9a6b9cf8c9fec67548df0111
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / a_stock_mcp-0.1.1-py3-none-any.whl
| Download URL | a_stock_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ba9656a1adfd91338713696d8d9c20b090907c4fd8189120a092e0b02d51ccc
|
|
BLAKE2b-256 checksum How to use checksums |
687e40d5c8f0ba1608d96455f96c2261dbdc20bb85d4749a06b3592cd4e843e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Security for a-stock-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.