bilibili-info-mcp
Fetches Bilibili video metadata and subtitles, including title, author, view count, description, duration, publish date, and optionally subtitles with WBI signature support.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bilibili-info-mcpget info for bilibili.com/video/BV1GJ411a7U"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bilibili-info-mcp
MCP server for fetching Bilibili video metadata and subtitles. Runs locally via stdio transport.
Features
Fetch video metadata: title, author, view count, description, duration, publish date
Fetch subtitles (requires login cookie): prioritizes Chinese, falls back to English
WBI signature support for reliable subtitle retrieval
Stdio transport for local MCP client integration
Related MCP server: transcriptor-mcp
Usage
No installation required. Use directly with npx:
npx bilibili-info-mcpMCP Client Configuration
Cursor / Claude Desktop
{
"mcpServers": {
"bilibili-info": {
"command": "npx",
"args": ["bilibili-info-mcp"],
"env": {
"SESSDATA": "your_bilibili_sessdata_cookie"
}
}
}
}Environment Variables
Variable | Required | Description |
| Only for subtitles | Bilibili login cookie. Find it in browser DevTools > Application > Cookies > |
Tool: get-bilibili-video-info
Fetches Bilibili video metadata and optionally subtitles.
Input
Parameter | Type | Required | Default | Description |
| string | Yes | - | Bilibili video URL, e.g. |
| boolean | No |
| Whether to fetch subtitles. Requires |
Supported URL formats:
https://www.bilibili.com/video/BVxxxxxhttps://m.bilibili.com/video/BVxxxxx?k=vhttps://bilibili.com/video/BVxxxxx/
Output
{
"title": "Video title",
"author": "Author name",
"viewCount": "12345",
"description": "Video description",
"lengthSeconds": "360",
"publishDate": "2025-01-15T12:00:00+08:00",
"subtitle": {
"languageCode": "zh-Hans",
"content": "Subtitle text content joined by spaces"
}
}Field | Type | Description |
| string | Video title |
| string | Uploader name |
| string | Total view count |
| string | Video description (prefers |
| string | Video duration in seconds |
| string | Publish time in ISO 8601 format with |
| object (optional) | Subtitle track, only present when |
Subtitle Priority
When includeSubtitles is true, returns a single subtitle track with the following priority:
Chinese (matching
中文,zh-CN,zh-Hans,zh)English (matching
English,英语,en,en-US)
Development
git clone https://github.com/sunwu51/bilibili-info-mcp.git
cd bilibili-info-mcp
npm install
npm run buildProject Structure
src/
index.ts # MCP server entry point (stdio transport)
bilibili-fetcher.ts # Bilibili API calls (video info + subtitles)
wbi.ts # WBI signature algorithm implementationHow It Works
Video info -- Calls
https://api.bilibili.com/x/web-interface/view?bvid=BVIDto get metadata.WBI keys -- Fetches
img_keyandsub_keyfromhttps://api.bilibili.com/x/web-interface/nav(cached for 1 hour).Subtitles -- Calls
https://api.bilibili.com/x/player/wbi/v2with WBI signature (w_rid+wts) andSESSDATAcookie to get subtitle URLs, then fetches the subtitle JSON content.
License
ISC
Available Tools
1 toolget-bilibili-video-infoA
Fetches Bilibili video metadata (title, author, duration, description, publish date, view count) and subtitles/captions.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Bilibili video URL, e.g. https://www.bilibili.com/video/BVxxxxx | |
| includeSubtitles | No | Whether to include subtitles/captions in the response. Requires SESSDATA environment variable to be set. |
Output Schema
| Name | Required | Description |
|---|---|---|
| title | Yes | |
| author | Yes | |
| subtitle | No | |
| viewCount | Yes | |
| description | Yes | |
| publishDate | Yes | |
| lengthSeconds | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the burden of behavioral disclosure. 'Fetches' appropriately signals a read-only operation, but the phrasing 'and subtitles/captions' implies subtitles are always returned, whereas the schema shows includeSubtitles defaults to false and requires SESSDATA. The description does not mention authentication, rate limits, or that subtitle inclusion is optional, leaving some ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with no filler, front-loading the main action and then expanding with a parenthetical field list. Every word contributes to the agent's understanding, and the structure is easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter metadata fetcher with an output schema present, the description plus schema covers the essentials. What is missing is an explicit qualifier that subtitles are optional and not returned by default; that detail lives only in the schema, so the description could mislead an agent that does not inspect parameter defaults closely.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes both parameters fully, including the url format example and the includeSubtitles default/requirement. The description adds no parameter-level detail beyond what the schema provides, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Fetches') and a specific resource ('Bilibili video metadata'), and enumerates the exact metadata fields it returns: title, author, duration, description, publish date, view count, plus subtitles/captions. There are no sibling tools to distinguish from, so this is as clear as needed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes the tool's purpose clear, so an agent can infer when to use it: whenever Bilibili video metadata or subtitles are needed. It does not explicitly state exclusions or alternatives, but with no sibling tools, the lack of explicit when/not guidance is less critical.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
get-bilibili-video-info
TDQS
Scored across 1 tool
With only one tool, there is zero ambiguity or potential for misselection. The tool's purpose is fully unique by default.
A single descriptive tool name using a get-<resource>-info pattern. Consistency is trivial but the style is clear and predictable.
One tool feels thin for a video platform server, but it is compact and focused on the 'info' scope. It sits at the low end of the borderline range.
The tool covers metadata and subtitles for a known video, but there is no discovery (search/list/trending) or related operations (comments, chapters). This leaves an agent stranded without a video ID.
Maintenance
Related MCP Connectors
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
MCP server for Hailuo (MiniMax) AI video generation
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server that enables users to search Bilibili videos, access trending rankings, and retrieve detailed information about videos, content creators, and anime schedules. It allows AI applications to interact directly with Bilibili content via simple API interfaces.47 npm192MIT
- AlicenseAqualityAmaintenanceAn MCP server (stdio + HTTP/SSE) that fetches video transcripts/subtitles via yt-dlp, with pagination for large responses. Supports YouTube, Twitter/X, Instagram, TikTok, Twitch, Vimeo, Facebook, Bilibili, VK, Dailymotion. Whisper fallback — transcribes audio when subtitles are unavailable (local or OpenAI API). Works with Cursor and other MCP host821MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides comprehensive video tools: transcript retrieval, video downloading, and automatic subtitle generation using AI speech-to-text. Works with YouTube, Bilibili, Vimeo, and any platform supported by yt-dlp.11MIT
- AlicenseNot gradedqualityCmaintenanceA Bilibili subtitle fetching MCP server that supports various input formats (BV number, video URL, short link) and offers configurable language preferences, output formats, and ASR fallback.8GPL 3.0