微博热搜MCP服务器
这是一个基于模型上下文协议(MCP)框架的微博热搜索数据采集服务器,提供获取微博热搜索列表、热搜索详细信息和评论的功能。
特性
- 获取微博热门搜索列表
- 显示热门搜索排名 - 显示热门搜索关键字 - 显示热门搜索索引
- 获取热门搜索详细信息
- 主题类别 - 主题描述 - 主题链接 - 主题索赔信息 - 统计数据(阅读、讨论、互动、原创帖子)
- 获取热门搜索评论
- 支持通过热门搜索链接从第一个微博帖子或索赔帖子中获取评论 - 可配置的最大评论获取计数 - 显示评论内容和点赞计数
需求
- Python>=3.10
- 依赖关系:
- 请求: - 矿业有限公司 - mcp>=1.0.0
安装
从源头安装
- 克隆存储库
git clone https://github.com/Yooki-K/weibo-mcp-server.git- 安装依赖项:
pip install -r requirements.txt注:如果使用uv run weibo_mcp_server,依赖项将自动安装,无需pip install
从Pypi安装
pip install weibo-mcp-server配置
获取微博Cookie
创建一个 微博 帐户,按F12打开开发人员工具,并获取cookie,如下所示: Get 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许可证-有关详细信息,请参阅许可证文件。
贡献
- 分叉存储库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add some amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
