- Home
- MCP servers
- Bilibili API
Bilibili API
- python
3
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"smyb5431-bilibili-api-mcp-server": {
"command": "uvx",
"args": [
"bilibili-api-mcp-server"
]
}
}
}This MCP server enables you to access the Bilibili API through a flexible MCP (Model Context Protocol) interface. It supports a range of search and content retrieval operations, making it easy to query videos, creators, collections, and video dynamics from Bilibili via an MCP client.
How to use
Configure your MCP client to connect to the bilibili MCP server. You can use either the PyPI-based approach for automatic installation or run the server locally in development mode. Once configured, you can perform a variety of operations such as searching videos, retrieving user dynamics, and accessing collections directly through your MCP client.
How to install
Prerequisites: ensure you have uv installed as your project management tool. You will configure the MCP client to connect to the bilibili MCP server and enable the server within your environment.
Option A — Use via PyPI (recommended) Configure the MCP client to use this server. The system will automatically download and enable it.
{
"mcpServers": {
"bilibili": {
"type": "stdio",
"isActive": true,
"command": "uvx",
"args": [
"bilibili-api-mcp-server"
]
}
}
}
Option B — Local development runpace (clone and run locally). Follow these steps to run the server from source.
# Step 1: clone the project
git clone https://github.com/SMYB5431/bilibili-api-mcp-server.git
cd bilibili-api-mcp-server
# Step 2: install dependencies with uv
uv sync
# Step 3: configure your MCP client to run the server locally
{
"mcpServers": {
"bilibili": {
"command": "uvx",
"args": [
"--directory",
"/your-project-path/bilibili-api-mcp-server",
"run",
"bilibili.py"
]
}
}
}
Additional sections
This server exposes a comprehensive set of operations to interact with Bilibili data. The actions cover video search and recommendations, user lookups, content dynamics, and collection/video retrieval, all accessible through an MCP client once the server is configured.
Supported operations and endpoints
The following actions are available once the server is connected and active.
- get_video_danmaku: Retrieve danmaku data for a given video. Input can be a video link or BV号; supports multi-part videos and returns detailed video and danmaku information.
Available tools
search_and_recommend_videos
Performs an intelligent video search with ranking, filters classroom content, returns the top results, provides reasoning for recommendations, analyzes quality and popularity, and generates summaries and reports.
search_user
Search for Bilibili users with optional sorting by follower count.
get_user_id_by_name
Retrieve a user ID by username with options for exact match and detailed information.
get_user_dynamics
Fetch the latest dynamics for a specified user, with optional quantity and direct username lookup.
get_user_videos
Get a user’s latest submitted videos, with configurable count and detailed video metadata.
get_user_collections
Fetch a user’s collections, including titles, video counts, and view counts, with collection links.
get_collection_videos
List videos within a collection, with support for collection name or ID and fuzzy matching.
search_collection_by_keyword
Search for videos by keyword within all user collections, returning matching collections and their videos.
get_video_danmaku
Obtain video danmaku data from a video link or BV number, supporting multi-part videos and returning detailed information.