
tube-bridge
io.github.TheWhiteWater由 GitHub 账号 TheWhiteWater 发布v1.1.7更新于 Nov 4, 2026
YouTube MCP server for search, transcripts, frames, comments, channels, and local semantic corpora.
概览
自托管的 YouTube 研究 MCP 服务器:搜索视频与频道、读取字幕和评论、截取带时间戳的画面,并建立本地语义语料库。
- 可以做什么
- 搜索视频、热门列表、播放列表和频道上传内容,并读取视频元数据
- 获取字幕(可选时间戳)并列出可用的字幕语言
- 按毫秒时间戳返回单张临时 JPEG 画面
- 读取顶层评论与频道统计信息(需要 API 密钥)
- 创建、添加、列出、语义搜索和删除本地字幕语料库,结果带时间戳
- 查看运行时文档与已知限制
- 适用场景
- 适合需要研究 YouTube 内容的场景:查找某主题的视频、引用或总结字幕、给出带时间戳和画面证据的引用,或在私有本地索引中跨多个字幕检索。
- 运行要求
- 本地 Python 3.12 及以上进程,通常用 uvx 从 PyPI 包启动;仅画面截取需要 PATH 中的 ffmpeg;评论、频道工具和更佳搜索可选配置 YOUTUBE_API_KEY;可选 TUBE_BRIDGE_PROXY 与 TUBE_BRIDGE_CACHE;需能访问 YouTube;首次嵌入可能下载本地模型。
安装
在 SourceWeft 中
- 打开 控制台中的 tube-bridge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
tube-bridge
Self-hosted YouTube research for AI agents.
Search videos and channels, read transcripts and comments, extract timestamped frames, and build private semantic-search corpora — through 17 MCP tools.
[CI] [PyPI] [PyPI downloads] [Python] [License] [Glama]
- 14 of 17 tools need no YouTube API key.
- Local-first corpus: transcripts, vectors, and indexes stay on your machine.
- Useful research output: titles, similarity scores, canonical video URLs, and timestamp links.
- One tool for one frame: return visual evidence near a transcript finding without keeping media files.
- Self-hosted and MIT: no account, hosted intermediary, managed storage, or vendor lock-in.
Thanks to everyone already using tube-bridge. If it saves you time, consider starring the repository — it helps others discover the project and signals that publishing more work like this is worthwhile.
Connect in a minute
The simplest setup uses uvx, which runs the published PyPI package in an isolated environment:
Normally your MCP client launches that command for you. Choose your client below.
[!NOTE] tube-bridge requires Python 3.12 or newer. An API key is optional.
ffmpegis needed only foryoutube_get_frame, and the first embedding operation may download the local model.
Claude Desktop
Open Settings → Developer → Edit Config and add:
Restart Claude Desktop after saving the configuration.
Claude Code
Cursor
Create .cursor/mcp.json in your project, or add the server to your user-level MCP configuration:
VS Code
Create .vscode/mcp.json:
Codex CLI
Pi package
Pi can load the package-relative adapter and the canonical tube-bridge-research skill from the same Git source:
This registers one status tool plus all 17 MCP tools with the tube_bridge_ prefix. The adapter reads the existing plugin.json and mcp.json, launches only the local stdio runtime, preserves bounded text and image content, and forwards only an allowlisted child-process environment.
The Pi package manager installs the Node adapter dependency but does not install Python or ffmpeg. Ensure the python3 visible to Pi is Python 3.12+ with the tube-bridge dependencies installed; install ffmpeg separately to use youtube_get_frame. By default, Pi-managed state lives under the platform data directory; set TUBE_BRIDGE_PI_DATA to move that root. An explicit TUBE_BRIDGE_CACHE still takes precedence for the runtime databases. The optional live frame gate is /tube-bridge-selftest frame.
Remove the package with:
If a desktop client cannot find uvx, replace "uvx" with the absolute path returned by which uvx on macOS/Linux or where.exe uvx on Windows.
Try the complete research workflow
Ask your agent:
Search YouTube for recent videos about local-first AI agents. Read the transcript of the strongest result, add it to a corpus named
local-agents, find the section discussing memory, return the timestamped source link, and extract a frame from that moment.
The agent can complete that request with this tool sequence:
Add more videos with corpus_add, then use corpus_search to search across all of their transcripts at once.
Tools
No means no YouTube Data API key is needed; network access to YouTube may still be required. Search, video information, and trending work without a key through yt-dlp and upgrade to Data API v3 when a key is configured.
Optional YouTube Data API key
A YouTube Data API v3 key unlocks comments, channel search, and channel details. It also improves search, video information, and trending reliability.
Create a key in Google Cloud Console, enable YouTube Data API v3, and expose it to the process launching tube-bridge:
Keep keys out of committed MCP configuration files. Use your client's secret/environment support where available.
Local semantic corpus
Corpus storage and embedding inference are local to the machine running tube-bridge.
- Storage: SQLite plus sqlite-vec in
~/.tube_bridge/corpus.db - Embeddings: BGE-small-en-v1.5 through fastembed
- Chunking: 80-second windows with 20-second overlap
- Ranking: overlap deduplication and source-aware per-video limits
- Results: similarity score, time span, video title, canonical URL, and timestamp URL
Set TUBE_BRIDGE_CACHE to move both corpus and cache databases:
The embedding model may be downloaded on first use. After the assets are available, embedding inference does not require an external model API.
Frame extraction
youtube_get_frame requires ffmpeg on PATH; the Docker image already includes it.
Each call downloads a short temporary section around timestamp_ms, returns one bounded JPEG as MCP ImageContent, and removes the temporary media before returning. It does not create a frame or clip library.
Other ways to run
Persistent PyPI installation
Docker
The health endpoint is http://localhost:8080/health; the Streamable HTTP endpoint is http://localhost:8080/mcp.
The image is published for linux/amd64 and linux/arm64; Docker pulls the right one automatically. On a Raspberry Pi, use a 64-bit OS: 32-bit Raspberry Pi OS is not supported. Every release runs the image on native arm64 CI runners, but it has not been tested on physical Raspberry Pi hardware yet.
Official MCP Registry
Registry name: io.github.TheWhiteWater/tube-bridge
Registry-aware clients can install the PyPI distribution with uvx and launch the stdio server without a hosted intermediary.
Remote HTTP configuration
For an HTTP instance you operate:
Protect remote MCP routes by setting a server-side Bearer key:
Then configure a header-capable client:
/health remains public. /mcp, /sse, and /messages require the Bearer key when TUBE_BRIDGE_AUTH_KEY is set. Legacy SSE is available at /sse for clients that still need it.
Environment variables
How it works
- stdio is recommended for local clients;
- Streamable HTTP is available at
/mcpfor self-hosted remote use; - successful fallback responses keep their normal schemas;
- controlled failures use typed MCP errors with stable
code,source, andretryablefields; - cache and corpus databases are separate and remain operator-owned.
Agent Plugin preview
GitHub Releases include tube-bridge-agent-plugin-<version>.zip, containing:
- the local stdio MCP configuration;
- the
tube-bridge-researchskill; - research templates and source-evaluation guidance.
Agent Plugins v1 does not standardize dependency installation. Install Python 3.12+, ffmpeg, and the package dependencies in the environment used by the plugin host. The bundle contains no credentials.
Known limitations
- YouTube can restrict anonymous yt-dlp and transcript requests, especially from cloud-hosting IP ranges.
- A Data API key improves discovery and metadata reliability but does not replace transcript access.
- Initial local embedding-model setup may require network access and additional disk space.
- tube-bridge is self-hosted software; it does not provide accounts, public hosted access, managed storage, or an SLA.
If YouTube blocks requests from your network, set TUBE_BRIDGE_PROXY. Keep proxy credentials in environment variables rather than committed configuration.
Development
python test_tools.py is an optional live YouTube smoke test. The deterministic test suite does not call YouTube.
See CONTRIBUTING.md to contribute. Security reports should follow SECURITY.md.
License
MIT — see LICENSE.
来源:README.md,提交 83ffec0
工具
0版本历史
2- v1.1.7最新Nov 4, 2026
- v1.1.6Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分