Back to MCP directory
publicPublicdnsLocal runtime

weibo-mcp-server

这是一个基于MCP框架的微博热搜数据采集服务器,提供热搜榜单、热搜详情及评论获取功能。

article

README

🚀 微博热搜 MCP 服务器

这是一款基于模型上下文协议(Model Context Protocol,MCP)框架的服务器,专门用于获取微博热搜数据。它具备获取微博热搜列表、热搜详情以及评论的功能,为用户提供全面的微博热搜信息。

✨ 主要特性

  1. 获取微博热搜列表
    • 显示热搜排名,让您快速了解热门话题的热度顺序。
    • 展示热搜关键词,精准定位当下热门话题。
    • 显示热搜指数,直观感受话题的热度程度。
  2. 获取热搜详情
    • 话题分类,帮助您快速筛选感兴趣的话题。
    • 话题描述,详细了解话题的核心内容。
    • 话题链接,方便您直接访问话题页面。
    • 话题声明信息,提供话题的相关说明。
    • 统计信息(阅读量、评论数、互动量、原创数),全面掌握话题的热度和影响力。
  3. 获取热搜评论
    • 支持通过热搜链接获取第一条微博或声明微博的评论,深入了解网友的观点。
    • 最大评论获取数量可配置,满足不同用户的需求。
    • 显示评论内容及点赞数,了解热门评论的受欢迎程度。

📦 安装指南

从源代码安装

  1. 克隆仓库:
git clone https://github.com/Yooki-K/weibo-mcp-server.git
  1. 安装依赖:
pip install -r requirements.txt

⚠️ 重要提示

如果使用 uv run weibo_mcp_server,依赖将自动安装,无需执行 pip install

从 PyPI 安装

pip install weibo-mcp-server

📚 详细文档

配置

获取微博 Cookie

创建一个 Weibo 账户,按 F12 打开开发者工具,并获取如下的 Cookie: Get Cookie

本地运行项目

将此工具添加到 MCP 服务器中。

使用 Cursor

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
      }
    }
  }
}
使用 Claude

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 文件。

贡献

  1. 分叉仓库。
  2. 创建功能分支(git checkout -b feature/amazing-feature)。
  3. 提交更改(git commit -m 'Add some amazing feature')。
  4. 推送到分支(git push origin feature/amazing-feature)。
  5. 提交 Pull Request。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client