Bilibili MCP Server

repository·main·Indexed 41 days ago

https://github.com/huccihuang/bilibili-mcp-server

A Model Context Protocol (MCP) server providing tools to interact with the Bilibili API. It enables AI models to perform general keyword searches, find users, videos, live streams, and articles, and retrieve video danmaku.

Tokens
395
Snippets
1
Records
2
Agent score
2%

What's inside Bilibili MCP Server

  1. Install and configure the Bilibili MCP Server

    main

    To use the Bilibili MCP Server, you must have uv installed. Follow these steps to set up the environment and configure your MCP client:

    1. Clone the repository.
    2. Install dependencies using uv sync.
    3. Configure your MCP client (e.g., Claude Desktop) by adding the server to your configuration file. You must provide the absolute path to the cloned repository in the --directory argument.
    # Install dependencies
    uv sync
    {
      "mcpServers": {
        "bilibili": {
          "command": "uv",
          "args": [
            "--directory",
            "/your-project-path/bilibili-mcp-server",
            "run",
            "bilibili.py"
          ]
        }
      }
    }
  2. Supported Bilibili MCP operations

    main

    The server provides the following tools for interacting with Bilibili:

    • general_search: Performs a basic keyword search on Bilibili.
    • search_user: Searches for Bilibili users with support for sorting by follower count.
    • get_precise_results: Performs filtered searches across different categories. It includes an exact_match field in the response to indicate if a perfect match was found. Supported search types include:
      • user: Exact username matching.
      • video: Video search.
      • live: Live stream search.
      • article: Column/article search.
    • get_video_danmaku: Retrieves danmaku (bullet comments) for a specific video.