Sponsored by Deepsite.site

Bilibili Api Mcp Server

Created By
SMYB54314 months ago
Content

Bilibili API MCP Server

An MCP (Model Context Protocol) server for the Bilibili API, supporting a wide range of operations.

Requirements

  • uv – A fast, all-in-one project and dependency manager for Python.

Usage

Configure the server in any MCP client; it will be downloaded and started automatically.

{
  "mcpServers": {
    "bilibili": {
      "type": "stdio",
      "isActive": true,
      "command": "uvx",
      "args": [
        "bilibili-api-mcp-server"
      ]
    }
  }
}

💡 Tip: You can copy mcp-config.json from the project root as a ready-made configuration.

Option 2: Run Locally for Development

  1. Clone the repository:
git clone https://github.com/SMYB5431/bilibili-api-mcp-server.git
cd bilibili-api-mcp-server
  1. Install dependencies with uv:
uv sync
  1. Configure the server in any MCP client:
{
  "mcpServers": {
    "bilibili": {
      "command": "uvx",
      "args": [
        "--directory",
        "/your-project-path/bilibili-api-mcp-server",
        "run",
        "bilibili.py"
      ]
    }
  }
}

Getting Started

Supported Operations

  1. search_and_recommend_videos – Intelligent video search and recommendation.

    • Sorts results by “comprehensive” ranking.
    • Automatically filters out classroom videos (cheese links).
    • Returns the top 15 videos (configurable).
    • Provides recommendation rationales based on search results.
    • Analyzes video quality and popularity.
    • Generates concise content summaries and recommendation reports.
  2. search_user – Search for Bilibili users, sortable by follower count.

  3. get_user_id_by_name – Retrieve a user’s UID by username.

    • Default mode: returns only the UID for quick identification.
    • Detailed mode: returns full user profile and exact-match status.
    • Exact-match priority: prioritizes exact username matches.
    • Robust error handling with clear messages.

User Content Retrieval

  1. get_user_dynamics – Fetch the latest posts from a user.

    • Accepts username directly (e.g., “技术爬爬虾”).
    • Configurable number of posts (default 10).
    • Returns content, timestamp, and link for each post.
  2. get_user_videos – Fetch the latest videos uploaded by a user.

    • Accepts username directly.
    • Configurable number of videos (default 10).
    • Returns title, BV ID, view count, duration, and other details.
  3. get_user_collections – Retrieve a user’s public collections.

    • Accepts username directly.
    • Returns collection title, video count, total views, and links.
  4. get_collection_videos – List videos in a specific collection.

    • Accepts collection name or ID.
    • Configurable number of videos (default 10).
    • Returns detailed video information (title, views, likes, coins).
    • Supports fuzzy matching on collection names.
  5. search_collection_by_keyword – Search for videos containing a keyword within all collections of a user.

    • Returns matching collections and their video lists.
    • Ideal for quickly locating topic-specific content.

Additional Features

  1. get_video_danmaku – Retrieve danmaku (bullet comments) for a video.
    • Accepts video URL or BV ID.
    • Automatically extracts BV ID from URL.
    • Supports multi-part videos.
    • Returns detailed video info and full danmaku data.

Disclaimer

This project uses publicly available content from the Bilibili creator “技术爬爬虾” for demonstration purposes only.
It is intended solely for educational and research use and complies with Bilibili’s Terms of Service.
For any copyright concerns, please contact the project maintainer.

License

MIT

Server Config

{
  "mcpServers": {
    "bilibili": {
      "type": "stdio",
      "isActive": true,
      "command": "uvx",
      "args": [
        "bilibili-api-mcp-server"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Serper MCP ServerA Serper MCP Server
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors