youtube-transcript-search
Allows searching YouTube videos and retrieving their transcripts, including manual or auto-generated subtitles, and searching transcripts for keywords with hit counts and contextual snippets.
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.
youtube-transcript-search
Serwer MCP + CLI, który przeszukuje transkrypcje filmów YouTube pod kątem słów kluczowych.
Używający agentów (Claude Desktop / Claude Code / OpenCode / Cursor) mogą pytać:
„znajdź filmy o X, w których ktoś mówi Y"
i dostają listę filmów z liczbą wystąpień oraz kontekstem wokół trafień.
Jak to działa
Wyszukanie filmów —
yt-dlpw trybieytsearchN:(bez pobierania wideo).Pobranie napisów —
yt-dlp --write-subs --write-auto-subs --sub-format vtt(napisy manualne lub auto-generowane).Czyszczenie — auto-napisy YouTube to „toczące się okno" (każdy cue zawiera poprzedni tekst). Parser bierze krótkie cue’y (~10 ms) i składa z nich czysty tekst.
Wyszukiwanie słów — regex case-insensitive + kontekst wokół trafień.
Dlaczego
yt-dlp, a nie scraping? YouTube zamknęło endpointy:/api/timedtextzwraca HTTP 200 z pustym body (wymaga tokenupot), ayoutubei/v1/get_transcriptzwraca HTTP 400 „Precondition check failed”. Przeglądarka (także headless) renderuje po kilku załadowaniach w jednej sesji stronę „tylko player” — bez opisu i transkrypcji.
Related MCP server: YouTube Insights MCP Server
Wymagania
Node.js >= 22
yt-dlp (zewnętrzna zależność):
uv tool install yt-dlp # %USERPROFILE%\.local\bin\yt-dlp.exe # albo: pip install yt-dlpŚcieżkę nadpisz zmienną
YT_DLP.
Instalacja
git clone https://github.com/PKrokosz/youtube-transcript-search.git
cd youtube-transcript-search
npm install # brak zależności runtime, ale porządkuje skryptyUżycie jako serwer MCP
node mcp-server.mjsKonfiguracja klienta:
{
"mcpServers": {
"youtube-transcript-search": {
"command": "node",
"args": ["C:/Users/admin/Desktop/youtube-transcript-search/mcp-server.mjs"]
}
}
}Narzędzia
Narzędzie | Co robi | Argumenty |
| filmy po frazie |
|
| transkrypcja jednego filmu + trafienia słów |
|
| przeszukiwanie transkrypcji: filmy → napisy → trafienia |
|
Przykład wyniku youtube_transcript_search:
[
{
"id": "gYU9-dVdgkA",
"title": "Cloudflare built a browser for AI agents in Rust",
"channel": "Let's Get Rusty",
"url": "https://www.youtube.com/watch?v=gYU9-dVdgkA",
"transcriptAvailable": true,
"transcriptLength": 7125,
"keywords": [
{ "keyword": "rust", "count": 18, "contexts": ["…they did it in Rust. The best part…"] }
]
}
]Użycie z CLI
# filmy + przeszukanie transkrypcji
node youtube-transcripts.mjs --search "rust headless browser" --limit 3 --keywords rust,obscura
# jeden film
node youtube-transcripts.mjs --video gYU9-dVdgkA --keywords rust
# pełny tekst transkrypcji
node youtube-transcripts.mjs --url "https://www.youtube.com/watch?v=gYU9-dVdgkA" --rawZmienne środowiskowe
Zmienna | Domyślnie | Znaczenie |
|
| ścieżka do yt-dlp |
| katalog temp | miejsce na tymczasowe pliki VTT |
Ograniczenia
Rate limit: YouTube zwraca HTTP 429 przy masowym pobieraniu napisów. Narzędzie ponawia 3× z rosnącą przerwą (4/8/12 s). Przy dużej skali potrzebny jest proxy residential — obsługa proxy jest w planie (patrz TODO w repo agentmg).
Język napisów: domyślnie
en. Dla polskich filmów użyj--langs pl(obsługiwane przez yt-dlp; kolejność prób:en,pl).Brak napisów: część filmów nie ma napisów w danym języku — wtedy
transcriptAvailable: false.Napisy są chronione prawami autorskimi — używaj lokalnie / do researchu.
Testy
node e2e-youtube.mjs # 9 kroków: handshake, lista narzędzi, search, transcript, trafieniaTest wymaga internetu i zainstalowanego yt-dlp.
Licencja
MIT — patrz LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
YouTube search, whole channels, video stats, comments and full transcripts with timestamps.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
YouTube video search with transcript extraction as first-class output.
Search YouTube videos, read transcripts and get public video information in your AI assistant.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables interaction with YouTube through search and transcript extraction functionality. Allows searching for videos and retrieving full transcripts with timestamps for content analysis.28-
- AlicenseBqualityCmaintenanceEnables extraction of transcripts, keyword-based video search with metadata retrieval, and channel information discovery from YouTube videos through natural language interaction.34MIT
- AlicenseNot gradedqualityDmaintenanceProvides tools for searching YouTube videos, retrieving transcripts, and performing semantic search over video content.MIT
- AlicenseAqualityBmaintenanceAllows AI agents to fetch, search, and summarize YouTube video transcripts without an API key, including chapter summaries.4MIT