weibo-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@weibo-mcp search Weibo posts about today's AI news"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
weibo-mcp
连接 AI 助手与微博开放 API 的 Model Context Protocol (MCP) 服务,支持搜索、热搜榜单、用户动态、圈子互动等能力。可在 Claude、Cursor、Windsurf 等 MCP 兼容客户端中直接使用。
功能
微博搜索 — AI 智能搜索微博内容
热搜榜单 — 实时获取 7 个分类的热搜排行(主榜 / 文娱 / 社会 / 生活 / ACG / 科技 / 体育)
用户动态 — 获取当前认证用户发布的微博
圈子社区 — 浏览话题时间线、发帖、评论、回复等完整 CRUD 操作
令牌管理 — 自动缓存与刷新 Token,无需人工干预
灵活配置 — 按需启用/禁用工具,所有接口地址均可通过环境变量覆盖
Related MCP server: weibo-hot-search-mcp-server
快速开始
前置条件
Node.js >= 18
微博开放 API 的
app_id和app_secret
获取凭证
打开微博客户端,私信 @微博龙虾助手
发送消息:
连接龙虾收到回复示例:
您的应用凭证信息如下: AppId: your-app-id AppSecret: your-app-secret 如需重置凭证,请发送 "重置凭证" 命令。
安装
npm install -g weibo-mcp也可以直接使用 npx,无需安装。
配置 MCP 客户端
添加到 .vscode/mcp.json:
{
"servers": {
"weibo": {
"command": "npx",
"args": ["weibo-mcp"],
"env": {
"WEIBO_APP_ID": "your_app_id",
"WEIBO_APP_SECRET": "your_app_secret"
}
}
}
}添加到 .cursor/mcp.json:
{
"mcpServers": {
"weibo": {
"command": "npx",
"args": ["weibo-mcp"],
"env": {
"WEIBO_APP_ID": "your_app_id",
"WEIBO_APP_SECRET": "your_app_secret"
}
}
}
}添加到 claude_desktop_config.json:
{
"mcpServers": {
"weibo": {
"command": "npx",
"args": ["weibo-mcp"],
"env": {
"WEIBO_APP_ID": "your_app_id",
"WEIBO_APP_SECRET": "your_app_secret"
}
}
}
}添加到 ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"weibo": {
"command": "npx",
"args": ["weibo-mcp"],
"env": {
"WEIBO_APP_ID": "your_app_id",
"WEIBO_APP_SECRET": "your_app_secret"
}
}
}
}WEIBO_APP_ID=your_app_id \
WEIBO_APP_SECRET=your_app_secret \
npx weibo-mcp工具列表
工具 | 说明 | 类型 |
| 获取当前 Token 状态及过期信息 | 🔍 只读 |
| 按关键词搜索微博内容 | 🔍 只读 |
| 获取当前用户发布的微博 | 🔍 只读 |
| 按分类获取热搜排行榜 | 🔍 只读 |
| 圈子社区操作(详见下方) | 🔍/✏️ 混合 |
weibo_crowd 操作
Action | 说明 | 类型 |
| 获取可用圈子话题列表 | 🔍 只读 |
| 获取可用圈子话题详情(含版块信息) | 🔍 只读 |
| 浏览话题时间线 | 🔍 只读 |
| 获取微博的根评论 | 🔍 只读 |
| 获取评论的回复列表 | 🔍 只读 |
| 在话题下发布新微博 | ✏️ 写入 |
| 评论一条微博 | ✏️ 写入 |
| 回复一条评论 | ✏️ 写入 |
| 强制刷新 Token | ✏️ 写入 |
weibo_crowd 的 post 支持可选参数:
tagId:发帖版块 ID(可通过topic-details返回的tag_list获取)mediaId:视频媒体 ID(用于发视频帖子)
配置项
必填
环境变量 | 说明 |
| 微博开放 API 的 App ID |
| 微博开放 API 的 App Secret |
工具开关
所有工具默认启用,设为 false 可禁用:
环境变量 | 对应工具 |
|
|
|
|
|
|
|
|
|
|
接口地址覆盖
所有接口地址均有默认值,仅在需要时覆盖:
环境变量 | 默认值 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
开发
git clone https://github.com/wangcch/weibo-mcp.git
cd weibo-mcp
npm install
# 开发模式(热重载)
WEIBO_APP_ID=your_app_id WEIBO_APP_SECRET=your_app_secret npm run dev
# 类型检查
npm run lint
# 构建
npm run buildAPI 参考
本项目包含完整的 OpenAPI 3.1.0 规范文件,覆盖所有 13 个微博 HTTP 接口:
openapi/weibo-openapi.yaml
API 接口来源于 openclaw-weibo 项目,weibo-openapi.yaml 为据此整理的 OpenAPI 规范。
许可证
Available Tools
5 toolsweibo_crowdWeibo CrowdCDestructive
Weibo crowd operations. Read-only actions: topics, topic-details, timeline, comments, child-comments. Write actions: post, comment, reply. Utility: refresh.
Inputs: action (required), id, cid, page, +19 more.
weibo_hot_searchGet Weibo Hot SearchCRead-only
Get hot search list by category.
Inputs: category (required), count.
weibo_searchWeibo SearchBRead-only
Search Weibo content by query and return source metadata.
Inputs: query (required).
weibo_statusGet User Weibo StatusBRead-only
Get statuses posted by the authenticated Weibo user.
Inputs: count.
weibo_tokenGet Weibo TokenBRead-only
Get current Weibo API token and expiry metadata.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The four atomic tools (weibo_token, weibo_search, weibo_status, weibo_hot_search) are clearly distinct, but weibo_crowd bundles nine disparate sub-actions (topics, timeline, comments, post, comment, reply, refresh) into one catch-all. Its 'timeline' action overlaps with weibo_status, and the internal action selection is opaque.
All tools consistently share the 'weibo_' prefix, making them easy to scan. However, the suffix pattern mixes verbs (search) and nouns (token, status, crowd), and 'crowd' is not descriptive of the operations it actually performs.
Five tools is a reasonable, well-scoped count for a Weibo integration. The distribution is uneven, though—one tool absorbs nine actions while the rest are single-purpose, suggesting under-decomposition rather than an excessive count.
Coverage includes auth, search, hot search, user statuses, and some reads/writes via weibo_crowd, but notable gaps exist: no user profile/follower lookup, no likes/reposts, and no delete operations for statuses or comments. Agents attempting engagement workflows would hit dead ends.
Maintenance
Related MCP Connectors
Weibo user/post search, suggestions, trends, details, comments, likes/reposts, transcript.
Weibo (微博) data without login: hot searches, posts by keyword, comments, creator profiles.
Weibo posts, hot search, comments and profiles to JSON. No login or cookies needed.
Chinese social trends — Weibo, Douyin, Xiaohongshu, Bilibili, Zhihu — as agent tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables automated interaction with Xiaohongshu (Little Red Book) platform including searching posts, retrieving content and comments, and posting AI-generated comments with persistent login support.460-
- AlicenseAqualityDmaintenanceFetches Weibo hot search trends, details, and comments, enabling real-time social media monitoring through natural language.38MIT
- Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly operate Zhihu, including login, publishing articles and videos, searching content, getting recommendations, and commenting.7-