tube-bridge

by thewhitewater

Not rated
GitHub

About

Self-hosted YouTube research MCP with 17 tools for search, transcripts, timestamped frames, comments, and private local semantic corpora.

Details

Author
thewhitewater
Categories
Search, Other, Knowledge Base

Setup

Install tube-bridge in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/thewhitewater/tube-bridge

Follow the installation instructions in the repository README, then restart your MCP client.

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.

- 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.

The simplest setup usesuvx, 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.

OpenSettings → Developer → Edit Configand add:

{ "mcpServers": { "tube-bridge": { "command": "uvx", "args": ["tube-bridge"] } } }

Restart Claude Desktop after saving the configuration.

claude mcp add --scope user tube-bridge -- uvx tube-bridge

Create.cursor/mcp.jsonin your project, or add the server to your user-level MCP configuration:

{ "mcpServers": { "tube-bridge": { "command": "uvx", "args": ["tube-bridge"] } } }
{ "servers": { "tube-bridge": { "type": "stdio", "command": "uvx", "args": ["tube-bridge"] } } }
codex mcp add tube-bridge -- uvx tube-bridge

Pi can load the package-relative adapter and the canonicaltube-bridge-researchskill from the same Git source:

python3 -m pip install tube-bridge==1.1.6 pi install git:github.com/TheWhiteWater/tube-bridge@v1.1.6 pi list

This registers one status tool plus all 17 MCP tools with thetube_bridge_prefix. The adapter reads the existingplugin.jsonandmcp.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 thepython3visible to Pi is Python 3.12+ with the tube-bridge dependencies installed; installffmpegseparately to useyoutube_get_frame. By default, Pi-managed state lives under the platform data directory; setTUBE_BRIDGE_PI_DATAto 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.

pi remove git:github.com/TheWhiteWater/tube-bridge@v1.1.6

If a desktop client cannot finduvx, replace"uvx"with the absolute path returned bywhich uvxon macOS/Linux orwhere.exe uvxon Windows.

Search YouTube for recent videos about local-first AI agents. Read the transcript of the strongest result, add it to a corpus namedlocal-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:

youtube_search(query="local-first AI agents", order="date") youtube_get_transcript(url="https://www.youtube.com/watch?v=VIDEO_ID", with_timestamps=true) corpus_create(corpus_id="local-agents", label="Local-first AI Agents") corpus_add(corpus_id="local-agents", url="https://www.youtube.com/watch?v=VIDEO_ID") corpus_search(corpus_id="local-agents", query="memory architecture") youtube_get_frame(url="https://www.youtube.com/watch?v=VIDEO_ID", timestamp_ms=FOUND_TIME_MS)

Add more videos withcorpus_add, then usecorpus_searchto search across all of their transcripts at once.

Nomeans 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.

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 inGoogle Cloud Console, enableYouTube Data API v3, and expose it to the process launching tube-bridge:

export YOUTUBE_API_KEY="your-key"

Keep keys out of committed MCP configuration files. Use your client's secret/environment support where available.

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

SetTUBE_BRIDGE_CACHEto move both corpus and cache databases:

export TUBE_BRIDGE_CACHE="/path/to/tube-bridge-data"

The embedding model may be downloaded on first use. After the assets are available, embedding inference does not require an external model API.

youtube_get_framerequiresffmpegonPATH; the Docker image already includes it.

Each call downloads a short temporary section aroundtimestamp_ms, returns one bounded JPEG as MCPImageContent, and removes the temporary media before returning. It does not create a frame or clip library.

pip install tube-bridge tube-bridge # stdio tube-bridge --http # Streamable HTTP on port 8080
docker run --rm -p 8080:8080 ghcr.io/thewhitewater/tube-bridge:latest

The health endpoint ishttp://localhost:8080/health; the Streamable HTTP endpoint ishttp://localhost:8080/mcp.

Registry name:io.github.TheWhiteWater/tube-bridge

Registry-aware clients can install the PyPI distribution withuvxand launch the stdio server without a hosted intermediary.

{ "mcpServers": { "tube-bridge": { "type": "http", "url": "https://your-host.example/mcp" } } }

Protect remote MCP routes by setting a server-side Bearer key:

export TUBE_BRIDGE_AUTH_KEY="choose-a-long-random-value" tube-bridge --http
{ "mcpServers": { "tube-bridge": { "type": "http", "url": "https://your-host.example/mcp", "headers": { "Authorization": "Bearer <your-key>" } } } }

/healthremains public./mcp,/sse, and/messagesrequire the Bearer key whenTUBE_BRIDGE_AUTH_KEYis set. Legacy SSE is available at/ssefor clients that still need it.

MCP client │ ├── discovery and metadata ── Data API v3 (when configured) │ └─ yt-dlp fallback ├── transcripts ───────────── youtube-transcript-api ├── timestamped frames ────── yt-dlp + ffmpeg → ephemeral JPEG └── semantic corpus ───────── SQLite + sqlite-vec + local fastembed

- 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 stablecode,source, andretryablefields;
- cache and corpus databases are separate and remain operator-owned.

GitHub Releasesincludetube-bridge-agent-plugin-<version>.zip, containing:

- the local stdio MCP configuration;
- thetube-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.

- 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, setTUBE_BRIDGE_PROXY. Keep proxy credentials in environment variables rather than committed configuration.

git clone https://github.com/TheWhiteWater/tube-bridge.git cd tube-bridge python3 -m venv .venv source .venv/bin/activate pip install -r requirements-release.txt pip install --no-deps -e . pip install pytest pytest-asyncio pytest-mock build twine python -m pytest tests -q

python test_tools.pyis an optional live YouTube smoke test. The deterministic test suite does not call YouTube.

SeeCONTRIBUTING.mdto contribute. Security reports should followSECURITY.md.

Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.

BYOK Reddit/YouTube research CLI with a tamper-evident audit log and an MCP server.

An agent-based tool for web search and advanced research, including analysis of PDFs, documents, images, and YouTube transcripts.

An MCP server providing search capabilities for Reddit, YouTube, and Twitter.

Provides search capabilities and data retrieval from SerpAPI and YouTube for AI assistants.

Get YouTube transcripts, search videos, browse channels, and extract playlists from any AI agent — powered by TranscriptAPI.com with no API key required.

Search a YouTube video's transcript and read its frames — every answer cites a clickable timestamp.

Search YouTube videos and retrieve their transcripts using the YouTube API.

A set of tools to interact with YouTube, including video search, transcript extraction, and comment retrieval.

Connect AI assistants to YouTube - search, transcripts, metadata, and more.

Search for scientific publications across ArXiv, ACL Anthology, HuggingFace Datasets, and Semantic Scholar.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.