Skip to main content
Glama
bilibili-video-reader-mcp

bilibili-video-reader-mcp

by limuzi23

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

仪表板路径

  1. 创建/登录 Cloudflare 账户。

  2. 打开 Workers & Pages → Create → Import a repository(措辞可能略有不同)。

  3. 连接 GitHub 并选择 limuzi23/bilibili-video-reader-mcp。

  4. 将仓库根目录保留为根目录。

  5. Cloudflare 应自动检测到 wrangler.jsonc。

  6. 使用默认部署命令:npx wrangler deploy。

  7. 部署。

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/health

MCP 端点:

https://bilibili-video-reader-mcp.<your-subdomain>.workers.dev/mcp

对于公开字幕,无需运行时密钥。

可选的私有登录状态

如果某个字幕仅在登录后可见,Worker 可以读取名为 BILI_COOKIE 的可选 Cloudflare 密钥。请仅在 Cloudflare 加密的 Variables and Secrets UI 中进行配置。切勿将原始 cookie 粘贴到 ChatGPT 中,也切勿将其提交到 GitHub。

连接到 ChatGPT

  1. ChatGPT → Settings → Security and login → 启用 Developer mode。

  2. 打开 Plugins,点击 +,并注册以 /mcp 结尾的已部署 URL。

  3. 从创建的连接中复制技术 ID。它以 plugin_asdk_app_ 开头。

  4. 如果插件打包流程需要应用引用,请运行 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…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for fetching Bilibili video metadata and subtitles. Supports running locally via stdio transport for integration with MCP clients like Cursor or Claude Desktop.
      1
      10 npm
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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.
      1
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables 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.
      16
      170 PyPI
      3
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      15
      1
      MIT