Skip to main content
Glama
masx200

Bilibili Video Info MCP

by masx200

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"
    }
  }
}

Related MCP server: Bilibili API MCP Server

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"

Standard Bilibili video links are supported, such as:

Available Tools

3 tools
get_commentsB
Read-only

Get popular comments from a Bilibili video

Args:
    url: Bilibili video URL, e.g., https://www.bilibili.com/video/BV1x341177NN
    
Returns:
    List of popular comments including comment content, user information, and metadata such as like counts
ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=true and openWorldHint=false, which the description doesn't contradict. The description adds value by specifying that it retrieves 'popular comments' (implying a filtered subset) and details the return content (comment content, user info, metadata like like counts), which goes beyond the annotations. However, it doesn't cover aspects like rate limits, authentication needs, or pagination behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose. The 'Args' and 'Returns' sections are structured for clarity, with no wasted sentences. However, the example URL is somewhat long, and the return description could be slightly more concise, but overall it's efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema), the description is adequate but has gaps. It explains the parameter and return values, but without annotations covering all behavioral aspects (e.g., no output schema means return format isn't fully defined), it could benefit from more details on error handling or limitations. It's complete enough for basic use but not fully comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and only one parameter, the description compensates well by explaining the 'url' parameter: 'Bilibili video URL, e.g., https://www.bilibili.com/video/BV1x341177NN.' This adds clear meaning beyond the schema, including an example, though it could specify format constraints more explicitly. The baseline for 0 parameters would be 4, and this meets that standard.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get popular comments from a Bilibili video.' It specifies the verb ('Get'), resource ('popular comments'), and target ('Bilibili video'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like get_danmaku or get_subtitles, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools (get_danmaku, get_subtitles) or clarify scenarios where this tool is preferred, such as for popular versus all comments. Usage is implied by the purpose but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_danmakuA
Read-only

Get danmaku (bullet comments) from a Bilibili video

Args:
    url: Bilibili video URL, e.g., https://www.bilibili.com/video/BV1x341177NN
    
Returns:
    List of danmaku (bullet comments) with content, timestamp and user information
ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, indicating a safe read operation with limited scope. The description adds valuable context by specifying the return format ('List of danmaku with content, timestamp and user information'), which is not covered by annotations, enhancing behavioral understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for purpose, args, and returns, using minimal sentences. However, the 'Args' and 'Returns' labels are slightly redundant given the schema context, slightly reducing efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with annotations covering safety and scope, the description adequately explains purpose and parameters. However, without an output schema, it partially describes returns but lacks details like pagination or error handling, leaving some gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining the single parameter 'url' as a 'Bilibili video URL' with an example. This adds essential meaning beyond the bare schema, though it doesn't detail format constraints or edge cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get danmaku') and resource ('from a Bilibili video'), distinguishing it from sibling tools like get_comments and get_subtitles by focusing on bullet comments rather than regular comments or subtitles. It provides a concrete example of the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like get_comments or get_subtitles. The description only states what the tool does without indicating scenarios, prerequisites, or exclusions for its use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_subtitlesA
Read-only

Get subtitles from a Bilibili video

Args:
    url: Bilibili video URL, e.g., https://www.bilibili.com/video/BV1x341177NN
    
Returns:
    List of subtitles grouped by language. Each entry contains subtitle content with timestamps.
ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=true and openWorldHint=false, which the description does not contradict. The description adds valuable context beyond annotations by specifying the return format ('List of subtitles grouped by language' with 'subtitle content with timestamps'), enhancing behavioral understanding without repeating annotation information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core purpose, followed by concise sections for Args and Returns. Every sentence adds value without redundancy, making it efficient and easy to parse for an AI agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema), the description is largely complete: it covers purpose, parameter semantics, and return format. However, it lacks explicit usage guidelines compared to siblings, which slightly reduces completeness for an agent needing to choose between tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by clearly explaining the single parameter 'url' as a 'Bilibili video URL' and providing an example. This adds essential meaning beyond the bare schema, ensuring the parameter's purpose and format are understood.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get subtitles') and target resource ('from a Bilibili video'), distinguishing it from sibling tools like get_comments and get_danmaku which handle different video content aspects. It provides a concrete example URL, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for extracting subtitles from Bilibili videos but does not explicitly state when to use this tool versus alternatives like get_comments or get_danmaku. No guidance is provided on prerequisites, limitations, or scenarios where this tool is preferred over others, leaving usage context inferred rather than defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
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

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/masx200/bilibili-video-info-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server