This is a Weibo hot search data acquisition server based on the Model Context Protocol (MCP) framework, providing functions to fetch Weibo hot search list, hot search details, and comments.
claude mcp add --transport stdio yooki-k-weibo-mcp-server uv --directory path/to/weibo-mcp-server run weibo_mcp_server \ --env weibo_COOKIE="YOUR_WEIBO_COOKIE"
How to use
This MCP server provides access to Weibo hot search data, including the hot search list, detailed topic information, and comments. It exposes endpoints under the MCP framework to fetch the current hot search rankings, view details for individual topics (such as category, description, link, claim info, and basic statistics), and retrieve comments associated with the top post or a post linked from a hot search topic. After starting the MCP server with the configured environment variable for Weibo cookies, you can query the server for the hot list, topic details, and comments using the MCP tooling provided by your environment (the MCP client will route requests to the weibo_mcp_server implementation). The server relies on Weibo cookies to access data that is otherwise public via the site, and the cookie should be kept secure in your MCP configuration.
Tools and capabilities:
- Get Weibo Hot Search List: rankings, keywords, and ranking indices.
- Get Hot Search Details: topic category, description, link, claim information, and statistics (reads, discussions, interactions, original posts).
- Get Hot Search Comments: fetch comments for the first Weibo post or the post linked from a hot search, with configurable max comment count and display of content and like counts.
To use, ensure the MCP runner (uv) is pointed at the weibo_mcp_server module and supply the weibo_COOKIE in the environment. Then call the MCP endpoints to retrieve the data you need for display, analytics, or aggregation in your application.
How to install
Prerequisites:
- Python >= 3.10
- internet access to install dependencies
Installation from sources:
- Clone the repository
git clone https://github.com/Yooki-K/weibo-mcp-server.git
- Install dependencies
pip install -r requirements.txt
Note: If you are running via uv, dependencies will be installed automatically when you start the server, so you may skip a separate pip install in that scenario.
Installation from PyPI:
pip install weibo-mcp-server
Run locally using MCP integration (example with uv):
uv --directory /path/to/weibo-mcp-server run weibo_mcp_server
Environment:
- Set weibo_COOKIE in your MCP config as shown below (example):
{
"mcpServers": {
"weibo": {
"command": "uv",
"args": [
"--directory",
"path/to/weibo-mcp-server",
"run",
"weibo_mcp_server"
],
"env": {
"weibo_COOKIE": "YOUR_WEIBO_COOKIE"
}
}
}
}
Additional notes
Tips and caveats:
- The Weibo cookie is required to access certain data endpoints. Keep the cookie secure and do not expose it publicly.
- If you see authentication errors, verify the cookie value and ensure it has not expired.
- When running via MCP, the directory path must point to the weibo-mcp-server package/module containing the MCP implementation.
- If you upgrade dependencies, re-check compatibility with Python 3.10+ and the MCP framework version (mcp>=1.0.0).
- For production deployments, consider containerizing the service and mounting the cookie as a secret/environment variable rather than embedding in config files.
- The hot search data is time-sensitive; implement caching strategies in your application if you need to minimize repeated requests.
- Review Weibo’s terms of service when programmatically scraping or accessing data to ensure compliant usage.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP