Skip to main content

基于雪球数据源的 MCP 服务器,提供 A 股行情查询、K 线数据和技术指标计算

Project description

雪球 A 股 MCP 服务器

基于雪球(Xueqiu)数据源的 MCP 服务器,提供 A 股实时行情、K 线技术指标、盘口、财务数据查询。

安装

pip3 install xueqiu-stock-mcp
xueqiu-stock --setup

第一步(~10 秒):安装 MCP 服务器本体,体积小,无重依赖。

第二步(~2 分钟):--setup 自动安装 Playwright + Chromium 浏览器(约 150MB)。这是雪球 API 的必需依赖(用于绕过阿里云 WAF)。

如果 xueqiu-stock 命令找不到,用 python3 -m xueqiu_stock --setup

MCP 配置

{
  "mcpServers": {
    "xueqiu-stock": {
      "command": "xueqiu-stock"
    }
  }
}

配置文件位置:

  • Claude Desktop: ~/.claude/claude_desktop_config.json
  • Cursor: 项目根目录 /.cursor/mcp.json
  • VS Code: 项目根目录 /.vscode/mcp.json
  • QwenPaw: ~/.qwenpaw/config.jsonmcp.clients

提供的工具

工具 功能
get_stock_quote 实时行情(价格、涨跌幅、PE/PB、市值等)
get_kline_data K 线数据 + 技术指标(MA/MACD/RSI/BOLL/KDJ)
get_minute_data 分时走势(逐分钟价格和成交量)
get_pankou_data 五档盘口(买卖五档价格和数量)
get_financial 财务报表(利润表/资产负债表/现金流量表)

命令

xueqiu-stock           # 启动 MCP 服务器
xueqiu-stock --setup   # 安装依赖(Playwright + Chromium)
xueqiu-stock --check   # 检查依赖是否就绪

故障排除

pip3 也没有?

python3 -m pip install xueqiu-stock-mcp

启动报错"缺少 playwright"?

xueqiu-stock --setup

--setup 很慢? Chromium 下载约 150MB,首次需要下载。如网络慢可手动下载:https://playwright.dev/python/docs/intro#installing-browsers

PyPI

https://pypi.org/project/xueqiu-stock-mcp/

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.2.0.tar.gz (73.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xueqiu_stock_mcp-0.2.0-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file xueqiu_stock_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: xueqiu_stock_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 73.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

Hashes for xueqiu_stock_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 733bc986172f338e808ba3aebab76c3a65e2d9009d14fadc5211d75d63053e0a
MD5 dbf611f4d7edd3e4a40acab7e387da4d
BLAKE2b-256 28db99abf7c82cadca8e8bf712c50834f6a01b78e2a53dcd34c1897af9268aaa

See more details on using hashes here.

File details

Details for the file xueqiu_stock_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xueqiu_stock_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.7 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

Hashes for xueqiu_stock_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d373e7fbeb36df76736a7480b31577a68719cce289442040e7697e435837a00
MD5 c03c2e87e8892961fa9ca017eae8a78e
BLAKE2b-256 35a66328f1747fabb3a87a6dc15916b4efba4da199b266588400ccd1feb66cfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page