bilibili-subtitle-fetch
Allows fetching subtitles from Bilibili videos, supporting input via BV numbers, standard video links, or short links, with options for language preference and output format.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Bilibili Subtitle Fetch
一个用于获取 Bilibili 视频字幕的 MCP Server,支持语言和输出格式选项。
uv tool install bilibili-subtitle-fetch
支持以下输入:
BV号,例如BV1fz4y1j7Mf标准视频链接,例如
https://www.bilibili.com/video/BV1fz4y1j7Mf?p=2短链,例如
https://b23.tv/FAm7Xn4
配置
凭据配置文件
首次使用时执行 bilibili-subtitle-fetch init,然后粘贴你的 Bilibili Cookie。
默认配置文件路径:
Windows:
%APPDATA%\bilibili-subtitle-fetch\config.tomlLinux/macOS:
~/.config/bilibili-subtitle-fetch/config.toml
也可以通过 --config /path/to/config.toml 指定自定义路径。
配置文件会在 [credential] 下保存这些字段:
sessdata- 访问需要登录态的字幕接口时必需bili_jct- 自动刷新时必需ac_time_value- 自动刷新时必需buvid3、buvid4、dedeuserid- 可选,但建议一并保存
当 sessdata、bili_jct 和 ac_time_value 都存在时,服务会在发起需要登录态的请求前自动检查是否需要刷新 Cookie,并将新值回写到 config.toml,不需要手动执行刷新命令。
ASR 配置 (可选)
配置文件同样支持 [asr] 段落配置默认的音频转写行为:
enable_asr- 是否开启 ASR 回退 (true/false)。开启后,如果视频未提供自带字幕,程序会自动下载音频并生成字幕。model_size- Whisper 模型大小,默认为base。也可以选用tiny、small等。
运行参数
--preferred-lang- 覆盖默认字幕语言--output-format- 覆盖默认输出格式--config- 使用自定义配置文件路径
Related MCP server: subtitle-analyzer
CLI 用法
先执行 bilibili-subtitle-fetch init 配置 Cookie,然后可以直接在终端获取字幕:
bilibili-subtitle-fetch fetch BV1fz4y1j7Mf
bilibili-subtitle-fetch fetch "https://www.bilibili.com/video/BV1fz4y1j7Mf?p=2"可选参数:
--copy, -c- 将获取的字幕复制到系统剪贴板(默认不复制)--output-format text|timestamped- 指定输出格式(纯文本或带时间戳格式)--preferred-lang- 指定优先字幕语言(默认zh-CN)--asr- 强制启用 ASR 语音识别回退(当视频无字幕时本地转写)--no-asr- 强制关闭 ASR 语音识别回退--verbose, -v- 开启详细调试与 HTTP 请求日志--no-clipboard- (向后兼容)不复制到剪贴板
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that gives any LLM or agent clean YouTube transcripts on demand: a single video, a whole channel, or a playlist, plus AI cleanup of auto-generated captions. API-key auth, credit-based, same backend as the public v1 API. Get a free API key with 25 free credits at youtubetranscriptdownload.com/account.
MCP server for RiverScript, an AI transcription platform - fetches transcripts shared via a link.
MCP server for Hailuo (MiniMax) AI video generation
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Bilibili MCP Server that can retrieve subtitles, danmaku (bullet comments), and comments information from videos using the video URL.321MIT
- FlicenseAqualityDmaintenanceAn MCP server that extracts and analyzes subtitles from YouTube and Bilibili videos, supporting time-stamped keyword search and video information retrieval.4-
- 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.224GPL 3.0
- AlicenseAqualityDmaintenanceMCP server for fetching Bilibili video metadata and subtitles. Supports running locally via stdio transport for integration with MCP clients like Cursor or Claude Desktop.19 npmISC