Skip to main content
Glama

bilibili-mcp

一个面向 Bilibili(B站)——中国最大的视频平台——的内容智能桥梁。搜索、热门趋势、视频情报和字幕转录总结——核心层级无需账户。

它封装了什么

Bilibili —— 中国的视频分享平台。此服务器不播放视频;它返回元数据、列表和字幕转录文本,以便智能体可以搜索、排序和总结 Bilibili 内容。参见 docs/WRAPPEE.md。

Related MCP server: Bilibili API MCP Server

预览

Dashboard

你能做什么

运行方式

模式

宿主应用

适用时机

无头 / API(默认)

Bilibili 公共 Web API

一切功能——无需账户,无图形界面

Bilibili 是一个 Web 平台,而非本地应用——没有可安装的桌面二进制文件。服务器通过 HTTPS 与 Bilibili 的公共 API 通信。

输入 / 输出

方向

内容

备注

输入

搜索关键词、Bilibili URL(BV.../av...)

bilibili_search、bilibili_video

输出

元数据 + 统计信息、转录文本、评论摘要

bilibili_video、bilibili_transcript

功能

  • 探索 —— 热门流、全站排行榜、热搜关键词(匿名)

  • 搜索 —— 视频和创作者(可能需要 cookie 以通过风控)

  • 视频情报 —— 元数据 + 统计信息、分P列表、热门评论(匿名)

  • 转录 —— 自动字幕文本,用于总结(杀手级功能)

  • 账户层级(可选)—— 关注流、收藏;需要 +86 登录

默认匿名 —— 探索、视频情报和转录功能零配置即可使用。只有账户层级需要中国 +86 登录 cookie。

快速安装

要求:uv(Python)、Bun(Web 应用)。选项 A(推荐):

uv sync
uv run python -m bilibili_mcp.server --mode http --port 11185

或者使用 start.bat / start.ps1 运行完整栈(后端 + Web 应用 + 浏览器)。后端 11185,前端 11186。

第一次使用? 在期望能调用线上接口之前,请先完成 docs/ONBOARDING.md(匿名层级无需任何配置;账户层级需要 +86 登录)。

文档

文档

涵盖内容

Onboarding

账户、+86 手机号问题、首次运行设置

Configuration

环境变量、层级、LLM 提供商

Tools

完整 MCP + REST 参考

Development

项目结构、运行、测试

Troubleshooting

症状 -> 解决方案

Wrappee

关于 Bilibili 平台

SPEC

功能规格 + 阶段计划

层级状态

层级

要求

解锁功能

匿名

无

探索、搜索、视频情报、转录

账户

BILIBILI_COOKIE(+86 登录)

关注流、收藏

许可证

MIT

Available Tools

10 tools
bilibili_accountA

Account-tier operations: tier status, following feed, favorites.

[RATIONALE] The account tier is one logical surface (your logged-in Bilibili world) with several sub-surfaces; one tool with an operation discriminator keeps it compact while the auth-gated ops are honestly marked requires_login.

Return Format

{"success": bool, "operation": str, "data": {...}, "message": str}

Examples

bilibili_account(operation="status") bilibili_account(operation="following") bilibili_account(operation="favorites")

Inputs: operation (required), mid. Returns: data, error, message, success, +3 more

bilibili_exploreA

Discover what is trending on Bilibili: popular feed, rankings, hot keywords.

[RATIONALE] Discovery has three list surfaces (popular, rank, hot search) that share a single 'video-ish list' output; one tool with an operation discriminator keeps the surface compact and discoverable.

Return Format

{"success": bool, "operation": str, "data": [...], "count": int}

Examples

bilibili_explore(operation="trending", limit=10) bilibili_explore(operation="rank", rid=3, limit=15) bilibili_explore(operation="hot_search", limit=10)

Inputs: operation (required), rid, limit. Returns: data, count, error, message, +4 more

bilibili_helpA

Explain how to use the bilibili-mcp server.

Return Format

{"success": bool, "data": {"help": str, "tools": [...]}, "message": str}

Examples

bilibili_help() bilibili_help(topic="transcript")

Inputs: topic. Returns: object

bilibili_shutdownA

Gracefully stop the bilibili-mcp server.

Return Format

{"success": bool, "message": str}

Examples

bilibili_shutdown(confirm=True)

Inputs: confirm. Returns: object

bilibili_transcriptA

Fetch a video's auto-generated subtitle track as plain text.

Returns the transcript as text so an LLM can summarise or translate it. Some videos have no subtitles (or subtitles require login to access); in that case the tool returns an honest, actionable error rather than empty.

Return Format

{"success": bool, "data": {"bvid": str, "cid": int, "lang": str, "text": str, "word_count": int}, "message": str}

Examples

bilibili_transcript(bvid="BV1xx411c7mD") bilibili_transcript(bvid="https://www.bilibili.com/video/BV1xx411c7mD", part_index=2)

Inputs: bvid (required), part_index. Returns: data, error, message, success, +2 more

bilibili_videoA

Inspect a single Bilibili video: metadata, comments, or part list.

Return Format

{"success": bool, "operation": str, "data": {...}, "message": str}

Examples

bilibili_video(operation="info", bvid="BV1xx411c7mD") bilibili_video(operation="comments", bvid="BV1xx411c7mD", limit=10) bilibili_video(operation="pages", bvid="BV1xx411c7mD")

Inputs: operation (required), aid, bvid, limit. Returns: data, error, message, success, +3 more

show_bilibili_cache_cardB

Show and clear the Bilibili response cache.

[RATIONALE] A tiny status surface for the TTL cache - helps debug rate-limit staleness.

Return Format

ToolResult with content + structured PrefabApp card.

Examples

show_bilibili_cache_card()

Inputs: no named parameters.

show_bilibili_status_cardA

Show bilibili-mcp configuration status as a rich in-chat card.

[RATIONALE] Status tools MUST ship a Prefab surface - one call shows tier, cookie state and cache headroom at a glance.

Return Format

ToolResult with content (plain text fallback) + structured PrefabApp card.

Examples

show_bilibili_status_card()

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 10 tools

    Disambiguation4/5

    Core tools cleanly separate account, explore, search, transcript, and video resources. Minor overlap exists between bilibili_explore(trending) and show_bilibili_trending_card, and bilibili_account(operation='status') could be confused with show_bilibili_status_card, but the descriptions make the distinction recoverable.

    Naming Consistency4/5

    All tools use a bilibili_ prefix or show_bilibili_*_card pattern, so the two naming families are internally consistent. The mix of noun-style names like bilibili_account and verb-style names like bilibili_search is a minor deviation but still predictable and readable.

    Tool Count5/5

    Ten tools is well-scoped for a Bilibili-oriented server covering discovery, search, video inspection, transcripts, account data, and system status. The card tools add some redundancy but each has a distinct presentation purpose.

    Completeness4/5

    The read/inspect/search/transcribe workflow is well covered: videos, comments, pages, transcript, search, trending, rankings, hot search, account following, and favorites. Minor gaps include no user profile detail, no comment thread replies, and no authenticated actions beyond reading.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Bilibili (哔哩哔哩) through its API, supporting video search and recommendations, user search, dynamic feeds, video collections, and danmaku retrieval through natural language.
      5
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables models to look up Bilibili's trending videos, keyword search results, video details, and popular danmaku, returning compact plain-text summaries instead of bulky JSON. Works without login, cookies, or extra dependencies, and also runs standalone from the command line.
      MIT