Bilibili

Developer tools

B站 MCP Server - 支持搜索/评论/字幕/弹幕/回复.

Your AI app calls the Bilibili MCP server, which does the developer tools work and sends the result back to the chat.

About Bilibili

Bilibili is a community MCP server from adoresever, filed in our directory under developer tools. B站 MCP Server - 支持搜索/评论/字幕/弹幕/回复.

At a glance

Publisher
adoresever (community)
Runs
See the README for setup
Written in
Python
License
MIT
GitHub stars
204

How to set up Bilibili

  1. Follow the install steps in the Bilibili README; it is written in Python, so have that toolchain ready.
  2. Check the Bilibili README for keys or settings; the registry lists none that Bilibili requires.
  3. Add Bilibili to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Bilibili tools to confirm the connection.
  5. Run one read-only task with Bilibili first, and keep your app asking before each tool call until the results look right.

Bilibili compared with similar servers

  • Dotnet Samples by microsoft has fewer GitHub stars than Bilibili (203 against 204); Dotnet Samples is official while Bilibili is a community server, and both run locally.
  • Trainingpeaks by JamsusMaximus has more GitHub stars than Bilibili (205 against 204); both are community servers, and both run locally.
  • Langchain by rectalogic has fewer GitHub stars than Bilibili (203 against 204); both are community servers, and both run locally.

Before you connect Bilibili

  • Give Bilibili its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Bilibili tool call until you trust what it does with them.
  • Treat text that Bilibili fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Bilibili on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Bilibili

How marketing and sales teams put Bilibili to work, by company size. Pick the size closest to yours and start Bilibili on one use case.

Small business

  • A small business with a developer can use Bilibili to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Bilibili to explain and fix a marketing site issue without context switching between tools.
  • Bilibili runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Bilibili to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Bilibili to keep scripts and automations documented and versioned as they change.
  • Start Bilibili on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Bilibili with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Bilibili so web and marketing engineering share one reviewed way of working with AI.
  • Bilibili is a community server, so have security review the code and pin a version before Bilibili touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Bilibili README

From adoresever/bilibili-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

bilibili-mcp

B站(Bilibili)MCP Server, , 让 AI 助手直接操作B站。

支持 OpenClaw / Claude Code / Cursor / Cline 等所有 MCP 客户端。

27 个工具,覆盖登录认证、搜索采集、内容发布、数据分析、互动运营。

功能

登录认证
Tool 功能 说明
bili_login 扫码登录 生成二维码(base64图片),AI直接展示给用户扫码
bili_login_check 登录状态检查 轮询扫码状态,扫码成功后自动保存凭证
bili_check_credential 凭证验证 检查当前登录是否有效,返回用户名等信息
数据采集
Tool 功能 说明
bili_search 搜索视频 按关键词搜索,支持按播放量/最新/弹幕排序
bili_comments 获取评论 获取视频热门评论,含子评论
bili_subtitle 获取字幕 获取视频AI字幕(语音转文字)
bili_danmaku 获取弹幕 获取视频弹幕列表
bili_video_info 视频详情 获取播放量、评论数、收藏数等
bili_reply 回复评论 发表评论或回复评论(支持楼中楼)
bili_crawl 批量采集 搜索+评论+字幕一步到位
内容发布
Tool 功能 说明
bili_send_dynamic 发图文动态 发布文字/图文动态,支持定时发布、话题关联
bili_upload_video 上传视频 单P视频上传,支持封面、标签、分区选择
bili_upload_video_multi 多P上传 多分P视频合并投稿
bili_send_opus 图文专栏 发布图文长内容(Opus)
bili_video_zones 分区查询 获取常用分区ID,辅助视频上传
数据分析
Tool 功能 说明
bili_hot_videos 热门视频 获取当前B站热门视频列表
bili_hot_buzzwords 热搜关键词 获取B站热搜词/热门话题
bili_weekly_hot 每周必看 获取每周必看推荐视频
bili_rank 排行榜 全站及17个分区排行榜
bili_user_info 用户信息 获取UP主粉丝数、等级、总播放量等
bili_user_videos 用户视频 获取UP主投稿列表,支持排序和搜索
互动运营
Tool 功能 说明
bili_favorite_lists 收藏夹列表 获取自己或他人的收藏夹
bili_favorite_content 收藏夹内容 获取收藏夹内视频,支持搜索
bili_send_message 发私信 给指定用户发送文字私信
bili_unread_messages 未读消息 获取私信、@、回复、点赞等未读数
bili_received_replies 收到的回复 获取评论回复通知
bili_received_at_and_likes @和点赞 获取@提及和点赞通知

快速开始

1. 克隆项目
git clone https://github.com/adoresever/bilibili-mcp.git
cd bilibili-mcp
2. 安装依赖
pip install -r requirements.txt

需要 Python 3.10+,视频上传自动截取封面需要 ffmpeg。

3. 登录

方式一:通过 AI 工具登录(推荐)

接入 MCP 后,直接对 AI 说"登录B站",AI 会调用 bili_login 生成二维码展示给你扫码,全程无需终端操作。

方式二:命令行登录

python bili_login.py
4. 测试运行
npx @modelcontextprotocol/inspector python mcp_server.py

接入 AI 工具

OpenClaw
npm i -g mcporter
npx mcporter config add bilibili-mcp "python /path/to/bilibili-mcp/mcp_server.py"

或直接把 GitHub 链接粘贴到 OpenClaw 对话框,让它自动配置。

Claude Code

在项目目录创建 .mcp.json:

{
  "mcpServers": {
    "bilibili-mcp": {
      "command": "python",
      "args": ["/path/to/bilibili-mcp/mcp_server.py"]
    }
  }
}
Cursor / Cline

在设置中添加 MCP Server,command 填 python,args 填 mcp_server.py 的完整路径。

使用示例

接入后,你可以直接用自然语言让 AI 操作:

  • "登录B站"(AI会展示二维码给你扫)
  • "搜索B站上关于AI Agent的热门视频"
  • "获取这个视频的评论,分析用户需求"
  • "获取视频字幕,总结视频内容"
  • "帮我回复这条评论"
  • "批量采集OpenClaw相关视频的评论和字幕"
  • "帮我发一条B站动态,配上这几张图片"
  • "把这个视频上传到B站科技区"
  • "看看B站现在什么最火"
  • "获取科技区排行榜前10的视频"
  • "分析这个UP主的粉丝和投稿数据"
  • "我有多少未读私信和回复?"
  • "看看我的收藏夹里有什么"

技术栈

项目结构

bilibili-mcp/
├── mcp_server.py          # MCP Server 主文件(27个tool)
├── bili_login.py           # 命令行扫码登录(备用)
├── bili_credential.json    # 登录凭证(自动生成,勿提交)
├── requirements.txt        # Python 依赖
├── README.md               # 项目说明
├── LICENSE                 # MIT 开源协议
└── .gitignore              # Git 忽略文件

注意事项

  • 首次使用通过 AI 对话即可完成登录,无需终端操作
  • 凭证保存在本地,不会上传
  • 请求间隔自动控制,避免频率过快
  • 回复评论/发私信功能请谨慎使用,遵守B站社区规则
  • 视频上传未指定封面时,自动从视频第3秒截取(需要ffmpeg)
  • 本项目仅用于学习和研究

License

MIT

Questions about Bilibili

What is the Bilibili MCP server?

B站 MCP Server - 支持搜索/评论/字幕/弹幕/回复. Bilibili is maintained by adoresever on GitHub at adoresever/bilibili-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Bilibili MCP server?

Bilibili doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (adoresever/bilibili-mcp). Like most servers, Bilibili ends with a command or URL you paste into your AI app's MCP config.

Does Bilibili need an API key?

The registry lists no required keys for Bilibili. Check the Bilibili README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Bilibili an official MCP server?

No. Bilibili is a community server maintained by adoresever. Community servers can be excellent; read the code and the open issues before you give Bilibili access to company data.

What license is Bilibili under?

Bilibili is released under the MIT license, according to its GitHub repository. The license covers the code of Bilibili; the service it connects to has its own terms.