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

bilibili-video-reader-mcp

by limuzi23

Bilibili Video Reader v2.1

Skill + ステートレスMCPサーバーとして構築された読み取り専用のChatGPT/Codexプラグインで、現在はCloudflare Workersをターゲットにしているため、Renderやクレジットカードなしで実行できます。

MCPツール

  • get_bilibili_video_parts(url) — タイトル、作者、説明、すべてのP番号とCID。

  • get_bilibili_part_transcript(url, part, language, max_chars) — 公式/AI字幕トラックと、1つのPに対するタイムスタンプ付きトランスクリプト。

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名は wrangler.jsonc と一致するため、bilibili-video-reader-mcp のままにする必要があります。

デプロイ後、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 にあり、ワークフロースキルは 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
      9 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