Bilibili MCP Server logo

Bilibili MCP Server

Connects AI agents to Bilibili for video, user, comment, danmaku, live, login, and download operations.

Install Bilibili MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "bilibili-mcp-server-2": {
      "command": "npx",
      "args": [
        "-y",
        "bilibili-mcp-server"
      ],
      "env": {
        "BILIBILI_SESSDATA": "YOUR_VALUE_HERE",
        "BILIBILI_BILI_JCT": "YOUR_VALUE_HERE",
        "BILIBILI_DEDE_USER_ID": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

The bilibili-mcp-server MCP server connects AI agents to Bilibili through 31 tools for video search, metadata, subtitles, danmaku, comments, users, articles, notifications, live rooms, authentication, and downloads. It runs through npx or a global npm installation and supports Cookie-based authentication or QR-code login. Use it to research Bilibili content, monitor creators, manage account interactions, inspect live streams, or save videos and articles locally. Authenticated actions such as commenting, following, sending danmaku, and downloading require appropriate account or system configuration.

Use cases

  • Search Bilibili videos and compare engagement metrics
  • Inspect a creator’s latest videos, dynamics, and articles
  • Review comments, danmaku, subtitles, and unread notifications
  • Monitor live rooms and return screenshots for visual analysis
  • Download Bilibili videos or articles for personal backup

Key features

  • Video search, metadata, subtitles, comments, danmaku, and hot lists
  • Bilibili user profiles, creator content, favorites, and social graphs
  • Comment, follow, unfollow, and danmaku actions
  • QR-code login, Cookie refresh, reply detection, and notifications
  • Live-room metadata and screenshot capture
  • Video and Markdown article downloads

Tools31

What Bilibili MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~2.6k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

What it can do

From the 31 tools this server returned when we ran it.

Can delete or modify data · 1Handles credentials · 2Makes network requests · 3Read-only tools · 30
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age108 days
Maintainers1

Observed 2026-11-03 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16h ago via OSV.dev · bilibili-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars7Stargazers on the source repository.
npm downloads16kPackage downloads in the last 30 days.
Last commit3mo agoMost recent push to the default branch.
Tools exposed31Callable tools this server registers over MCP.

How Bilibili MCP Server works

What bilibili-mcp-server does

bilibili-mcp-server exposes Bilibili functions through the Model Context Protocol. Its 31 tools cover public content discovery, account-aware actions, creator activity, live rooms, notifications, authentication, and local downloads.

For video workflows, it can search Bilibili, inspect video statistics and metadata, retrieve comments and danmaku, and return AI-generated subtitle text with timestamps. Search results use Bilibili’s ranking behavior rather than a strict publication-time order, so finding a creator’s newest uploads is better handled by locating the creator’s UID first and then calling the creator video-list tool.

Creator and account tools provide user profiles, uploaded videos, favorites, dynamics, articles, following lists, followers, notifications, and new-reply detection. Write operations include publishing or deleting comments, liking comments, following or unfollowing creators, and sending danmaku.

How it works

The package starts as an MCP process over the command line. An MCP client launches it with npx -y bilibili-mcp-server or invokes the globally installed command, then calls individual tools with their documented parameters.

Authentication can use Bilibili Cookie values supplied through environment variables or a .env file. Alternatively, an agent can call bilibili_login to obtain a QR-code image and login key, have the account scan the code in the Bilibili mobile app, and poll with bilibili_login_check. Successful QR login saves the resulting Cookie. Cookie refresh can be triggered with bilibili_refresh_cookie when a refresh token is configured.

The live screenshot tool returns room metadata and a keyframe for models that can process images. Text-only models can use the accompanying metadata but cannot interpret the picture. Video downloads retrieve separate video and audio streams and use ffmpeg to combine them into an MP4; article downloads save content as Markdown and can optionally include images.

Setup and configuration

Node.js 22 or newer is required. Install ffmpeg separately if video downloads are needed. The package can be run directly:

Terminal
npx bilibili-mcp-server

Or install it globally with npm and run bilibili-mcp-server.

Set these required values using the shell environment or a project-level .env file:

  • BILIBILI_SESSDATA
  • BILIBILI_BILI_JCT
  • BILIBILI_DEDE_USER_ID

Optional settings include BILIBILI_REFRESH_TOKEN for automatic Cookie renewal, BILIBILI_FULL_COOKIE for functions such as hot-search access, BILIBILI_AUTO_REFRESH, BILIBILI_COOKIE_FILE, and BILIBILI_DETECT_FILE. The Cookie fields can be obtained from Bilibili’s browser developer tools. The refresh token is available from the Bilibili site’s stored ac_time_value value.

A client configuration passes the command and credentials in the MCP server’s env object. QR login is available when manually copying Cookie values is undesirable.

Tools and capabilities

  • Search videos and hot-search terms; inspect popular videos.
  • Read video details, comments, subtitles, and danmaku.
  • Publish, delete, and like comments.
  • Read user profiles, videos, favorites, dynamics, articles, followings, and followers.
  • Follow or unfollow creators and monitor replies or unread notifications.
  • Query live-room status and return a current screenshot.
  • Send danmaku, refresh authentication, and perform QR login.
  • Download videos, articles, and a list of completed downloads.

Limitations and notes

Bilibili may apply strict risk controls to account actions. The project advises limiting danmaku sending to five messages per day and avoiding bursts of follow or unfollow operations. Downloaded content is intended for personal backup and should not be redistributed. The live-room popularity value represents a heat metric rather than verified viewer count. Video downloads require ffmpeg, and image interpretation from live screenshots requires a vision-capable model.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Bilibili MCP Server

bilibili-mcp-server is an MCP server that connects AI agents to Bilibili, providing tools for video search and details, subtitles, comments, danmaku, user and creator data, live-room inspection, authentication, notifications, and video or article downloads.

Install it by running `npx bilibili-mcp-server`, or install it globally with npm and run `bilibili-mcp-server`. Node.js 22 or newer is required.

Authenticate with `BILIBILI_SESSDATA`, `BILIBILI_BILI_JCT`, and `BILIBILI_DEDE_USER_ID`, or use `bilibili_login` followed by `bilibili_login_check` to complete QR-code login and save the Cookie.

Yes, it downloads Bilibili videos and combines their audio and video streams into MP4 files. The download tool requires ffmpeg, and downloaded content is intended for personal backup.

Yes, it provides live-room status and metadata through `bilibili_live_info` and returns a current keyframe through `bilibili_live_screenshot`. Image interpretation requires a vision-capable model.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewBilibili MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/bilibili-mcp-server-2?style=directory)](https://allmcps.com/mcp/bilibili-mcp-server-2)
HTML Embed
<a href="https://allmcps.com/mcp/bilibili-mcp-server-2"><img src="https://allmcps.com/api/badge/bilibili-mcp-server-2?style=directory" alt="Bilibili MCP Server on AllMCPs" /></a>