bilibili-video-reader-mcp
Bilibili Video Reader v2.1
一个只读的 ChatGPT/Codex 插件,构建为 Skill + 无状态 MCP 服务器,现在面向 Cloudflare Workers,因此无需 Render 或信用卡即可运行。
MCP 工具
get_bilibili_video_parts(url)— 标题、作者、描述、所有 P 编号和 CID。get_bilibili_part_transcript(url, part, language, max_chars)— 单个 P 的官方/AI 字幕轨道和带时间戳的转录文本。
Worker 直接调用 Bilibili 的元数据/播放器/字幕端点。字幕模式无需下载视频。
Related MCP server: video-context
部署到 Cloudflare Workers
仪表板路径
创建/登录 Cloudflare 账户。
打开 Workers & Pages → Create → Import a repository(措辞可能略有不同)。
连接 GitHub 并选择
limuzi23/bilibili-video-reader-mcp。将仓库根目录保留为根目录。
Cloudflare 应自动检测到
wrangler.jsonc。使用默认部署命令:
npx wrangler deploy。部署。
Worker 名称必须保持为 bilibili-video-reader-mcp,因为它与 wrangler.jsonc 匹配。
部署后,Cloudflare 会提供一个类似以下的 URL:
https://bilibili-video-reader-mcp.<your-subdomain>.workers.dev健康检查:
https://bilibili-video-reader-mcp.<your-subdomain>.workers.dev/healthMCP 端点:
https://bilibili-video-reader-mcp.<your-subdomain>.workers.dev/mcp对于公开字幕,无需运行时密钥。
可选的私有登录状态
如果某个字幕仅在登录后可见,Worker 可以读取名为 BILI_COOKIE 的可选 Cloudflare 密钥。请仅在 Cloudflare 加密的 Variables and Secrets UI 中进行配置。切勿将原始 cookie 粘贴到 ChatGPT 中,也切勿将其提交到 GitHub。
连接到 ChatGPT
ChatGPT → Settings → Security and login → 启用 Developer mode。
打开 Plugins,点击
+,并注册以/mcp结尾的已部署 URL。从创建的连接中复制技术 ID。它以
plugin_asdk_app_开头。如果插件打包流程需要应用引用,请运行
python scripts/configure_plugin.py plugin_asdk_app_YOUR_ID。
OpenAI 插件清单位于 .codex-plugin/plugin.json,工作流 Skill 位于 skills/bilibili-video-reader/。
本地开发
npm install
npm run dev如有需要,可从本地终端部署:
npm run deploy端点:
GET /health
MCP /mcp架构
当前生产路径为:
ChatGPT Skill
↓
Cloudflare Workers /mcp
↓
Bilibili metadata/player/subtitle APIs
↓
structured multi-P metadata + timestamped subtitles旧的 server/ Python 实现仅作为参考/遗留实现保留在仓库中;Cloudflare 不使用它。
当前范围
v2.1 专注于 多 P 元数据 + 官方/AI 字幕。它尚不下载音频/视频、运行 Whisper ASR,或从视频帧中 OCR 源代码。这些功能计划在字幕路径端到端验证之后再进行。
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
Bilibili (B站) data without login: video stats, comments, danmaku, creators, trending, hot searches.
Bilibili public video, article, dynamic, creator, comments, reactions, and transcript tools.
Parse short-video share links into watermark-free direct URLs via MCP for AI assistants.
Parse short-video share links into watermark-free direct URLs via MCP for AI assistants.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for fetching Bilibili video metadata and subtitles. Supports running locally via stdio transport for integration with MCP clients like Cursor or Claude Desktop.19 npmISC
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to summarize, take notes on, and answer questions about YouTube, Bilibili, and Xiaohongshu videos by providing subtitles and local speech transcription with timestamps via MCP.1MIT
- AlicenseBqualityBmaintenanceEnables reading public Bilibili video information — keyword search, UP profiles and uploads, video details and parts, comments and replies, danmaku, subtitles, and frame snapshots — through an MCP interface, with optional Bilibili login for authenticated features such as comments and subtitles.16170 PyPI3Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI clients to query and download Bilibili video data, including metadata, streams, danmaku, subtitles, comments, search, hot lists, users, live rooms, and account read-only items through MCP tools.151MIT