# Bilibili MCP Server

Give an AI agent access to Bilibili video search, subtitles, comments, and account collections. Node.js 20+ and account setup are required.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 40
- Author: XZXZZX-Ai
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/XZXZZX-Ai/bilibili-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/bilibili-mcp-server

## What it does

The server lets an agent search for videos and creators, inspect video details, and browse a creator’s profile, uploads, series, and posts. It can retrieve subtitles, find matching phrases with timestamps, read comments and replies, and page through collections visible to the signed-in account. It connects as a local stdio server.

You need Node.js 20 or later. After adding the server to Claude Code, run `npx -y @xzxzzx/bilibili-mcp@latest setup` and then `npx -y @xzxzzx/bilibili-mcp@latest check`. Reconnect the client and call `check_bilibili_credentials` to verify the live session. Enter cookies in the local terminal; the configuration file is not guaranteed to receive OS-level encryption.

For videos without available subtitles, you can install a local faster-whisper model during setup and request ASR transcription. The feature is off by default and needs a ready model. Bilibili AI-generated subtitles may be inaccurate, so they should not be treated as human-verified quotations.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add bilibili-mcp -- npx -y @xzxzzx/bilibili-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add bilibili-mcp-server -- npx -y @xzxzzx/bilibili-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "bilibili-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@xzxzzx/bilibili-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "bilibili-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@xzxzzx/bilibili-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add bilibili-mcp-server npx -y @xzxzzx/bilibili-mcp
```

## When to use it
- find Bilibili videos by topic and select one by BVID
- retrieve subtitles with timestamps
- locate a phrase in a transcript and open its video moment
- read a video's comments and replies
- list videos in collections visible to the account

## Example prompts
- Find Bilibili videos about discrete mathematics and return their titles, creators, lengths, and BVIDs.
- Read the subtitles for `BV1Eb411u7Fw` with timestamps and find mentions of functions.
- Check my Bilibili login with `check_bilibili_credentials`, then search for videos about programming.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
