读取 B 站视频、评论、字幕等公开信息的 MCP 服务,支持用 jq 在返回前筛选和裁剪结果,可本地运行,也可通过 HTTP + OAuth 远程接入。MCP server for reading Bilibili videos, comments and subtitles, with jq filtering to keep responses small. Runs locally over stdio or remotely over Streamable HTTP with OAuth.
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"polylens-bilibili-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# polylens-bilibili-mcp 读取 B 站视频、评论、字幕等公开信息的 MCP 服务,支持用 jq 在返回前筛选和裁剪结果,可本地运行,也可通过 HTTP + OAuth 远程接入。只读,不向平台写入任何数据。 ## 工具 | 工具 | 说明 | |---|---| | `search_videos` | 按关键词搜索视频,每批 30 条,最多 30 页 | | `suggest_keywords` | 搜索框联想词 | | `get_feed` | 首页推荐流,每批 30 条 | | `get_up_info` | UP 主资料:签名、粉丝、获赞、等级、认证等,可一次查多个 | | `list_up_videos` | UP 主投稿,每批最多 40 条,可按最新、播放、收藏排序 | | `get_video_info` | 标题、作者、发布时间、简介与各项统计,可一次查多个视频或分 P | | `get_parts` | 分 P 清单,可一次查多个视频 | | `get_danmaku_counts` | 每个分 P 的弹幕数,可一次查多个视频,`?p=1-12` 取指定范围 | | `get_comments` | 主评论,热度序或时间序,游标续取 | | `get_comment_replies` | 某条主评论下的二级评论 | | `get_subtitles` | 逐句字幕,含起止秒数,可指定语种 | | `start_qr_login` · `complete_qr_login` | 扫码登录 | | `get_login_status` · `logout` | 查询登录状态、退出登录 | | `get_version` | 运行中的版本与 PyPI 最新版本,用于判断工具说明是否为旧缓存、服务是否需要升级;传 `since` 可查之后的用法变化 | ## 登录 除登录相关工具与 `get_version` 外都需要登录,每次调用前联网核验登录状态。`start_qr_login` 返回二维码,用 B 站 App 扫码确认后,由 `complete_qr_login` 完成登录。凭据保存在 `~/.cache/polylens-bilibili/cookie`(设置了 `XDG_CACHE_HOME` 时位于其下),`logout` 会删除它。 ## 用 jq 精简返回 `search_videos`、`list_up_videos`、`get_feed`、`get_video_info`、`get_up_info`、`get_parts`、`get_danmaku_counts`、`get_comments`、`get_comment_replies`、`get_subtitles` 必须传 `jq` 参数,在返回前筛选条目或裁剪字段,减少上下文占用。表达式由模型自行编写,传 `.` 则原样返回,例如: | 用途 | 表达式 | |---|---| | 字幕只要文本 | `map(.content) \| join("\n")` | | 只看第 10 到 15 分钟的字幕 | `[.[] \| select(.start >= 600 and .start < 900)]` | | 搜索结果只留高播放量 | `[.[] \| select(.view_count > 100000) \| {title, url, view_count}]` | ## 安装 需要 [uv](https://docs.astral.sh/uv/),没有 Python 3.13+ 时 uv 会自动下载。 接入 Claude Code: ```bash claude mcp add polylens-bilibili -- uvx polylens-bilibili-mcp ``` 接入 Claude Desktop,在 `claude_desktop_config.json` 中加入: ```json { "mcpServers": { "polylens-bilibili": { "command": "uvx", "args": ["polylens-bilibili-mcp"] } } } ``` 升级:重启客户端,`uvx` 启动时会取最新版本。 ### 从源码运行 ```bash git clone https://github.com/liu-xindi/polylens-bilibili-mcp.git cd polylens-bilibili-mcp && uv sync claude mcp add polylen…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.