Skip to main content

MCP Server for Bilibili Video Info

English 中文

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
{
    "mcpServers": {
        "bilibili-video-info-mcp": {
            "command": "uvx",
            "args": [
                "bilibili-video-info-mcp"
            ],
            "env": {
                "SESSDATA": "your valid sessdata"
            }
        }
    }
}
  1. sse (Server-Sent Events) run bilibili-video-info-mcp in sse mode
cp .env.example .env
uvx run --env .env bilibili-video-info-mcp sse

then config your mcp client

{
    "mcpServers": {
        "bilibili-video-info-mcp": {
            "url": "http://{your.ip.address}:$PORT$/sse"
        }
    }
}
  1. streamable-http (HTTP Streaming) run bilibili-video-info-mcp in streamable-http mode
cp .env.example .env
uvx run --env .env bilibili-video-info-mcp streamable-http

then config your mcp client

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

MCP Tools List

1. Get Video Subtitles

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

2. Get Video Danmaku (Bullet Comments)

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

3. Get Video Comments

{
  "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:

export SESSDATA="your SESSDATA value"

3. What video link formats are supported?

Standard Bilibili video links are supported, such as:

Metadata

Release files for bilibili-video-info-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bilibili-video-info-mcp 0.2.0
File Size Uploaded
bilibili_video_info_mcp-0.2.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bilibili-video-info-mcp 0.2.0
File Interpreter ABI Platform
bilibili_video_info_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / bilibili_video_info_mcp-0.2.0.tar.gz

Download URL bilibili_video_info_mcp-0.2.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5e78e6533fb222205a340586ffa3be96b563e95d5598e0b73c4dcb84a4ccf6fb
BLAKE2b-256 checksum
How to use checksums
0723066c20a3298ff31e383ad11a80061d7eaffb62fa4d4294ee935cb08e981b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release files / bilibili_video_info_mcp-0.2.0-py3-none-any.whl

Download URL bilibili_video_info_mcp-0.2.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea6d1c992a1646ee30af9bdeaca5bf7d37173ff80fd81fb836853d0152661971
BLAKE2b-256 checksum
How to use checksums
4466bfbb3c81c85378be1d11c1bd12b2173587f445c4c0ca8795b0983ecb9b82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page