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.1.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.1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xueqiu_stock_mcp-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7a7c1ca37e7b23420aacbad04661253242ff8775ccfff49ab362704257764623
MD5 dfb5ed39d923e1a695dd01e0daaccccb
BLAKE2b-256 490dcfd8c19536f230bc8e1581449737dd32b70fe4d1d15681f67edc87f8d163

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xueqiu_stock_mcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 23.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2788e7c9c417d7cf33b4a1223b1fbb2c7a4a1dbf8a60735668e216dbe544083e
MD5 20ee1be45bd5c9dda1b4da2157c343da
BLAKE2b-256 3bc3b632ab6cac74567d7599d8349a2ec624e9181d7fbeb0403f8b745b23bea4

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