Get the FREE Ultimate OpenClaw Setup Guide →

bilibili

MCP Server for the Bilibili API, supporting various operations.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio huccihuang-bilibili-mcp-server uv --directory /your-project-path/bilibili-mcp-server run bilibili.py \
  --env UV_CONFIG="path to uv configuration if needed"

How to use

This MCP server exposes Bilibili API operations via an MCP-compatible interface. It leverages uv to run a Python-based server (bilibili.py) that supports several bilibili-specific actions, including general search, user search, precise results with type filtering, and retrieving video danmaku. To use it, configure an MCP client with the bilibili entry shown in the README, which launches the server inside your project directory using uv. Once connected, you can invoke the available operations through the MCP client: general_search for keyword-based searches across Bilibili, search_user to find users (sortable by fans, etc.), get_precise_results to perform exact-match searches across user, video, live, and article types with an exact_match indicator, and get_video_danmaku to fetch danmaku data for a video.

After configuring the client, run the MCP client, which will communicate with the bilibili MCP server and return structured results suitable for integration into your app or workflow.

How to install

Prerequisites:

  • uv (the Axial uv project management tool) installed and available in your PATH.
  • A compatible Python environment where bilibili.py can run.
  • Git to clone the repository (optional if you already have the code).

Installation steps:

  1. Clone the repository:
git clone https://github.com/your-org/huccihuang-bilibili-mcp-server.git
cd bilibili-mcp-server
  1. Install dependencies using uv:
uv sync
  1. Ensure the server is accessible to your MCP client by following the example configuration:
{
  "mcpServers": {
    "bilibili": {
      "command": "uv",
      "args": [
        "--directory",
        "/your-project-path/bilibili-mcp-server",
        "run",
        "bilibili.py"
      ]
    }
  }
}
  1. Start the server via the MCP client configuration (the client will manage launching uv with the specified command and arguments).

Additional notes

Tips and notes:

  • Ensure the directory path in the config exactly points to where bilibili.py and its dependencies reside.
  • If you modify the server code, re-run the MCP client configuration or re-run via uv sync as appropriate to reload dependencies.
  • The server exposes operations with an exact_match indicator in precise results; use this to determine if an exact user/video/article match was found.
  • If you encounter environment issues, verify that Python dependencies required by bilibili.py are present in the uv-managed environment.
  • The configuration example uses the bilibili.py script; if your setup uses a different entry point, adjust the args accordingly.
  • If you want to customize environment variables (e.g., API keys, rate limits), you can add them in the env section of the mcp_config.

Related MCP Servers

Sponsor this space

Reach thousands of developers