- Home
- MCP servers
- Xueqiu
Xueqiu
- python
71
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"liqiongyu-xueqiu_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/xueqiu_mcp",
"run",
"main.py"
],
"env": {
"XUEQIU_TOKEN": "YOUR_TOKEN"
}
}
}
}You can query Xueqiu stock data directly from Claude or other AI assistants by running a lightweight MCP server that wraps the Snowball API. This server provides real-time quotes, index performance, Northbound data for major markets, fund data, and stock code lookups, all accessible through your preferred MCP client.
How to use
Start your MCP client and point it to your local MCP server process. The server exposes stock data querying capabilities such as real-time quotes, index performance, Northbound data for Shanghai/Shenzhen and Hong Kong, fund data, and stock code searches. Run the server in the background or foreground, then use your MCP client to request the data you need. To stop or restart, manage the process via your usual workflow.
How to install
# Prerequisites
- Ensure you have Python and a Python environment tool available
- Install the MCP tool runner (uv) which you will use to manage and run MCP servers
# Clone the project
git clone https://github.com/liqiongyu/xueqiu_mcp.git
cd xueqiu_mcp
# Set up the dependency environment using uv
uv venv
uv pip install -e .
# Create a configuration file with your Snowball token in the project root
# Example content for the token
XUEQIU_TOKEN=你的雪球token
You can also quickly set the token with a shell command like this:
echo 'XUEQIU_TOKEN="xq_a_token=xxxxx;u=xxxx"' > .env
Additional configuration and run details
# Start the MCP server using uv. Replace the path with your actual project path.
uv --directory /path/to/xueqiu_mcp run main.py
If you already use Claude Desktop, you can configure the MCP client with these settings to run the server from your environment:
"xueqiu-mcp": {
"args": [
"--directory",
"/path/to/xueqiu_mcp",
"run",
"main.py"
],
"command": "uv"
}
Available tools
getRealtimeQuote
Fetches the latest traded price, volume, and other real-time data for a given stock symbol.
getIndexReturns
Retrieves performance metrics for a specified stock index over a chosen period.
getNorthbound
Provides northbound market data including cross-border listings and related metrics.
queryFundData
Returns fund-related information such as fund Net Asset Value and performance.
searchStockCode
Searches and returns stock codes based on keywords or company names.