Skip to main content

基于雪球数据源的 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.jsonmcp.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.1.tar.gz (70.8 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.1.1-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for xueqiu_stock_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 75d09f4f9329efaed43935ea47d2a308228a328fc678bae5d6d1b2b9c9c41ea5
MD5 f5a078865afd7aa75ef60c3eee3293e8
BLAKE2b-256 3d3652693e061482bf88888ee3d02ef812536ed733aea8ef1131bb8c75eba7b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xueqiu_stock_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.2 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bb6f0708a232665b15c2a906c1c2c8dae6d318f64e1b07c3feeca714106b300
MD5 c140145fb98030e1068357036cc372b8
BLAKE2b-256 30712fa026fcede36b92320fb5798d997177bd43dbbc811501681498ad8aa8b3

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