MCP server for interacting with Bilibili (Chinese video platform) - search videos, manage favorite lists, download videos, view comments, and perform video actions
The bilibili-mcp server has 15 tools with visible schemas and descriptions, but multiple critical quality gaps prevent a higher score. All tools are properly registered via @mcp.tool() decorators with input schemas and descriptions visible. However, descriptions are often generic or incomplete, parameters lack comprehensive constraints, output schemas are undocumented, and error handling is minimal. The server operates only via STDIO transport (see server.py using mcp.run()), which is a hard transport cap limiting protocol readiness to 50. Tool naming follows verb_noun conventions consistently, which is a strength. The main weaknesses are: (1) descriptions lack context on WHEN to use tools or prerequisites; (2) no enum constraints on parameters like 'order_type' in search_video despite documentation mentioning specific values; (3) output schemas are not documented, forcing LLMs to infer response structure; (4) error messages are generic ('Failed to create favorite list: {e}') without actionable recovery guidance; (5) no parameter format constraints (e.g., BVID format validation); (6) credentials handled via CredentialManager but details not visible in tool definitions.
Adds a Bilibili video to the "Watch Later" list. Args: bvid (str): The Bilibili video ID (BV ID). Returns: dict: A dictionary containing the result of the add to "Watch Later" operation.
Creates a new video favorite list. Args: title (str): The title of the favorite list. introduction (str, optional): The introduction or description of the favorite list. Defaults to "". private (bool, optional): Whether the favorite list is private. Defaults to True. Returns: str: A message indicating the success or failure of the operation.
Deletes a video favorite list by its name. Args: favorite_list_name (str): The name of the favorite list to delete. Returns: str: A message indicating the success or failure of the operation.
Deletes a Bilibili video from the "Watch Later" list. Args: bvid (str): The Bilibili video ID (BV ID). Returns: dict: A dictionary containing the result of the delete from "Watch Later" operation.
Downloads a Bilibili video in the best available quality. This function downloads a Bilibili video, or a specific part of a multi-part video, to the specified output directory. It automatically detects the best available streams (FLV or Dash/MP4) and uses FFmpeg to process and merge them into a single MP4 file. Temporary files are managed internally. Args: bvid (str): The Bilibili video ID (e.g., "BV1xx411c7mR"). part_name (str, optional): The name of the specific video part to download. If None, the first part of the video is downloaded. Defaults to None. out_dir (str, optional): The directory where the downloaded video will be saved. If the directory does not exist, it will be created. Defaults to the value of the "DOWNLOAD_DIR" environment variable. Returns: Path or None: The pathlib.Path object pointing to the downloaded MP4 file if the download is successful, otherwise None. Raises: RuntimeError: If an external command (e.g., FFmpeg) fails during execution. FileNotFoundError: If FFmpeg is not found in the system's PATH or at the specified FFMPEG_PATH. Exception: For any other unexpected errors that occur during the download process.
Output schemas undocumented. Tools return dict or str without documenting structure. LLMs cannot infer expected fields, forcing parsing of unstructured responses and increasing hallucination risk.
Descriptions lack context on WHEN to use tools. E.g., 'Creates a new video favorite list' does not explain when an agent should call this vs. modify an existing list. Descriptions should answer: what, when, and any prerequisites.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 8 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 54 | - | v1 |
Retrieves a list of hot videos from Bilibili. Args: num_videos (int, optional): The number of hot videos to retrieve. Defaults to 10. Returns: dict: A dictionary containing the hot video information. The structure is validated against HotVideoResponse model. Side Effects: Logs the number of retrieved videos and their details using loguru.
Retrieves comments for a given Bilibili video. This function fetches comments for a specified video BVID, supporting pagination and ordering by time or likes. It converts the BVID to an AID internally before making the API call. Args: bvid (str): The BVID (Bilibili Video ID) of the video. page_index (int, optional): The page number of comments to retrieve. Defaults to 1. time_order (bool, optional): If True, comments are ordered by time; otherwise, by likes. Defaults to False. Returns: dict: A dictionary containing the video comments data, validated against the VideoCommentResponse model. Side Effects: Logs information about the fetched comments, including the BVID, AID, page index, order, and the fetched data itself, using the configured logger.
Retrieves detailed information about a Bilibili video. Args: bvid (str): The Bilibili video ID (BV ID). Returns: dict: A dictionary containing various details about the video.
Likes or unlikes a Bilibili video. Args: bvid (str): The Bilibili video ID (BV ID). like (bool, optional): True to like the video, False to unlike. Defaults to True. Returns: dict: A dictionary containing the result of the like/unlike operation.
Pays coins to a Bilibili video. Args: bvid (str): The Bilibili video ID (BV ID). num (int, optional): The number of coins to pay (1 or 2). Defaults to 1. like (bool, optional): Whether to like the video after paying coins. Defaults to False. Returns: dict: A dictionary containing the result of the coin payment operation.
Searches for videos on Bilibili based on a keyword. This function uses the Bilibili API to search for videos. It supports customizing the number of results, sorting order, and order type. Args: keyword (str): The keyword to search for. num_results (int, optional): The maximum number of results to return. Defaults to 10. descending (bool, optional): Whether to sort the results in descending order. Defaults to True. order_type (search.OrderVideo, optional): The type of order to apply to the search results. This is an enumeration with the following possible values: - search.OrderVideo.TOTALRANK: Sort by comprehensive ranking. - search.OrderVideo.CLICK: Sort by most clicks. - search.OrderVideo.PUBDATE: Sort by latest release date. - search.OrderVideo.DM: Sort by most danmaku (bullet comments). - search.OrderVideo.STOW: Sort by most favorites. - search.OrderVideo.SCORES: Sort by most comments. Defaults to search.OrderVideo.TOTALRANK. Returns: dict: A dictionary containing the search results, validated against the SearchVideoResponse model. The structure includes a list of SearchVideoInfo objects.
Sends a comment to a specified Bilibili video. This function allows users to post comments on a Bilibili video identified by its BVID. It internally converts the BVID to an AID before sending the comment via the Bilibili API. Args: bvid (str): The BVID (Bilibili Video ID) of the video to comment on. message (str): The content of the comment to be sent. Returns: dict: A dictionary containing the API response from sending the comment, typically indicating success or failure.
Adds a video to a specified favorite list. Args: bvid (str): The BVID of the video to add. favorite_list_name (str): The name of the favorite list to add the video to. Returns: str: A message indicating the success or failure of the operation.
Performs a "triple" action (like, coin, favorite) on a Bilibili video. Args: bvid (str): The Bilibili video ID (BV ID). Returns: dict: A dictionary containing the result of the triple operation.
Removes a video from a specified favorite list. Args: bvid (str): The BVID of the video to remove. favorite_list_name (str): The name of the favorite list to remove the video from. Returns: str: A message indicating the success or failure of the operation.
No parameter format constraints. 'bvid' parameter used across 12 tools but no description specifies expected format (e.g., 'BVxxxxxxxx' pattern). No validation in tool definitions or descriptions.
Error handling returns generic messages ('Failed to create favorite list: {e}') without recovery guidance.
'order_type' parameter in search_video describes 'Possible values: TOTALRANK, CLICK, PUBDATE, DM, STOW, SCORES' but does not declare as enum in schema. Should be constrained enum to prevent invalid values.
Destructive/sensitive tools lack confirmation step. delete_video_favorite_list and pay_video_coin have DESTRUCTIVE/WRITE risk but no dry-run, confirmation, or undo mechanism documented.
Pagination and result limits not documented for list tools. get_video_comments accepts page_index but no mention of result count per page or total count in response. get_hot_videos accepts num_videos but response structure undocumented.
Parameter naming inconsistency: 'num_videos' in get_hot_videos vs 'num_results' in search_video, similar concepts use different names, forcing LLM to re-reason on each tool. Should standardize to single term.
Favorite list operations accept 'favorite_list_name' (human-readable) but internally use difflib fuzzy matching with cutoff=0.6. This silent fuzzy resolution is not documented and could match wrong list. Should explicitly document or add 'favorite_list_id' option.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) visible in schema definitions. MCP spec supports tool annotations but none are declared in the visible code.