基于雪球数据源的 MCP 服务器,提供 A 股行情查询、K 线数据和技术指标计算
Project description
雪球 A 股 MCP 服务器
基于雪球(Xueqiu)数据源的 MCP 服务器,提供 A 股实时行情、K 线技术指标、盘口、财务数据查询。
安装
pip install xueqiu-stock-mcp
python3 -m playwright install chromium # 首次需要安装浏览器
配置
通用 MCP 客户端(Claude Desktop / Cursor / VS Code)
在 MCP 配置文件中添加:
{
"mcpServers": {
"xueqiu-stock": {
"command": "xueqiu-stock",
"args": [],
"env": {}
}
}
}
QwenPaw
在 ~/.qwenpaw/config.json 的 mcp.clients 中添加:
{
"xueqiu_stock": {
"name": "xueqiu_stock",
"description": "A股行情数据(雪球源)",
"enabled": true,
"transport": "stdio",
"command": "xueqiu-stock",
"args": [],
"env": {},
"cwd": ""
}
}
提供的工具
| 工具 | 功能 |
|---|---|
get_stock_quote |
实时行情(价格、涨跌幅、PE/PB、市值等) |
get_kline_data |
K 线数据 + 技术指标(MA/MACD/RSI/BOLL/KDJ) |
get_minute_data |
分时走势(逐分钟价格和成交量) |
get_pankou_data |
五档盘口(买卖五档价格和数量) |
get_financial |
财务报表(利润表/资产负债表/现金流量表) |
使用示例
# 查实时行情
get_stock_quote("600160")
# 查 K 线 + MACD + KDJ
get_kline_data("SH600519", "day", -60, "MA,MACD,KDJ")
# 查财务报表
get_financial("000001", "income", 4)
依赖
- Python >= 3.10
- mcp[cli] >= 1.0.0
- httpx >= 0.27.0
- pydantic >= 2.0.0
- playwright >= 1.40.0
首次启动会自动通过 Playwright 获取雪球 Cookie。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xueqiu_stock_mcp-0.1.2.tar.gz
(72.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xueqiu_stock_mcp-0.1.2.tar.gz.
File metadata
- Download URL: xueqiu_stock_mcp-0.1.2.tar.gz
- Upload date:
- Size: 72.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ffce2b62add0a2e5707eedfa4ae59a28da892a202b210097a5a25fcfca52410
|
|
| MD5 |
86562d43c92459c1fa01a86e52487330
|
|
| BLAKE2b-256 |
bccf1888b9b75d00483e5b5454666e29c18f23da4d955fe635fa1bc55609894c
|
File details
Details for the file xueqiu_stock_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: xueqiu_stock_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
466c71c61a6701021d0431b2154ecac18ad9e336881802de6c23ba6de0542115
|
|
| MD5 |
2338cf8acb73e53ba1a9086e9cf6de52
|
|
| BLAKE2b-256 |
7636934a56020686521be05b6c9c4c7d07db170be44b8b682ccace304b715dc0
|