基于雪球数据源的 MCP 服务器,提供 A 股行情查询、K 线数据和技术指标计算
Project description
雪球 A 股 MCP 服务器
基于雪球(Xueqiu)数据源的 MCP 服务器,提供 A 股实时行情、K 线技术指标、盘口、财务数据查询。
安装
cd mcp-xueqiu-stock
bash install.sh
或手动:
pip install -e .
配置
通用 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,需要 Chromium 浏览器(Playwright 自动安装)。
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.0.tar.gz
(70.6 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.0.tar.gz.
File metadata
- Download URL: xueqiu_stock_mcp-0.1.0.tar.gz
- Upload date:
- Size: 70.6 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 |
3c76de380549e7bef0c4a4749ac95b437ac4c63f265becc12690a40e42426105
|
|
| MD5 |
232672740f256b05802482e256697424
|
|
| BLAKE2b-256 |
11bcecdfb74d4d99fa8f07ef9321aa9a0120b2caa1a732c652e0ddfce774ec37
|
File details
Details for the file xueqiu_stock_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xueqiu_stock_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.4 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 |
6932d1159207453a8e993f04d4dff4dd33c46d0a07573bb999bda6056ff5ff05
|
|
| MD5 |
24aae7a2a9ce145c73d834ebd6fb3b8b
|
|
| BLAKE2b-256 |
dd7d0f66a203db7aed9c10a810a19fce443c1310f4173fdf844e9c4df8d377f8
|