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 "Install 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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sunwu51/bilibili-info-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server