# 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" } ``` ## 功能特性 - 获取股票实时行情 - 查询指数收益 - 获取深港通/沪港通北向数据 - 基金相关数据查询 - 关键词搜索股票代码 ## 展示图 ![image](./images/cursor_mcp.png) ![image](./images/claude_mcp.png) ## 致谢 - [pysnowball](https://github.com/uname-yang/pysnowball) - 雪球股票数据接口的Python版本 - [fastmcp](https://github.com/fastmcp) - MCP服务框架 ## 许可证 [MIT License](./LICENSE)

相关推荐

Search1API

Search1API

One API for Search, Crawling, and Sitemaps

Tinybird

Tinybird

Interact with Tinybird serverless ClickHouse platform

BigQuery

BigQuery

(by LucasHild) - This server enables LLMs to inspect database schemas and execute queries on BigQuery.

Raygun

Raygun

Interact with your crash reporting and real using monitoring data on your Raygun account

Sqlite

Sqlite

Database interaction and business intelligence capabilities

Pandora's Shell

Pandora's Shell

MCP server enabling AI assistants to execute terminal commands through a secure shell interface

VikingDB MCP server

VikingDB MCP server

a mcp server for vikingdb store and search

MCP Server for Prometheus

MCP Server for Prometheus

A Model Context Protocol (MCP) server enabling LLMs to query, analyze, and interact with Prometheus databases through predefined routes.

MCP Server for Data Exploration

MCP Server for Data Exploration

MCppServer

MCppServer

Fast and super efficient Minecraft Server written in C++

Exa MCP Server 🔍

Exa MCP Server 🔍

Claude can perform Web Search | Exa with MCP (Model Context Protocol)

MySQL MCP Server

MySQL MCP Server

A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases

Portfolio Service Monorepo

Portfolio Service Monorepo

A MCP (Model Context Protocol) server that implements popular brokers' APIs and more

MCP Web Research Server

MCP Web Research Server

MCP web research server (give Claude real-time info from the web)

Awesome MCP Servers

Awesome MCP Servers

Awesome MCP Servers - A curated list of Model Context Protocol servers

Mcp Directory

Mcp Directory

directory for Awesome MCP Servers

YouTube Transcript Server

YouTube Transcript Server

This is an MCP server that allows you to directly download transcripts of YouTube videos.

kagi-server MCP Server

kagi-server MCP Server

A Model Context Protocol server implementation for Kagi's API