bilibili_live_like
Enables Bilibili account login via QR code and interaction with Bilibili live rooms, including resolving room information, checking stream status, and starting/stopping background live-like tasks with configurable intervals, limits, dry-run mode, and fastest-mode pacing.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
B 站直播点赞插件
同一份 Node.js 项目,提供 Codex MCP 和 dsh-Go 原生 DSH 插件两个入口。单个 B 站账号、单个直播间、一个共享后台任务。无需 OpenAI API Key。
持续运行是指程序不断按间隔发起请求,直到手动停止、达到上限或遇到错误。B 站服务端可能限流、拒绝请求或不计入点赞,不能保证无限有效赞,也不能保证账号不受限制。插件不绕过验证码、风控或平台限额。
已实现
使用哔哩哔哩 App 扫码登录,不向模型提供 Cookie 或密码。
输入直播间短号、真实房间号或完整链接,解析主播 UID 和开播状态。
已登录账号补齐 B 站正常客户端设备会话,经主站和直播接口双重核对后进房点赞。默认每 10 秒请求 1 赞;手动参数为 3–3600 秒、每批 1–50 赞,执行时进一步受房间下发参数约束。
--fastest/speed="fastest"自动读取房间的批量数量和最小上报间隔,并每分钟刷新。例如本次目标房间下发每批 15 赞、最小间隔 5 秒,对应理论约 180 个请求赞/分钟;不保证所有请求最终计入。不限时、不限请求点赞数,或自行设置上限;未开播时每分钟检查一次,也可直接停止。
独立后台进程运行,关闭聊天后继续;查询状态、停止任务和退出本机登录。
登录失效、平台风控立即暂停;网络故障及 B 站
-504临时错误会退避等待后自动恢复,等待最长 5 分钟,不会因连续 5 次临时失败就永久停止。dry run 不读取账号、不进房、不发点赞,仅查询公开房间并模拟。
dsh-Go 工具卡显示状态和二维码;可长按二维码保存到相册,再用 B 站 App 识别。
acceptedLikes 仅统计点赞接口返回 code=0 的请求数量,不是已核验的最终计入数。超时或取消的在途点赞记入 uncertainRequests,不立即重发。
Related MCP server: NetEase Music Local MCP
环境
Node.js 24.9 或以上。本机开发测试使用 Node 24.15.0、MCP SDK 1.32.2、DSH tools 0.2.2-rc.1。dsh-Go 手机本机引擎自带 Node 和 DSH;其他主机自行准备。
下载 Release 安装包,或克隆源码:
git clone https://github.com/ylty1516/bilibili-live-like-plugin.git
cd bilibili-live-like-plugin
npm.cmd ci --ignore-scripts
node bin/cli.js help接入 Codex
Windows 安装脚本会通过 Codex 自带命令注册 MCP:
& .\scripts\install-codex.ps1也可运行 node bin/cli.js mcp-config,把输出合入 ~/.codex/config.toml。命令使用当前 Node 和插件的绝对路径。更换源码位置后要更新配置。重新加载客户端或新开聊天后,在 MCP 工具列表查看 bilibili_live_like。
卸载入口:& .\scripts\install-codex.ps1 -Remove。移除入口不会停止已经运行的后台任务,先执行 node bin/cli.js shutdown。
接入 dsh-Go
在 DSH 引擎实际运行的机器上安装。手机本机引擎用 App 内终端;SSH 或中转主机则在远端主机终端操作。电脑上的文件不会自动传到手机。
将源码压缩包传到手机并解压,建议保存在 /root/.dsh/dsh-go/plugins/bilibili-live-like-plugin。例如启用手机文件访问后,从 /sdcard/Download/ 复制进去。进入插件目录运行:
sh scripts/install-dsh.sh也可以直接在 App 本机终端克隆:
mkdir -p /root/.dsh/dsh-go/plugins
cd /root/.dsh/dsh-go/plugins
git clone https://github.com/ylty1516/bilibili-live-like-plugin.git
cd bilibili-live-like-plugin
sh scripts/install-dsh.sh手工安装等效步骤:先安装依赖,再执行 dsh plugin --profile web add /绝对路径/插件目录。本地路径安装会链接该目录,请保留它。修改 lib/ 后重启引擎。工具结果使用 presentationMeta 显示原生卡片,不依赖只在本机可用的额外桥接插槽。
安装可分发的 .tgz 包时,在引擎主机运行:
dsh plugin --profile web add /绝对路径/dsh-bilibili-live-like-0.1.2.tgz宿主必须提供兼容的 @deepseek-ai/dsh-tools。完整手机 App 的扫码、长按保存等交互还需在你的设备上确认;本项目的自动检查验证的是实际 DSH 工具注册和视图协议。
共享范围:同一台机器、同一操作系统用户、相同 BILI_LIKE_HOME 使用同一个后台服务。Codex 和 DSH 因此能互相查询和停止任务。手机本机引擎和 Windows 是两台主机,分别安装和登录,各自运行任务;不会自动跨网络共享状态。单账号单任务限制适用于该用户数据目录,请勿在不同主机重复启动同一账号。
直接在终端使用
扫码登录会打开本机二维码页面,终端等待登录结果:
node bin/cli.js login
node bin/cli.js account
node bin/cli.js room https://live.bilibili.com/你的房间号先模拟 3 次,不进房、不发点赞:
node bin/cli.js start 你的房间号 --dry-run --max-likes 3 --interval 3
node bin/cli.js status真实账号持续点赞,直到手动停止:
node bin/cli.js start 你的房间号 --interval 10 --count 1
node bin/cli.js status
node bin/cli.js stop按房间当前下发参数尽快持续点赞:
node bin/cli.js start 你的房间号 --fastest--fastest 与 --interval、--count 不同时使用。主站与直播 API 的登录态都会核对;插件登录保存在独立会话中,不会自动让另一个浏览器页面登录。
限制为 30 分钟或接口接受 100 个请求赞,先达到哪个就停止:
node bin/cli.js start 你的房间号 --duration 30 --max-likes 100关闭后台服务:node bin/cli.js shutdown。删除登录凭据:node bin/cli.js logout。机器休眠、断电或强行终止服务会中断任务;服务重启会标记 interrupted,不会自动恢复旧任务。
如扫码在某台主机无法使用,支持在本机终端经标准输入管道导入已有 Cookie:node bin/cli.js login --cookie-stdin。不要把 Cookie 放在命令行参数、配置示例、聊天或项目目录中。
在聊天中使用
“调用
bili_login_begin,展示二维码,我要登录 B 站。”扫码后:“用刚才的 loginId 调用
bili_login_poll,再确认账号。”“为直播间 123456 开始持续点赞,使用 fastest 模式,不设时长和总数上限。”
“查询 B 站点赞状态。” / “停止 B 站点赞。”
工具 | 作用 |
| 获取二维码、登录页和 loginId |
| 检查扫码确认并保存本机登录 |
| 查询当前账号,不返回凭据 |
| 停止任务并删除本机凭据 |
| 查询直播间和主播信息 |
| 开始后台任务,支持 dryRun |
| 状态、接口接受数、模拟数、错误 |
| 停止并取消在途请求 |
数据与实现
Windows 默认数据目录是 %LOCALAPPDATA%\bilibili-live-like;Linux/手机本机引擎默认是 ~/.local/state/bilibili-live-like。可用环境变量 BILI_LIKE_HOME 指定独立空目录。登录凭据和短期二维码保存在用户数据目录,源码与发布包不包含账号会话。
Windows 使用当前用户的 DPAPI 加密 Cookie,并限制目录 ACL。Linux 使用目录 0700、文件 0600,凭据在文件中以明文保存,仅供该系统用户读取。相同系统用户下的其他程序仍可能访问该账号会话。二维码是短期登录材料,登录完成或过期后删除本机副本;客户端的聊天记录可能保留已展示的二维码。
后台 RPC 仅监听 127.0.0.1 随机端口,带随机令牌,拒绝浏览器跨域请求。Windows 使用独立隐藏进程运行后台服务,故障记录写入用户数据目录的 worker.log;日志与工具结果不包含 Cookie。凭据只发送给固定的 B 站接口。进房接口成功只表示进房动作被接受,不等同于播放视频、观看时长或在线人数已被平台认可。
依赖 B 站当前网页接口,接口变动可能需要更新。未实现自动解验证码、代理轮换、伪造观看心跳或多个账号。
开发与验证
npm.cmd test
npm.cmd run check:dsh
npm.cmd pack --dry-run --json --ignore-scripts实际验证范围见 VALIDATION.md。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Multistream relay control: check live status, switch destinations, manage teams, generate overlays.
Mock REST APIs, fake OAuth2/OIDC provider, uptime monitors + heartbeats, live badge/QR images.
Linux server administration over OAuth MCP: shell, Docker, systemd, files and monitoring.
Control your authorized Windows computers via OAuth: files, shell, apps, and task status.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables users to log in to their own Douyin account via QR code, publish videos or image notes, and perform simple reads such as search, video details, comments, and user posts through a local MCP server.MIT
- AlicenseNot gradedqualityBmaintenanceEnables local QR-code login to NetEase Cloud Music and read-only access to complete liked-song pagination, playlists, search, song details, daily recommendations, and listening history with whole-library recommendation de-duplication.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to search and open Bilibili videos, control a logical playback clock (play/pause/seek), read and post comments, like, coin, favorite, and fetch or export subtitle tracks through compact plain-text tool output. Write operations require a Bilibili login, which can be established by QR scan in an accompanying web console.MIT
- AlicenseNot gradedqualityBmaintenanceProvides read-only access to Bilibili through 25 MCP tools for videos, subtitles, danmaku, comments, Opus, user profiles, feeds, public favorites, video collections, live rooms, public crew lists, images, and video frame capture. Supports single-account QR-code login and Docker Compose deployment.GPL 3.0