bilibili-mcp
Provides tools for accessing authorized Bilibili user data via the official open platform, including video management, stats, and parsing URLs.
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-mcpShow me the stats for my latest video"
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
一个合规优先的 Bilibili MCP Server,通过哔哩哔哩官方开放平台访问已授权账号的数据。
本项目不调用逆向整理的非公开接口,不绕过登录、签名或风控,也不提供任意用户/视频的批量抓取能力。
能力
MCP 工具 | 作用 | 官方 Scope |
| 本地解析 BV/av/ep/ss、空间、直播间和短链 | 无 |
| 获取已授权用户昵称、头像和 OpenID |
|
| 获取已授权用户拥有或联合投稿的单个稿件 |
|
| 分页查询已授权用户的稿件列表 |
|
| 获取关注、粉丝和审核通过稿件数 |
|
| 获取播放、点赞、投币、收藏、评论等数据 |
|
所有工具均为只读工具;网络请求使用官方签名 2.0(HMAC-SHA256)。
Related MCP server: BiliStalkerMCP
前置条件
在哔哩哔哩开放平台完成开发者入驻并创建应用。
为应用申请所需 Scope。
按官方 OAuth 2.0 文档取得已授权用户的
access_token。Node.js 20 或更高版本。
官方开放平台可能要求企业资质,实际准入规则以官方页面为准。
安装与构建
git clone https://github.com/nameefef/bilibili-mcp.git
cd bilibili-mcp
pnpm install
pnpm run build准备环境变量:
export BILIBILI_CLIENT_ID="your_client_id"
export BILIBILI_APP_SECRET="your_app_secret"
export BILIBILI_ACCESS_TOKEN="authorized_user_access_token"没有凭证时服务仍可启动,但只能使用本地的 bilibili_parse_url 工具。
MCP 客户端配置
把绝对路径替换为你本机的仓库位置:
{
"mcpServers": {
"bilibili": {
"command": "node",
"args": ["/absolute/path/to/bilibili-mcp/dist/index.js"],
"env": {
"BILIBILI_CLIENT_ID": "your_client_id",
"BILIBILI_APP_SECRET": "your_app_secret",
"BILIBILI_ACCESS_TOKEN": "authorized_user_access_token"
}
}
}
}不要把真实密钥写入会提交到 Git 的配置文件;更推荐由系统密钥管理器或进程环境注入。
开发
pnpm run dev
pnpm run check使用 MCP Inspector:
pnpm dlx @modelcontextprotocol/inspector node dist/index.js限制与安全
仅使用官方开放平台文档公开的接口。
只能读取明确授权给当前应用的账号及稿件数据。
访问令牌和应用密钥只从环境变量读取,不会出现在 MCP 工具参数或返回值中。
API 返回的头像、封面等资源应按官方规则缓存和使用。
遇到
127007、127011等错误时,请检查应用 Scope 和用户授权状态。平台接口、准入条件和配额可能变化,请以官方文档为准。
共创者
nameefef——项目发起人与维护者
OpenAI Codex——架构、实现、测试与文档协作
Codex 是 AI 编程助手,不拥有可计入 GitHub Contributors 图表的个人账号;共同创作关系在项目文档和提交说明中明确记录。
许可证
MIT。Bilibili、哔哩哔哩及相关标识属于其权利人,本项目与哔哩哔哩官方无隶属或背书关系。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceAn MCP server that enables users to search Bilibili videos, access trending rankings, and retrieve detailed information about videos, content creators, and anime schedules. It allows AI applications to interact directly with Bilibili content via simple API interfaces.76188MIT
- Alicense-qualityAmaintenanceBiliStalkerMCP is a Bilibili MCP server designed to analyze a specific Bilibili user by providing tools to retrieve user profiles, videos, dynamics, articles, and followings.8MIT
- AlicenseBqualityDmaintenanceA MCP server providing 22 tools to interact with Bilibili API, enabling video info, search, user profile, comments, rankings, and messaging with login support for write operations.223GPL 3.0
- Alicense-qualityDmaintenanceAn MCP server powered by public Bilibili APIs so AI agents can search videos and read public video and creator metadata.MIT
Related MCP Connectors
MCP server for ByteDance Seedance AI video generation
MCP server for ByteDance Seedream AI image generation
MCP server for Hailuo (MiniMax) AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/nameefef/bilibili-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server