这是一款基于模型上下文协议(Model Context Protocol,MCP)框架的服务器,专门用于获取微博热搜数据。它具备获取微博热搜列表、热搜详情以及评论的功能,为用户提供全面的微博热搜信息。
git clone https://github.com/Yooki-K/weibo-mcp-server.git
pip install -r requirements.txt
⚠️ 重要提示
如果使用
uv run weibo_mcp_server
,依赖将自动安装,无需执行pip install
。
pip install weibo-mcp-server
创建一个 Weibo 账户,按 F12 打开开发者工具,并获取如下的 Cookie:
将此工具添加到 MCP 服务器中。
Windows 系统路径:C:/Users/YOUR_USER/.cursor/mcp.json
{
"mcpServers": {
"weibo": {
"command": "uv",
"args": [
"--directory",
"path/to/weibo-mcp-server",
"run",
"weibo_mcp_server"
],
"env":{
"weibo_COOKIE": YOUR_WEIBO_COOKIE
}
}
}
}
Windows 系统路径:%APPDATA%/Claude/claude_desktop_config.json
"weibo": {
"command": "uv",
"args": [
"--directory",
"/path/to/weibo-mcp-server",
"run",
"weibo_mcp_server"
],
"env": {
"weibo_COOKIE": YOUR_WEIBO_COOKIE
}
}
本项目采用 MIT License,具体内容请参见 LICENSE 文件。
git checkout -b feature/amazing-feature
)。git commit -m 'Add some amazing feature'
)。git push origin feature/amazing-feature
)。