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.2.tar.gz (73.9 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.2-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xueqiu_stock_mcp-0.2.2.tar.gz
  • Upload date:
  • Size: 73.9 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.2.tar.gz
Algorithm Hash digest
SHA256 639207c25f507036f4354b1f6a99b3f8b402c9b9ba0b6da1883dbbe3b2c9093d
MD5 61878a243cfce51584bb2211da5ff969
BLAKE2b-256 d8a3459d135e15b7987c5c4ce00df994579636321964f00c95edee6f3b400634

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xueqiu_stock_mcp-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 24.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b0d89ec65bc7debeef277cf04005ca997ff3c4d5e3981917238722d88f0352
MD5 21b18d686a35be7f5d1de5f628153281
BLAKE2b-256 df8252f32af549c4161f39acc027283fbe58e1ba4218c5a22eedcb9078d422e7

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