bilibili-mcp-server

MCP.Pizza Chef: huccihuang

The bilibili-mcp-server is an MCP server that interfaces with the Bilibili API, enabling various operations such as general and precise searches for users, videos, live streams, and articles. It supports filtering for exact matches and retrieving video danmaku (comments). This server integrates seamlessly with MCP clients, facilitating real-time, structured access to Bilibili content for enhanced AI workflows.

Use This MCP server To

Perform keyword-based general searches on Bilibili content Search Bilibili users sorted by follower count Execute precise user, video, live, and article searches with exact match filtering Retrieve danmaku (comments) for specific Bilibili videos Integrate Bilibili content queries into AI-driven applications Enable real-time access to Bilibili data within MCP client environments

README

Bilibili API MCP Server

用于哔哩哔哩 API 的 MCP(模型上下文协议)服务器,支持多种操作。

环境要求

  • uv - 一个项目管理工具,可以很方便管理依赖。

使用方法

  1. clone 本项目

  2. 使用 uv 安装依赖

uv sync
  1. 在任意 mcp client 中配置本 Server
{
  "mcpServers": {
    "bilibili": {
      "command": "uv",
      "args": [
        "--directory",
        "/your-project-path/bilibili-mcp-server",
        "run",
        "bilibili.py"
      ]
    }
  }
}
  1. 在 client 中使用

支持的操作

支持以下操作:

  1. general_search: 基础搜索功能,使用关键词在哔哩哔哩进行搜索。
  2. search_user: 专门用于搜索哔哩哔哩用户的功能,可以按照粉丝数排序。
  3. get_precise_results: 精确搜索功能,可以过滤掉不必要的信息,支持多种搜索类型:
    • 用户搜索 (user):精确匹配用户名,只返回完全匹配的结果。例如搜索"双雷"只会返回用户名为"双雷"的账号信息,不会返回其他相关用户
    • 视频搜索 (video)
    • 直播搜索 (live)
    • 专栏搜索 (article) 返回结果包含 exact_match 字段,标识是否找到精确匹配的结果。
  4. get_video_danmaku·: 获取视频弹幕信息。

如何为本项目做贡献

  1. Fork 本项目
  2. 新建分支,并在新的分支上做改动
  3. 提交 PR

License

MIT

bilibili-mcp-server FAQ

How do I configure the bilibili-mcp-server with an MCP client?
Clone the project, install dependencies using uv, then configure the MCP client with the server command and path as specified in the README.
What search types does bilibili-mcp-server support?
It supports general keyword search, user search sorted by followers, and precise searches for users, videos, live streams, and articles with exact match filtering.
Can I retrieve video comments using this server?
Yes, the server supports fetching danmaku (comments) for Bilibili videos.
What environment is required to run bilibili-mcp-server?
The server requires the uv project management tool to manage dependencies and run the server script.
Is the bilibili-mcp-server open for contributions?
Yes, contributions are welcome via fork, branch, and pull request on the GitHub repository.
What license governs the bilibili-mcp-server?
The project is licensed under the MIT License.
Can this server be used with multiple MCP clients?
Yes, it can be configured and used with any MCP client that supports external servers.
Does the server provide exact match results for user searches?
Yes, it can filter and return only exact username matches to improve search accuracy.