Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

MCP server for fetching Bilibili video metadata and subtitles. Supports running locally via stdio transport for integration with MCP clients like Cursor or Claude Desktop.

README.md

bilibili-info-mcp

![npm version](https://www.npmjs.com/package/bilibili-info-mcp) ![GitHub](https://github.com/sunwu51/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

Usage

No installation required. Use directly with npx:

npx bilibili-info-mcp

MCP 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 | |---|---|---| | SESSDATA | Only for subtitles | Bilibili login cookie. Find it in browser DevTools > Application > Cookies > bilibili.com after logging in. |

Tool: get-bilibili-video-info

Fetches Bilibili video metadata and optionally subtitles.

Input

| Parameter | Type | Required | Default | Description | |---|---|---|---|---| | url | string | Yes | - | Bilibili video URL, e.g. https://www.bilibili.com/video/BVxxxxx | | includeSubtitles | boolean | No | false | Whether to fetch subtitles. Requires SESSDATA env var. |

Supported URL formats:

  • https://www.bilibili.com/video/BVxxxxx
  • https://m.bilibili.com/video/BVxxxxx?k=v
  • https://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 | |---|---|---| | title | string | Video title | | author | string | Uploader name | | viewCount | string | Total view count | | description | string | Video description (prefers desc_v2, falls back to desc) | | lengthSeconds | string | Video duration in seconds | | publishDate | string | Publish time in ISO 8601 format with +08:00 timezone | | subtitle | object (optional) | Subtitle track, only present when includeSubtitles is true and subtitles are available |

Subtitle Priority

When includeSubtitles is true, returns a single subtitle track with the following priority:

  1. Chinese (matching 中文, zh-CN, zh-Hans, zh)
  2. 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 build

Project Structure

src/
  index.ts              # MCP server entry point (stdio transport)
  bilibili-fetcher.ts   # Bilibili API calls (video info + subtitles)
  wbi.ts                # WBI signature algorithm implementation

How It Works

  1. Video info -- Calls https://api.bilibili.com/x/web-interface/view?bvid=BVID to get metadata.
  2. WBI keys -- Fetches img_key and sub_key from https://api.bilibili.com/x/web-interface/nav (cached for 1 hour).
  3. Subtitles -- Calls https://api.bilibili.com/x/player/wbi/v2 with WBI signature (w_rid + wts) and SESSDATA cookie to get subtitle URLs, then fetches the subtitle JSON content.

License

ISC

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Browser & Scraping servers.