- Xueqiu MCP
Xueqiu MCP
# Xueqiu MCP
基于雪球API的MCP服务,让您通过Claude或其他AI助手轻松获取股票数据。
## 项目简介
本项目基于[pysnowball](https://github.com/uname-yang/pysnowball)封装了雪球API,并通过MCP协议提供服务,使您能够在Claude等AI助手中直接查询股票数据。
## 安装方法
本项目使用`uv`进行依赖管理。请按照以下步骤进行安装:
```bash
# 克隆仓库
git clone https://github.com/liqiongyu/xueqiu_mcp.git
cd xueqiu_mcp
# 使用uv安装依赖
uv venv && uv pip install -e .
```
## 配置
### 配置雪球Token
1. 在项目根目录创建`.env`文件
2. 添加以下内容:
```
XUEQIU_TOKEN=您的雪球token
```
* 快捷方式:
```bash
echo 'XUEQIU_TOKEN="xq_a_token=xxxxx;u=xxxx"' > .env
```
关于如何获取雪球token,请参考[pysnowball文档](https://github.com/uname-yang/pysnowball/blob/master/how_to_get_token.md)。
## 运行服务
使用以下命令启动MCP服务:
```bash
uv --directory /path/to/xueqiu_mcp run main.py
```
或者,如果您已经配置了Claude Desktop:
```json
"xueqiu-mcp": {
"args": [
"--directory",
"/path/to/xueqiu_mcp",
"run",
"main.py"
],
"command": "uv"
}
```
## 功能特性
- 获取股票实时行情
- 查询指数收益
- 获取深港通/沪港通北向数据
- 基金相关数据查询
- 关键词搜索股票代码
## 展示图


## 致谢
- [pysnowball](https://github.com/uname-yang/pysnowball) - 雪球股票数据接口的Python版本
- [fastmcp](https://github.com/fastmcp) - MCP服务框架
## 许可证
[MIT License](./LICENSE)
Overview
what is Xueqiu MCP?
Xueqiu MCP is a service based on the Xueqiu API that allows users to easily access stock data through AI assistants like Claude.
how to use Xueqiu MCP?
To use Xueqiu MCP, clone the repository, install dependencies using uv, configure your Xueqiu token in a .env file, and run the service using the provided command.
key features of Xueqiu MCP?
- Real-time stock market data retrieval
- Index return queries
- Access to Northbound data from the Stock Connect
- Fund-related data queries
- Keyword search for stock codes
use cases of Xueqiu MCP?
- Retrieving real-time stock prices for analysis.
- Querying index performance for investment decisions.
- Accessing fund data for portfolio management.
- Searching for specific stocks using keywords.
FAQ from Xueqiu MCP?
- How do I get my Xueqiu token?
You can refer to the pysnowball documentation for instructions on obtaining your token.
- Is Xueqiu MCP free to use?
Yes! Xueqiu MCP is free to use for everyone.
- What programming language is used in Xueqiu MCP?
Xueqiu MCP is implemented in Python.
Project Info
Created At
a year agoUpdated At
a year agoAuthor Name
liqiongyuStar
-Language
-License
-Category
research-and-data
Tags
Recommend Servers
View AllAmap Maps
@amap
高德地图官方 MCP Server
a year ago
Playwright Mcp
@microsoft
Playwright MCP server
TypeScript
10 months ago
mcp-server-flomo MCP Server
@chatmcp
Write notes to Flomo
JavaScript
a year ago
Mcp Server Chatsum
@chatmcp
summarize chat message
typescript
a year ago
Littleorange Video Mcp
@littleorange-ai
15 hours ago