bilibili-srv

MCP server for the Bilibili API, supporting operations such as video search and retrieval of user content. Suitable for Bilibili content management and data analysis scenarios.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "bilibili-srv" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-267b947088012c2aeb4702fc06726fa88c80a1424f70f5da2990e3c23258e418. Verify the upstream source and version against https://skillhub.cn/skills/org-rn88lg3j/bilibili-srv before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

MCP server for the Bilibili API, supporting operations such as video search and retrieval of user content. Suitable for Bilibili content management and data analysis scenarios.

0 Downloads

Introduction source: third_party · org-rn88lg3j · 1.0.0 Reference

SkillPi interpretation

Tasks
The MCP server, which supports video search, user content acquisition, etc., is used for the Beep-Bridge API content management and data analysis scene.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
1 . **API key is necessary** and users must be asked through AskUserQuestion if no key is available 2 ** Ban ** Self-search or compilation of data in the absence of API keys
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: 哔哩哔哩API服务
description: 用于哔哩哔哩API的MCP服务器,支持视频搜索、用户内容获取等多种操作,适用于哔哩哔哩内容管理和数据分析场景。
version: 1.0.0
slug: xby-bilibili
displayName: 哔哩哔哩API服务
summary: 用于哔哩哔哩API的MCP服务器,支持视频搜索、用户内容获取等多种操作,适用于哔哩哔哩内容管理和数据分析场景。
license: MIT

哔哩哔哩API服务

用于哔哩哔哩API的MCP服务器,支持视频搜索、用户内容获取等多种操作,适用于哔哩哔哩内容管理和数据分析场景。


⚠️ 强制要求:API 密钥

此 Skill 必须配置 API 密钥才能使用。

  • 首次使用时,如果 .env 中没有 XBY_APIKEY,必须使用 AskUserQuestion 工具向用户询问 API 密钥
  • 拿到用户提供的密钥后,调用 scripts.config.set_api_key(api_key) 保存,然后继续处理
  • 获取 API 密钥:https://xiaobenyang.com
  • 禁止在缺少 API 密钥时自行搜索或编造数据

工作流程(必须遵守)

你(大模型)是路由层,负责理解用户意图、选择工具、提取参数。代码只负责调用API。

用户输入 → 你选择工具 → 提取该工具需要的参数 → 调用 scripts.tools 中的函数 → 返回结果给用户

步骤

  1. 检查 API 密钥:如果 scripts.config.settings.api_key 为空,使用 AskUserQuestion 询问用户,拿到后调用 scripts.config.set_api_key(key) 保存
  2. 选择工具:根据用户意图从下方工具列表中选择对应的工具函数
  3. 提取参数:根据选中的工具,提取该工具需要的参数
  4. 调用工具:使用关键字参数调用 scripts.tools 中的函数,例如 scripts.tools.search_schools(score='520', province='北京', category='综合')
  5. 返回结果:将工具返回的 raw 数据整理后展示给用户

工具选择规则

根据用户意图选择对应的工具函数:

用户意图 工具函数

搜索哔哩哔哩用户信息。

Args: keyword: 用户名关键词 page: 页码,默认为1

Returns: 包含用户搜索结果的字典数据 | scripts.tools.search_user | | 搜索并推荐相关视频,提供详细的推荐理由和总结

Args: keyword: 搜索关键词(如"AI") count: 推荐视频数量,默认15条

Returns: 包含推荐视频和总结的字典 | scripts.tools.search_and_recommend_videos | | 通过用户名获取用户ID,支持精确搜索和详细信息返回

Args: username: 用户名 return_details: 是否返回详细信息,默认False只返回用户ID

Returns: 如果return_details=False: {"user_id": int} 或 {"error": str} 如果return_details=True: {"users": list, "exact_match": bool} 或 {"error": str} | scripts.tools.get_user_id_by_name | | 获取视频的弹幕数据。支持视频链接或BV号输入。

Args: video_input: 视频链接或BV号 支持格式:

Returns: 包含弹幕数据和视频信息的字典 | scripts.tools.get_video_danmaku | | 获取指定用户的最新动态

Args: username: 用户名(如"技术爬爬虾") count: 要获取的动态数量,默认10条

Returns: 包含用户动态信息的字典 | scripts.tools.get_user_dynamics | | 获取指定用户的最新投稿视频

Args: username: 用户名(如"技术爬爬虾") count: 要获取的视频数量,默认10条

Returns: 包含用户投稿视频信息的字典 | scripts.tools.get_user_videos | | 获取指定用户的合集信息

Args: username: 用户名(如"技术爬爬虾")

Returns: 包含用户合集信息的字典 | scripts.tools.get_user_collections | | 获取指定用户合集中的视频列表

Args: username: 用户名(如"技术爬爬虾") collection_name: 合集名称,可选 collection_id: 合集ID,可选 count: 要获取的视频数量,默认10条

Returns: 包含合集视频信息的字典 | scripts.tools.get_collection_videos | | 在指定用户的所有合集中搜索包含关键词的视频

Args: username: 用户名(如"技术爬爬虾") keyword: 搜索关键词(如"MCP"、"AI与大模型"等) count: 每个合集最多返回的视频数量,默认10条

Returns: 包含搜索结果的字典 | scripts.tools.search_collection_by_keyword |

如果参数不完整,使用 AskUserQuestion 向用户询问缺失的参数。


工具函数说明


scripts.tools.search_user

工具描述: 搜索哔哩哔哩用户信息。

Args: keyword: 用户名关键词 page: 页码,默认为1

Returns: 包含用户搜索结果的字典数据

参数定义

参数名称 参数类型 是否必填 默认值 描述
keyword string true null
page integer false 1.0 null

scripts.tools.search_and_recommend_videos

工具描述: 搜索并推荐相关视频,提供详细的推荐理由和总结

Args: keyword: 搜索关键词(如"AI") count: 推荐视频数量,默认15条

Returns: 包含推荐视频和总结的字典

参数定义

参数名称 参数类型 是否必填 默认值 描述
keyword string true null
count integer false 15.0 null

scripts.tools.get_user_id_by_name

工具描述: 通过用户名获取用户ID,支持精确搜索和详细信息返回

Args: username: 用户名 return_details: 是否返回详细信息,默认False只返回用户ID

Returns: 如果return_details=False: {"user_id": int} 或 {"error": str} 如果return_details=True: {"users": list, "exact_match": bool} 或 {"error": str}

参数定义

参数名称 参数类型 是否必填 默认值 描述
username string true null
return_details boolean false false null

scripts.tools.get_video_danmaku

工具描述: 获取视频的弹幕数据。支持视频链接或BV号输入。

Args: video_input: 视频链接或BV号 支持格式:

Returns: 包含弹幕数据和视频信息的字典

参数定义

参数名称 参数类型 是否必填 默认值 描述
video_input string true null
page integer false 0.0 null

scripts.tools.get_user_dynamics

工具描述: 获取指定用户的最新动态

Args: username: 用户名(如"技术爬爬虾") count: 要获取的动态数量,默认10条

Returns: 包含用户动态信息的字典

参数定义

参数名称 参数类型 是否必填 默认值 描述
username string true null
count integer false 10.0 null

scripts.tools.get_user_videos

工具描述: 获取指定用户的最新投稿视频

Args: username: 用户名(如"技术爬爬虾") count: 要获取的视频数量,默认10条

Returns: 包含用户投稿视频信息的字典

参数定义

参数名称 参数类型 是否必填 默认值 描述
username string true null
count integer false 10.0 null

scripts.tools.get_user_collections

工具描述: 获取指定用户的合集信息

Args: username: 用户名(如"技术爬爬虾")

Returns: 包含用户合集信息的字典

参数定义

参数名称 参数类型 是否必填 默认值 描述
username string true null

scripts.tools.get_collection_videos

工具描述: 获取指定用户合集中的视频列表

Args: username: 用户名(如"技术爬爬虾") collection_name: 合集名称,可选 collection_id: 合集ID,可选 count: 要获取的视频数量,默认10条

Returns: 包含合集视频信息的字典

参数定义

参数名称 参数类型 是否必填 默认值 描述
username string true null
collection_name string false "" null
collection_id integer false 0.0 null
count integer false 10.0 null

scripts.tools.search_collection_by_keyword

工具描述: 在指定用户的所有合集中搜索包含关键词的视频

Args: username: 用户名(如"技术爬爬虾") keyword: 搜索关键词(如"MCP"、"AI与大模型"等) count: 每个合集最多返回的视频数量,默认10条

Returns: 包含搜索结果的字典

参数定义

参数名称 参数类型 是否必填 默认值 描述
username string true null
keyword string true null
count integer false 10.0 null


返回值处理

工具函数返回 dict 对象:

  • result["raw"] - API 原始返回数据(JSON),直接将此数据整理后展示给用户
  • result["success"] - 是否成功(True/False)
  • result["message"] - 状态消息

项目结构

./
├── scripts/
│   ├── __init__.py
│   ├── config.py       # 配置管理 + set_api_key()
│   ├── call_api.py      # API 客户端 + call_api()
│   └── tools.py         # 工具函数(直接调用)
├── requirements.txt
└── SKILL.md

注意事项

  1. API 密钥是必需的,无密钥时必须通过 AskUserQuestion 询问用户
  2. 禁止在缺少 API 密钥时自行搜索或编造数据

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供哔哩哔哩API服务,支持视频搜索、用户内容获取、弹幕获取等多种操作
  • 适用于内容管理和数据分析场景,具有明确的使用价值
  • 功能覆盖全面,满足开发者对哔哩哔哩数据的访问需求
Trigger Precision85/100

Areas to improve

  • 部分工具描述较长,略有冗余 Reported severity: Minor

    部分工具函数的描述文字较长,存在一定冗余信息

    Recommendation: 建议精简工具描述,突出核心功能和参数要点

Highlights

  • description和frontmatter中均有清晰的功能描述
  • 触发词覆盖搜索、用户信息获取、视频推荐、弹幕获取等核心功能
  • 边界清晰,用户意图与工具函数对应关系明确
Structure and Standards80/100

Areas to improve

  • 文档过长(超过500行) Reported severity: Minor

    SKILL.md文档长度超过500行,影响阅读体验

    Recommendation: 建议将文档拆分为多个文件,如API参考、使用指南等

  • 排版问题(部分表格格式不统一) Reported severity: Minor

    部分表格的格式存在不统一现象

    Recommendation: 统一表格格式,确保排版一致性

Highlights

  • 结构完整,有明确的工作流程、步骤划分和工具选择规则
  • 包含端到端示例(工作流程图),便于理解执行流程
  • frontmatter完整,版本信息清晰
  • 参数定义详细,返回值处理说明清楚
Execution Reliability88/100

Highlights

  • 工具来源明确(scripts.tools),参数定义清晰
  • 有完善的异常处理说明(API密钥缺失时询问用户)
  • 不可逆操作有确认机制(禁止无密钥时编造数据)
  • 项目结构清晰,配置管理完善
Evidence Verifiability (mean of the first four)82/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • www.bilibili.com
  • xiaobenyang.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.