Bilibili Comments - Secure MCP Server by ALMC Security 2025

Bilibili Comments

View on GitHub

Bilibili-Comments-MCP

一个基于 Model Context Protocol (MCP) 的 B 站视频评论获取工具.

快速开始

1. clone本项目

git clone https://github.com/222wcnm/Bilibili-Comments-MCP.git
cd Bilibili-Comments-MCP

2. 安装依赖

npm install @modelcontextprotocol/sdk axios

3. 配置客户端(如Claude客户端)

在 MCP 客户端的配置文件中添加:

{
  "mcpServers": {
    "bilibili-comments": {
      "command": "node",
      "args": ["/path/to/bilibili_mcp.js"],
      "env": {
        "BILIBILI_COOKIE": "your_bilibili_cookie_here"
      }
    }
  }
}

工具功能

get_video_comments

获取 B 站视频评论,支持分页和楼中楼回复。

参数:

  • bvid / aid - 视频ID(二选一)
  • page - 页码,默认1
  • pageSize - 每页数量(1-49),默认20
  • sort - 排序:0时间,1热度
  • includeReplies - 是否包含楼中楼,默认true
  • cookie - B站Cookie(可选)

示例:

{
  "bvid": "BV1xx411c7mD",
  "page": 1,
  "pageSize": 20,
  "sort": 1,
  "includeReplies": true
}

Cookie 获取

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

相关链接

https://github.com/SocialSisterYi/bilibili-API-collect

Related in Web Scraping - Secure MCP Servers

ServerSummaryActions
PlayMCP Browser Automation ServerA comprehensive MCP (Model Context Protocol) server for browser automation using Playwright. This se...View
MCP Browser Console Capture ServiceMCP Browser Console Capture Service 是一个基于 FastMCP 框架的浏览器自动化服务,专门用于智能舆情分析...View
Lightpanda Go MCP servergomcp is an MCP server written in Go.View
Any Browser MCPNo documentation available.View
Readability ParserThis project is based on the original server-moz-readability implementation of emzimmer. (For the or...View
ApifyThe Apify Model Context Protocol (MCP) Server at mcp.apify.com instantly connects AI applications an...View