Bilibili Search

by huccihuang

91 stars
534 downloads
Not rated
GitHub Website

About

Enables search across Bilibili's Chinese video platform through a lightweight FastMCP interface that retrieves video content, user information, and other searchable data with optional authentication via session cookies.

Details

Author
huccihuang
Repository
huccihuang/bilibili-mcp-server
GitHub stars
91
Downloads
534
License
MIT License
Categories
Productivity, Developer Tools, Design, Media, Search, Infrastructure, Security, API, Knowledge Base, Other

- General search by keyword across Bilibili
- Dedicated user search with follower count sorting
- Precise search filtering unnecessary info (user, video, live, article)
- Retrieve danmaku (barrage) for a specific video

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Bilibili Search
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 --directory
    • Argument 2 /your-project-path/bilibili-mcp-server
    • Argument 3 run
    • Argument 4 bilibili.py

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the project, install dependencies with uv sync, then configure the server in any MCP client using the provided JSON snippet that sets the command to uv with arguments pointing to the bilibili.py script. After configuration, use the client to invoke the supported operations.

general_search

基础搜索功能,使用关键词在哔哩哔哩进行搜索。

search_user

专门用于搜索哔哩哔哩用户的功能,可以按照粉丝数排序。

get_precise_results

精确搜索功能,可以过滤掉不必要的信息,支持多种搜索类型:用户搜索(user)、视频搜索(video)、直播搜索(live)、专栏搜索(article)。返回结果包含 exact_match 字段,标识是否找到精确匹配的结果。

get_video_danmaku

获取视频弹幕信息。

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "bilibili search": {
            "cwd": null,
            "env": {},
            "args": [
                "--directory",
                "/your-project-path/bilibili-mcp-server",
                "run",
                "bilibili.py"
            ],
            "shell": false,
            "command": "uv"
        }
    }
}

Linux

{
    "cwd": null,
    "env": [],
    "args": [
        "--directory",
        "/your-project-path/bilibili-mcp-server",
        "run",
        "bilibili.py"
    ],
    "shell": false,
    "command": "uv"
}

Macos

{
    "cwd": null,
    "env": [],
    "args": [
        "--directory",
        "/your-project-path/bilibili-mcp-server",
        "run",
        "bilibili.py"
    ],
    "shell": false,
    "command": "uv"
}

Windows

{
    "cwd": null,
    "env": [],
    "args": [
        "--directory",
        "/your-project-path/bilibili-mcp-server",
        "run",
        "bilibili.py"
    ],
    "shell": false,
    "command": "uv"
}

Bilibili API MCP Server

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

环境要求

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

使用方法

1. clone 本项目 2. 使用 uv 安装依赖 ``bash uv sync ` 3. 在任意 mcp client 中配置本 Server `json { "mcpServers": { "bilibili": { "command": "uv", "args": [ "--directory", "/your-project-path/bilibili-mcp-server", "run", "bilibili.py" ] } } } ` 4. 在 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
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.