哔哩哔哩视频信息获取

imlesir/bilibili-video-info-mcp
8 Stars 1.3k 次浏览 更新于 2026-08-23

这是一个基于MCP(模型上下文协议)的服务器,可以获取Bilibili视频的字幕、弹幕和评论信息。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

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

该服务需要配置环境变量:SESSDATA

服务介绍

MCP Server for Bilibili Video Info

This is a server based on MCP (Model Context Protocol) that can fetch subtitles, danmaku (bullet comments), and comments information of Bilibili videos.

MCP Tool List

1. Get Video Subtitles List

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

2. Get Video Danmaku

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

Usage

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

Frequently Asked Questions

1. What to do if SESSDATA cannot be found?

  1. Log in to the Bilibili website.
  2. Open the 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 the environment variable is set:

bash
export SESSDATA="your SESSDATA value"

Standard Bilibili video links are supported, such as:

License

MIT

相关 MCP 服务