bilibili-mcp
Provides tools for parsing Bilibili video links, retrieving video details (title, cover, description, uploader info), obtaining download links (1080P), and parsing collection videos.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bilibili-mcpGet video details for https://b23.tv/XhtfoyZ"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bilibili MCP Server
一个用于解析哔哩哔哩(Bilibili)视频的 Model Context Protocol (MCP) 服务器,支持视频信息提取、下载链接获取和合集解析等功能。
功能特性
✅ 解析 Bilibili 视频链接(支持 b23.tv 短链接)
✅ 获取视频详细信息(标题、封面、简介、用户信息等)
✅ 获取视频下载链接(1080P 画质)
✅ 支持合集视频解析
✅ 获取合集视频列表
Related MCP server: Bilibili-Api
安装
方式一:使用 npx(推荐)
无需安装,直接运行:
{
"mcpServers": {
"bilibili": {
"command": "npx",
"args": ["-y", "mcp-server-bilibili"]
}
}
}方式二:全局安装
npm install -g mcp-server-bilibili然后在配置文件中使用:
{
"mcpServers": {
"bilibili": {
"command": "mcp-server-bilibili"
}
}
}方式三:从源码运行
# 克隆仓库
git clone https://github.com/fysh1010/bilibili-mcp.git
cd bilibili-mcp
# 安装依赖
npm install
# 构建
npm run build然后在配置文件中使用:
{
"mcpServers": {
"bilibili": {
"command": "node",
"args": ["E:\\path\\to\\bilibili-mcp\\build\\index.js"]
}
}
}配置 Claude Desktop
Windows
打开 Claude Desktop 配置文件:
%APPDATA%\Claude\claude_desktop_config.json添加以下配置:
{
"mcpServers": {
"bilibili": {
"command": "npx",
"args": ["-y", "mcp-server-bilibili"]
}
}
}重启 Claude Desktop
macOS
打开 Claude Desktop 配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json添加以下配置:
{
"mcpServers": {
"bilibili": {
"command": "npx",
"args": ["-y", "mcp-server-bilibili"]
}
}
}重启 Claude Desktop
Linux
打开 Claude Desktop 配置文件:
~/.config/Claude/claude_desktop_config.json添加以下配置:
{
"mcpServers": {
"bilibili": {
"command": "npx",
"args": ["-y", "mcp-server-bilibili"]
}
}
}重启 Claude Desktop
可用工具
1. parse_bilibili_video
解析 Bilibili 视频链接,获取完整信息。
参数:
url(必填): Bilibili 视频链接,支持 b23.tv 短链接
示例:
请解析这个 Bilibili 视频:https://b23.tv/XhtfoyZ返回数据:
{
"code": 200,
"msg": "解析成功!",
"data": {
"title": "视频标题",
"cover": "封面图片URL",
"description": "视频简介",
"url": "视频下载链接",
"user": {
"name": "UP主名称",
"avatar": "UP主头像URL"
},
"videos": [
{
"title": "视频标题",
"duration": 视频时长(秒),
"durationFormat": "04:45:58",
"url": "视频下载链接",
"index": 1
}
],
"totalVideos": 2
}
}2. get_bilibili_video_info
获取 Bilibili 视频的详细信息。
参数:
url(必填): Bilibili 视频链接
示例:
获取这个视频的详细信息:https://b23.tv/XhtfoyZ3. get_bilibili_download_urls
获取 Bilibili 视频的下载链接列表。
参数:
url(必填): Bilibili 视频链接
示例:
获取这个视频的下载链接:https://b23.tv/XhtfoyZ4. get_bilibili_basic_info
获取 Bilibili 视频的基本信息。
参数:
url(必填): Bilibili 视频链接
示例:
获取这个视频的基本信息:https://b23.tv/XhtfoyZ5. get_bilibili_collection
获取 Bilibili 合集中的所有视频列表信息。
参数:
url(必填): Bilibili 视频链接(合集链接)
示例:
获取这个合集的所有视频:https://b23.tv/XhtfoyZ使用示例
示例 1:解析单个视频
用户输入:
帮我解析这个 Bilibili 视频:https://b23.tv/XhtfoyZClaude 会自动调用:
parse_bilibili_video工具
返回结果: 视频的完整信息,包括标题、封面、下载链接、UP主信息等。
示例 2:获取下载链接
用户输入:
获取这个视频的下载链接:https://b23.tv/XhtfoyZClaude 会自动调用:
get_bilibili_download_urls工具
返回结果: 视频下载链接列表,包括合集中的所有视频。
示例 3:查看合集视频
用户输入:
这个合集有哪些视频?https://b23.tv/XhtfoyZClaude 会自动调用:
get_bilibili_collection工具
返回结果: 合集中的所有视频列表,包括每个视频的标题和时长。
测试
使用 MCP Inspector 测试工具:
npm run inspector这会启动一个交互式测试界面,您可以测试所有可用的工具。
开发
项目结构
bilibili-mcp/
├── src/
│ ├── BilibiliApi.ts # Bilibili API 封装层
│ └── index.ts # MCP 服务器主入口
├── build/ # 编译输出目录
├── package.json # 项目配置
├── tsconfig.json # TypeScript 配置
└── README.md # 项目说明构建项目
npm run build监听模式开发
npm run watchAPI 说明
本 MCP Server 使用第三方 API:https://api.bugpk.com/api/bilibili
支持的特性:
✅ 解析 Bilibili 短视频
✅ 画质为 1080P
✅ 支持合集视频
✅ 支持 b23.tv 短链接
注意事项
视频链接格式:支持完整的 Bilibili 链接和 b23.tv 短链接
画质限制:当前仅支持 1080P 画质
API 限制:使用第三方 API,可能会有调用频率限制
版权说明:请遵守 Bilibili 的用户协议和版权规定,仅用于个人学习和研究目的
故障排除
问题:无法连接到 MCP Server
解决方案:
检查 Claude Desktop 配置文件是否正确
确认网络连接正常
查看 Claude Desktop 日志获取详细错误信息
问题:解析视频失败
解决方案:
确认视频链接格式正确
检查视频是否为公开视频
确认第三方 API 服务是否正常
问题:npx 命令执行缓慢
解决方案:
使用全局安装方式:
npm install -g mcp-server-bilibili或者从源码运行
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!
联系方式
致谢
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fysh1010/bilibili-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server