l

liqiongyu

@liqiongyu/xueqiu_mcp
1 Stars 392 次浏览 liqiongyu 更新于 2026-08-23
该服务暂未提供标准配置,请参考 README 手动接入

可用工具 (45 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

quotec 1 个参数

获取某支股票的行情数据

该工具无需必填参数,直接调用即可

quote_detail 1 个参数

获取某支股票的行情数据-详细

该工具无需必填参数,直接调用即可

pankou 1 个参数

获取实时分笔数据,可以实时取得股票当前报价和成交信息

该工具无需必填参数,直接调用即可

kline 2 个参数

获取K线数据。第二参数可制定从现在到N天前,默认100

该工具无需必填参数,直接调用即可

earningforecast 1 个参数

按年度获取业绩预告数据

该工具无需必填参数,直接调用即可

report 1 个参数

获取机构评级数据

该工具无需必填参数,直接调用即可

capital_flow 1 个参数

获取当日资金流如流出数据,每分钟数据

该工具无需必填参数,直接调用即可

capital_history 1 个参数

获取历史资金流如流出数据,每日数据

该工具无需必填参数,直接调用即可

capital_assort 1 个参数

获取资金成交分布数据

该工具无需必填参数,直接调用即可

blocktrans 1 个参数

获取大宗交易数据

该工具无需必填参数,直接调用即可

margin 1 个参数

获取融资融券数据

该工具无需必填参数,直接调用即可

indicator 3 个参数

按年度、季度获取业绩报表数据n n Args:n stock_code: 股票代码n is_annals: 只获取年报,默认为1n count: 返回数据数量,默认5条n

该工具无需必填参数,直接调用即可

income 3 个参数

获取利润表数据n n Args:n stock_code: 股票代码n is_annals: 只获取年报,默认为1n count: 返回数据数量,默认5条n

该工具无需必填参数,直接调用即可

balance 3 个参数

获取资产负债表数据n n Args:n stock_code: 股票代码n is_annals: 只获取年报,默认为1n count: 返回数据数量,默认5条n

该工具无需必填参数,直接调用即可

cash_flow 3 个参数

获取现金流量表数据n n Args:n stock_code: 股票代码n is_annals: 只获取年报,默认为1n count: 返回数据数量,默认5条n

该工具无需必填参数,直接调用即可

business 2 个参数

获取主营业务构成数据n n Args:n stock_code: 股票代码n count: 返回数据数量,默认5条n

该工具无需必填参数,直接调用即可

top_holders 2 个参数

获取十大股东数据n n Args:n stock_code: 股票代码n circula: 只获取流通股,默认为1n

该工具无需必填参数,直接调用即可

main_indicator 1 个参数

获取F10主要指标数据

该工具无需必填参数,直接调用即可

holders 1 个参数

获取F10股东人数数据

该工具无需必填参数,直接调用即可

org_holding_change 1 个参数

获取F10机构持仓数据

该工具无需必填参数,直接调用即可

bonus 3 个参数

获取F10分红融资数据n n Args:n stock_code: 股票代码n page: 第几页 默认1n size: 每页含有多少数据 默认10n

该工具无需必填参数,直接调用即可

industry_compare 1 个参数

获取F10行业对比数据

该工具无需必填参数,直接调用即可

watch_list

获取用户自选列表

该工具无需必填参数,直接调用即可

watch_stock 1 个参数 需填 1 项

获取用户自选列表详情n n Args:n pid: 自选列表IDn

必填参数:pid

nav_daily 1 个参数

获取组合净值数据n n Args:n cube_symbol: 组合代码n

该工具无需必填参数,直接调用即可

rebalancing_history 1 个参数

获取组合历史交易信息n n Args:n cube_symbol: 组合代码n

该工具无需必填参数,直接调用即可

convertible_bond 2 个参数

获取可转债信息n n Args:n page_size: 每页显示数量n page_count: 页码n

该工具无需必填参数,直接调用即可

index_basic_info 1 个参数

获取指数基本信息n n Args:n index_code: 指数代码n

该工具无需必填参数,直接调用即可

index_details_data 1 个参数

获取指数详细信息n n Args:n index_code: 指数代码n

该工具无需必填参数,直接调用即可

index_weight_top10 1 个参数

获取指数权重股前十n n Args:n index_code: 指数代码n

该工具无需必填参数,直接调用即可

index_perf_7 1 个参数

获取指数最近7天收益数据n n Args:n index_code: 指数代码n

该工具无需必填参数,直接调用即可

index_perf_30 1 个参数

获取指数最近30天收益数据n n Args:n index_code: 指数代码n

该工具无需必填参数,直接调用即可

index_perf_90 1 个参数

获取指数最近90天收益数据n n Args:n index_code: 指数代码n

该工具无需必填参数,直接调用即可

northbound_shareholding_sh 1 个参数

获取深港通北向数据n n Args:n date: 日期,默认当天,格式: 2022/01/19 n

该工具无需必填参数,直接调用即可

northbound_shareholding_sz 1 个参数

获取沪港通北向数据n n Args:n date: 日期,默认当天,格式: 2022/01/19 n

该工具无需必填参数,直接调用即可

fund_detail 1 个参数 需填 1 项

获取基金详细信息n n Args:n fund_code: 基金代码n

必填参数:fund_code

fund_info 1 个参数

获取基金基本信息n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

fund_growth 1 个参数

获取基金增长数据n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

fund_nav_history 1 个参数

获取基金历史净值数据n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

fund_achievement 1 个参数

获取基金业绩表现数据n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

fund_asset 1 个参数

获取基金资产配置数据n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

fund_manager 1 个参数

获取基金经理信息n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

fund_trade_date 1 个参数

获取基金交易日期信息n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

fund_derived 1 个参数

获取基金衍生数据n n Args:n fund_code: 基金代码n

该工具无需必填参数,直接调用即可

suggest_stock 1 个参数

关键词搜索股票代码n n Args:n keyword: 关键词n

该工具无需必填参数,直接调用即可

服务介绍

Xueqiu MCP

An MCP service based on the Xueqiu API, allowing you to easily fetch stock data through Claude or other AI assistants.

Project Overview

This project encapsulates the Xueqiu API based on pysnowball and provides services via the MCP protocol, enabling you to directly query stock data in AI assistants like Claude.

Installation

This project uses uv for dependency management. Please follow the steps below to install:

bash

Clone the repository

git clone https://github.com/liqiongyu/xueqiu_mcp.git
cd xueqiu_mcp

Install dependencies using uv

uv venv && uv pip install -e .

Configuration

Configuring Xueqiu Token

  1. Create a .env file in the root directory of the project.
  2. Add the following content:

XUEQIU_TOKEN=your_xueqiu_token

  • Shortcut:

bash
echo XUEQIU_TOKEN="xq_a_token=xxxxx;u=xxxx" > .env

For instructions on how to obtain the Xueqiu token, please refer to the pysnowball documentation.

Running the Service

Start the MCP service with the following command:

bash
uv --directory /path/to/xueqiu_mcp run main.py

Alternatively, if you have already configured Claude Desktop:

json
"xueqiu-mcp": {
"args": [
"--directory",
"/path/to/xueqiu_mcp",
"run",
"main.py"
],
"command": "uv"
}

Features

  • Fetch real-time stock quotes
  • Query index returns
  • Get Northbound data for Shenzhen-Hong Kong Stock Connect and Shanghai-Hong Kong Stock Connect
  • Fund-related data queries
  • Keyword search for stock codes

Screenshots

image

image

Acknowledgments

  • pysnowball - Python version of the Xueqiu stock data interface
  • fastmcp - MCP service framework

License

MIT License

相关 MCP 服务