基于 Model Context Protocol (MCP) 的 B 站视频与动态评论获取工具
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 站视频与动态评论获取工具.
Once connected, the assistant can call these 9 tools directly:
page — 页码,默认1pageSize — 每页数量(1-20),默认20sort — 排序:0按时间,1按热度includeReplies — 是否包含楼中楼回复,默认trueoutputFormat — 输出格式:markdown 或 json,默认markdowncookie — B站Cookie(可选)dynamic_id — 动态ID(必需)get_video_comments — The get_video_comments tool exposed by this serverget_dynamic_comments — The get_dynamic_comments tool exposed by this serverSetup 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.
The server reads one environment variable: BILIBILI_SESSDATA. Keep credentials in your client's env block or a secrets manager rather than committing them.
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.
| Tool | What it does |
|---|---|
| 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. |
{
"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.
| Variable | Description | Required |
|---|---|---|
| BILIBILI_SESSDATA | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.