Skip to content
MCP server

Bilibili Watch MCP

MCP server that gives AI agents subtitles, danmaku and keyframes from Bilibili videos

Runs locally

Bilibili Watch MCP is an open-source MCP server for video processing. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Linux, macOS
Runs
Locally
Version
0.1.1
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add bilibili-watch-mcp --env BILI_SESSDATA='<BILI_SESSDATA>' -- uvx bilibili-watch-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "bilibili-watch-mcp": {
      "command": "uvx",
      "args": [
        "bilibili-watch-mcp"
      ],
      "env": {
        "BILI_SESSDATA": "<BILI_SESSDATA>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "bilibili-watch-mcp": {
      "command": "uvx",
      "args": [
        "bilibili-watch-mcp"
      ],
      "env": {
        "BILI_SESSDATA": "<BILI_SESSDATA>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "bilibili-watch-mcp": {
      "command": "uvx",
      "args": [
        "bilibili-watch-mcp"
      ],
      "env": {
        "BILI_SESSDATA": "<BILI_SESSDATA>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "bilibili-watch-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "bilibili-watch-mcp"
      ],
      "env": {
        "BILI_SESSDATA": "<BILI_SESSDATA>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add bilibili-watch-mcp --env BILI_SESSDATA='<BILI_SESSDATA>' -- uvx bilibili-watch-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.bilibili-watch-mcp]
command = "uvx"
args = ["bilibili-watch-mcp"]
env = { BILI_SESSDATA = "<BILI_SESSDATA>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "bilibili-watch-mcp": {
      "command": "uvx",
      "args": [
        "bilibili-watch-mcp"
      ],
      "env": {
        "BILI_SESSDATA": "<BILI_SESSDATA>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e BILI_SESSDATA='<BILI_SESSDATA>' bilibili-watch-mcp uvx -- bilibili-watch-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "bilibili-watch-mcp": {
          "command": "uvx",
          "args": [
            "bilibili-watch-mcp"
          ],
          "env": {
            "BILI_SESSDATA": "<BILI_SESSDATA>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • BILI_SESSDATAOptional Bilibili session cookie for AI subtitles and better search success. Preferred alternative: run a debug-enabled Chrome (see README) and the server pulls SESSDATA over CDP automatically.
  • BILI_WATCH_OUTDirectory where fetched materials (metadata, subtitles, sprites, frames) are written.

About Bilibili Watch MCP

Bilibili Watch MCP lets an AI agent work through a Bilibili video without downloading it for viewing. It returns subtitle text with timestamps, the danmaku bullet comments, and contact sheets of thumbnails sampled across the video's progress bar. Optional high-resolution frames can be extracted when on-screen slides or code need to be read.

The server is built on yt-dlp for fetching, with two signature-free endpoints used for danmaku and sprite sheets. Search works without a login. Logging in, either by pointing the server at a debug-enabled Chrome session or by setting a session cookie variable, unlocks AI-generated subtitles. Fetched materials are written to a configurable output folder.

It suits developers using tool-driven agents such as Claude Code or Cline who need to answer questions about lectures, tutorials or coding demos on Bilibili. Personal, low-volume use is the intended pattern, since heavy request rates can get an IP rate-limited.

Tools this server provides (2)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 2 tools reads data; 1 name doesn't say.

From the server's own tool labels and tool names; not verified by us.

search_videosName suggests: reads
Login-free site search returning BV id, title, uploader, duration and plays.
watch_video
Fetches metadata, inline subtitle text, danmaku and sprite sheets, with optional frame extraction.

What it does

Subtitle text extraction
Returns a compact transcript with one line per minute and [mm:ss] timestamps.
Danmaku retrieval
Fetches the bullet comments that viewers posted over the video timeline.
Sprite contact sheets
Provides grids of progress-bar thumbnails to locate where a moment occurs.
Optional high-res frames
Extracts uniform and scene-cut frames at 854px so slide and code text is readable.
Login-free search
Searches Bilibili videos by keyword and returns BV ids, titles and durations.
Optional session login
Reads a session cookie from a debug browser or environment variable for AI subtitles.

Good for

  • Reading a lecture or tutorial transcript inside an agent without watching the video
  • Locating a specific moment in a long video using sprite contact sheets
  • Reading code or slides shown on screen in a coding demo
  • Searching Bilibili for relevant videos from within an agent workflow
  • Collecting viewer danmaku to gauge reactions to a segment

Pricing

Open source

Free and MIT licensed; self-hosted via pip or uvx.

Bilibili Watch MCP FAQ

Does Bilibili Watch MCP need a Bilibili login?

Search, subtitles for CC tracks, danmaku, sprite sheets and up to 1080p work without login. AI-generated subtitles require a session cookie.

Does Bilibili Watch MCP download the full video?

No. When frames are requested, it downloads a low-quality stream, extracts frames and then deletes the video.

How do I install Bilibili Watch MCP?

Install with pip install bilibili-watch-mcp or run it with uvx. ffmpeg does not need separate installation because a static binary is bundled.

Which clients can use Bilibili Watch MCP?

The README shows configuration for Claude Code and Claude Desktop, and mentions Cline as a supported tool-using agent.

Is Bilibili Watch MCP free?

Yes. Bilibili Watch MCP is open source, so you can use and self-host it for free.

How do I add Bilibili Watch MCP to Claude Code?

Run this command in your terminal: claude mcp add bilibili-watch-mcp --env BILI_SESSDATA='<BILI_SESSDATA>' -- uvx bilibili-watch-mcp

What are the best alternatives to Bilibili Watch MCP?

The closest alternatives to Bilibili Watch MCP are YouTube for AI Agents, Bilibili MCP Server, AwesomeVideo and Braiv.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers