Skip to main content
Glama
masx200

Bilibili Video Info MCP

by masx200
README.md
# MCP Server for Bilibili Video Info

[![smithery badge](https://smithery.ai/badge/@lesir831/bilibili-video-info-mcp)](https://smithery.ai/server/@lesir831/bilibili-video-info-mcp)
[![English](https://img.shields.io/badge/language-English-blue.svg)](./README.md)
[![中文](https://img.shields.io/badge/language-中文-red.svg)](./README.zh.md)

A Bilibili MCP Server that can retrieve subtitles, danmaku (bullet comments),
and comments information from videos using the video URL.

## Usage

This MCP server supports three transport methods:

1. **stdio**

```json
{
  "mcpServers": {
    "bilibili-video-info-mcp": {
      "command": "uvx",
      "args": [
        "bilibili-video-info-mcp"
      ],
      "env": {
        "SESSDATA": "your valid sessdata"
      }
    }
  }
}
```

2. **sse** (Server-Sent Events) run bilibili-video-info-mcp in sse mode

```bash
cp .env.example .env
uvx run --env .env bilibili-video-info-mcp sse
```

then config your mcp client

```json
{
  "mcpServers": {
    "bilibili-video-info-mcp": {
      "url": "http://{your.ip.address}:$PORT$/sse"
    }
  }
}
```

3. **streamable-http** (HTTP Streaming) run bilibili-video-info-mcp in
   streamable-http mode

```bash
cp .env.example .env
uvx run --env .env bilibili-video-info-mcp streamable-http
```

then config your mcp client

```json
{
  "mcpServers": {
    "bilibili-video-info-mcp": {
      "url": "http://{your.ip.address}:$PORT$/mcp"
    }
  }
}
```

## MCP Tools List

### 1. Get Video Subtitles

```json
{
  "name": "get_subtitles",
  "arguments": {
    "url": "https://www.bilibili.com/video/BV1x341177NN"
  }
}
```

### 2. Get Video Danmaku (Bullet Comments)

```json
{
  "name": "get_danmaku",
  "arguments": {
    "url": "https://www.bilibili.com/video/BV1x341177NN"
  }
}
```

### 3. Get Video Comments

```json
{
  "name": "get_comments",
  "arguments": {
    "url": "https://www.bilibili.com/video/BV1x341177NN"
  }
}
```

## FAQ

### 1. How to find SESSDATA?

1. Log in to the Bilibili website
2. Open browser developer tools (F12)
3. Go to Application/Storage -> Cookies
4. Find the value corresponding to SESSDATA

### 2. Error "SESSDATA environment variable is required"

Make sure you have set the environment variable:

```bash
export SESSDATA="your SESSDATA value"
```

### 3. What video link formats are supported?

Standard Bilibili video links are supported, such as:

- https://www.bilibili.com/video/BV1x341177NN
- https://b23.tv/xxxxx (short links)
- Any link containing a BV number

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose targeting different aspects of video content: comments, danmaku (bullet comments), and subtitles. There is no overlap in functionality, and the descriptions make it easy to differentiate between these three types of video metadata.

Naming Consistency5/5

All tools follow a consistent 'get_noun' pattern (get_comments, get_danmaku, get_subtitles) using snake_case throughout. This predictable naming convention makes it easy for agents to understand what each tool does based on its name alone.

Tool Count3/5

With only 3 tools, the server feels somewhat thin for a video information domain. While the tools cover specific metadata types well, there are likely other relevant operations (like getting video details, statistics, or user info) that would make the surface more complete for typical video analysis workflows.

Completeness2/5

The toolset has significant gaps for a video information server. There's no way to get basic video metadata (title, description, duration, uploader), statistics (views, likes, shares), or user information. While the three tools provide specific content types, they don't cover the fundamental video information that would typically be needed first in most workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues