Bilibili Comments MCP Server

基于 Model Context Protocol (MCP) 的 B 站视频与动态评论获取工具

Local serverstdio

What is the Bilibili Comments MCP MCP server?

If you want an AI assistant working directly with Bilibili Comments MCP, the bilibili comments mcp mcp server is the bridge. 基于 Model Context Protocol (MCP) 的 B 站视频与动态评论获取工具.

What Bilibili Comments MCP does

  1. 登录 B 站网页版 2. 打开开发者工具 (F12) 3. 切换到 Network 标签 4. 刷新页面,找到任意请求 5. 复制 Request Headers 中的 Cookie 值

Tools it exposes

Once connected, the assistant can call these 9 tools directly:

  • page — 页码,默认1
  • pageSize — 每页数量(1-20),默认20
  • sort — 排序:0按时间,1按热度
  • includeReplies — 是否包含楼中楼回复,默认true
  • outputFormat — 输出格式:markdown 或 json,默认markdown
  • cookie — B站Cookie(可选)
  • dynamic_id — 动态ID(必需)
  • get_video_comments — The get_video_comments tool exposed by this server
  • get_dynamic_comments — The get_dynamic_comments tool exposed by this server

Installing the bilibili comments mcp mcp server

Setup follows the standard MCP pattern: clone or install the server, then register it in your client's configuration file and restart the client. The configuration snippets on this page cover Claude Desktop, Claude Code and Cursor.

Configuration

The server reads one environment variable: BILIBILI_SESSDATA. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Bilibili Comments MCP sits in that group, and the shape of its toolset — page, pageSize, sort among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • With 9 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use Bilibili Comments MCP.
  • Maintained by 222wcnm.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the bilibili comments mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
page页码,默认1
pageSize每页数量(1-20),默认20
sort排序:0按时间,1按热度
includeReplies是否包含楼中楼回复,默认true
outputFormat输出格式:markdown 或 json,默认markdown
cookieB站Cookie(可选)
dynamic_id动态ID(必需)
get_video_commentsThe get_video_comments tool exposed by this server.
get_dynamic_commentsThe get_dynamic_comments tool exposed by this server.

How to install the Bilibili Comments MCP MCP server

{
  "mcpServers": {
    "bilibili-comments": {
      "command": "npx",
      "args": ["-y", "bilibili-comments-mcp"],
      "env": {
        "BILIBILI_SESSDATA": "your_bilibili_sessdata_here"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
BILIBILI_SESSDATAConfiguration value read at startup.Optional

Example prompts to try

  • Use Bilibili Comments MCP to page.
  • Use Bilibili Comments MCP to pageSize.
  • Use Bilibili Comments MCP to sort.

Frequently asked questions

It connects Bilibili Comments MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 9 tools (page, pageSize, sort, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Bilibili Comments MCP directly.