bilibili MCP Server
Enables searching and retrieving Bilibili user information and videos via the Bilibili API.
README
bilibili MCP Server
A MCP server for Bilibili API integration
English | 简体中文
Model Context Protocol (MCP) Server for the bilibili.com API.
<a href="https://glama.ai/mcp/servers/@masx200/bilibili-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@masx200/bilibili-mcp-server/badge" alt="bilibili Server MCP server" /> </a>
Features
User Info
- [x] Get user information by
mid - [x] Search video information by
bvid - [x] Search videos by keywords
使用方法
Streamable HTTP 模式
bilibili-mcp-server支持两种运行模式:
- stdio模式(默认):通过标准输入输出与MCP客户端通信
- streamable-http模式:通过HTTP协议提供MCP服务,支持SSE(Server-Sent Events)
Streamable HTTP 模式使用
要使用streamable-http模式,请使用以下命令启动服务器:
# 基本启动
node dist/streamable-http.js
# 指定端口
HTTP_API_PORT=8080 node dist/streamable-http.js
# 启用访问令牌认证
HTTP_API_TOKEN=your-secret-token HTTP_API_PORT=8080 node dist/streamable-http.js
服务器启动后,可以通过以下端点访问:
- MCP API端点:
http://localhost:PORT/mcp - 如果启用了令牌认证,客户端需要在请求头中添加:
Authorization: Bearer your-secret-token
环境变量
HTTP_API_COOKIE(可选):设置此环境变量以提供您的Bilibili Cookie用于认证请求。这有助于避免因Bilibili的反机器人措施导致的"请求失败,封控检测问题"。示例格式:SESSDATA=您的SESSDATA值; buvid3=您的buvid3值HTTP_API_TOKEN(可选):用于streamable-http模式的访问令牌认证。如果设置此环境变量,客户端请求时需要提供Bearer token进行身份验证。示例:your-secret-tokenHTTP_API_PORT(可选):streamable-http服务器监听的端口号,默认为3000。示例:8080
cookie 可以在浏览器上获取。
注意:如果您使用的是 Chrome 浏览器,请确保已登录 Bilibili 账号。
Claude Desktop
Refer to the official documentation
config for npm (recommended)
{
"mcpServers": {
"bilibili": {
"command": "npx",
"args": ["-y", "@masx200/bilibili-mcp-server"],
"env": {
"HTTP_API_COOKIE": "您的SESSDATA值; buvid3=您的buvid3值"
}
}
}
}
or
config for local cloned repo
{
"mcpServers": {
"bilibili": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/bilibili-mcp-server/dist/index.js"
],
"env": {
"HTTP_API_COOKIE": "您的SESSDATA值; buvid3=您的buvid3值"
}
}
}
}
Save the configuration and restart. You will see the new bilibili MCP option
as shown below:
<div align="center"> <img src="./assets/claude-desktop-1.png" alt="" width="500">
<img src="./assets/claude-desktop-2.png" alt="" width="500">
<img src="./assets/claude-desktop-setting.png" alt="" width="500"> </div>
Demo Vedio
https://github.com/user-attachments/assets/813dece6-c9b5-4bc5-96c1-c3b4d284cc76
Local Development
- Install dependencies
pnpm i
- build
pnpm build
# or
pnpm dev
- debug for local repo, see above.
Publishing
To publish a new version to npm:
# For patch version update (0.0.x)
pnpm publish:patch
# For minor version update (0.x.0)
pnpm publish:minor
# For major version update (x.0.0)
pnpm publish:major
These commands will automatically:
- Bump the version in package.json
- Build the project
- Publish to npm registry
Credits
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。