YouTube Knowledge MCP
The YouTube Knowledge MCP server enables AI assistants to search, analyze, extract, and organize knowledge from YouTube videos and channels, with both local and remote deployment options.
Search & Discovery: Search for videos and channels by keyword; list videos from playlists or channels; retrieve detailed metadata for videos, channels, and playlists (title, duration, views, likes, tags, description, subscribers, video counts).
Transcripts & Content Analysis: Extract transcripts with timestamps, language support, and caching; search within transcripts to find exact moments with deep links; get chapter markers and top comments.
Media Extraction (local): Cut video/audio clips by time range or chapter; capture frames; export subtitles in SRT/VTT/TXT; download full videos with quality presets (best, 2160p–360p, audio-only) or a specific format ID; list available download formats.
Knowledge Library (local): Save, list, search, tag, and delete summaries and skill notes; rebuild the search index.
Channel Brains (local): Build a searchable corpus of timestamped passages from an entire channel; ask questions across a creator's content; measure channel statistics; save a profile.
Health & Diagnostics: Check availability and versions of yt-dlp and ffmpeg; provide actionable error codes; handle rate limiting and retries.
Deployment & Extensibility: Supports local stdio and remote HTTP transports; includes reusable prompts (e.g., summarize_video, create_brain) and resource URLs (e.g., youtube://transcript/{videoId}).
Provides tools for searching, analyzing, and extracting knowledge from YouTube videos including transcripts, chapters, comments, channel info, and video metadata.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YouTube Knowledge MCPsearch for latest tech reviews"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
YouTube Knowledge MCP
A Model Context Protocol (MCP) server that gives AI assistants the ability to search, analyze, and extract knowledge from YouTube videos. Works with Claude Desktop, Claude Code, Claude.ai, Cursor and any MCP-compatible client.
Supports both local (stdio) and remote (Streamable HTTP) transports.
![]()
Features
Find and read
Search videos and channels by keyword
Fetch videos from a playlist or channel
Video, channel and playlist metadata, chapters, and top comments
Transcripts with timestamps, sliced by time range or chapter, and capped so a three-hour video cannot flood your context
Search inside a transcript and get back
?t=links that open the video at the exact momentBatch tools: transcripts for many videos at once, or a whole-playlist digest
Extract for editing
Clip a time range without downloading the whole video, cut precisely or on keyframes, by timestamp or chapter name
Audio clips in mp3, m4a, wav, flac or opus
Frame capture at any timestamp, without downloading the file
Subtitle export as SRT, WebVTT or plain text for Premiere, Resolve or CapCut
Full downloads with quality presets
Keep what you learn (local mode)
Save summaries and skill notes to a local library
Read them back, and search across all of them with full-text ranking
Tag, retag and delete
Build a brain for a channel (local mode)
Read a whole channel into a searchable corpus of timestamped passages, in any caption language, resumable and safe to interrupt — a second run continues where it stopped and picks up new uploads
Ask what a creator has said about anything, across every video, and get back the moments themselves with links that open the video there
Measure the channel: how much was readable, its upload rhythm, its speaking rate, and the phrases it repeats across videos
Keep a written profile beside the corpus, grounded in passages you can cite
Built to stay working
WebVTT parsed by the W3C reference implementation, not a hand-written matcher
Typed, actionable errors — "no captions in en, try: fr, es, de" rather than a wall of yt-dlp stderr
Timeouts, retry with backoff, and a concurrency limit on every yt-dlp call
check_healthdiagnoses missing or outdated yt-dlp and ffmpegStructured output on every tool, plus MCP resources, prompts and completions
Related MCP server: YouTube Translate MCP
Prerequisites
Node.js 22+
yt-dlp — required by every tool.
brew install yt-dlp(macOS) orpip install -U yt-dlpffmpeg — required for downloads, clip extraction and frame capture. Everything else works without it.
Run the check_health tool to confirm both are installed and current. An
outdated yt-dlp is the most common cause of unexplained failures, since YouTube
changes frequently; yt-dlp -U fixes most of them.
Installation
Via npm (Recommended)
npm install -g youtube-knowledge-mcpVia npx (no installation)
Configure directly with npx (see Configuration section).
From source
git clone https://github.com/teobouancheau/youtube-knowledge-mcp.git
cd youtube-knowledge-mcp
npm install
npm run buildConfiguration
Local (stdio) -- Claude Desktop, Claude Code, Cursor
Quick Start with npx
{
"mcpServers": {
"youtube-knowledge": {
"command": "npx",
"args": ["-y", "youtube-knowledge-mcp"]
}
}
}With Global Installation
npm install -g youtube-knowledge-mcp{
"mcpServers": {
"youtube-knowledge": {
"command": "youtube-knowledge-mcp"
}
}
}Configuration File Locations
Client | Path |
Claude Desktop (macOS) |
|
Claude Desktop (Windows) |
|
Claude Desktop (Linux) |
|
Claude Code |
|
Cursor |
|
Restart your client after updating configuration.
Remote (HTTP) -- Claude.ai, Claude Mobile, Custom Connectors
The server supports Streamable HTTP transport for remote access via Claude's official connectors.
Every remote setup is your own deployment. There is no shared instance to point a connector at, by design: every call shells out to yt-dlp, so a single host serving other people's traffic is a host YouTube rate-limits for all of them. The button below deploys this repository into your own Render account, in about two minutes and without cloning anything.
Self-hosted
npm run build
npm run start:httpThe server listens on PORT (default 3000). Set PORT environment variable to change.
Docker
docker build -t youtube-knowledge-mcp .
TOKEN=$(openssl rand -hex 32) && echo "MCP_AUTH_TOKEN=$TOKEN"
docker run -p 3000:10000 -e MCP_AUTH_TOKEN="$TOKEN" youtube-knowledge-mcpThe token is printed because nothing else will print it: the server logs that a
token is required, never its value. Send it as Authorization: Bearer $TOKEN.
The image sets PORT=10000 and exposes it; publish it on whatever host port you
like. The build happens inside the image, so no local npm run build first.
Deploy to Render
The button opens Render's Blueprint flow against render.yaml in
this repository, which builds the Docker image, points the health check at
/health and generates an MCP_AUTH_TOKEN for you. No fork, no clone, no
settings to fill in — the service is yours, on your account.
Click the button and confirm. Render builds the image and deploys it.
Open the service's Environment tab and copy the generated
MCP_AUTH_TOKEN. The HTTP transport rejects every request without it, so a URL that leaks is not an open server.Add
https://<your-service>.onrender.com/mcpas a custom connector, withAuthorization: Bearer <token>.
Worth doing once the service exists: set MCP_ALLOWED_HOSTS to your service's
hostname (<your-service>.onrender.com). It cannot be filled in from the
Blueprint, since the hostname does not exist until the service does, and it
rejects requests arriving under any other name.
Your instance does not follow this repository. The Blueprint sets
autoDeployTrigger: off, because auto-deploying would run code pushed here
inside your account, under your token, without you reading it first. To take a
newer version, use Manual Deploy on the service.
The free plan sleeps after inactivity, so the first call after a pause waits for a cold start. Any paid plan removes that.
Connect via Claude.ai
Go to Settings > Connectors
Click Add custom connector
Enter your server URL (e.g.,
https://your-app.onrender.com/mcp)Add the
Authorization: Bearer <token>header if you setMCP_AUTH_TOKENClick Add
MCP Tools
33 tools. The 14 read-only ones work over both transports; the 19 that touch your filesystem are registered only in local (stdio) mode, so a remote deployment cannot reach the host's disk.
Every tool returns human-readable text and typed structured output, and
reports failures as an actionable message — [NO_CAPTIONS] No "en" captions are available for this video. Call get_transcript again with one of: fr, es, de.
Discovery — remote + local
Tool | Key parameters | Returns |
|
| Matching videos with durations, channels and view counts |
|
| Matching channels with subscriber counts |
|
| Videos in a playlist or channel |
|
| Title, channel, duration, views, likes, description, tags |
|
| Name, handle, subscriber count, description |
|
| Title, channel, video count, last updated |
|
| Chapter titles with start/end times and deep links |
|
| Top-level comments by popularity |
|
| Available formats grouped by video+audio, video-only, audio-only |
| — | yt-dlp and ffmpeg status, versions, and staleness warnings |
Transcripts — remote + local
Tool | Key parameters | Returns |
|
| Transcript as plain text, timestamped lines, or cues |
|
| Matches with timestamps and |
|
| Transcripts for many videos; failures reported per video |
|
| Per-video metadata, chapters and transcript stats |
format: "timestamped" prefixes each line with [MM:SS] — use it when you need
to cite or link to a moment. maxChars with offset reads a long transcript in
pieces instead of returning 100,000+ tokens at once.
Extraction for editing — local only
Tool | Key parameters | Returns |
|
| Path to the cut video |
|
| Path to the audio file |
|
| One file per range |
|
| Path to a PNG or JPG still |
|
| Path to the subtitle file |
|
| Path to the downloaded video |
Clips are cut with --download-sections, so only the byte range covering the
window is fetched rather than the whole file. preciseCuts (default true)
cuts exactly at the requested times; set it to false for a faster
keyframe-aligned cut. All of these require ffmpeg.
Knowledge library — local only
Tool | Key parameters | Returns |
|
| Path to the saved note |
|
| Saved items, newest first |
|
| The saved markdown and its metadata |
|
| Ranked matches with excerpts |
|
| The updated tags |
|
| What was deleted |
| — | Number of notes reindexed |
Channel brains — local only
Tool | Key parameters | Returns |
|
| What was read, what was ruled out, and the stats |
|
| Passages with timestamps and |
| — | Every brain built locally |
|
| Coverage, statistics and repeated phrases |
|
| Path to the saved profile |
|
| What was removed |
build_brain is the only one that touches the network. The rest resolve a
channel from what is already on disk, so they work offline and cost nothing to
call.
A brain holds one caption language; pass language to read another, and build a
separate brain per language.
since and minDurationSeconds describe the brain, not just the call that
passed them. They are re-applied every time, so narrowing one drops the passages
of the videos it excludes and widening it reads them back — which is why
build_brain is annotated as destructive. Whether a video qualifies is decided
from the date and length already recorded, so changing your mind costs no
requests until there is something new to fetch. Those values come from each
video's own metadata, never from a guess: a flat channel listing does not carry
a publication date at all.
build_brain also repairs. If the passage file is lost or truncated, the videos
it can no longer account for are read again on the next call rather than being
skipped forever as already done.
Prompts
Reusable workflows your client can invoke directly: summarize_video,
extract_skill, compare_videos, research_topic, channel_deep_dive,
clip_from_quote (find a phrase, then cut the clip around it), and — local
only — review_library, create_brain (build a channel's corpus, then write
its profile from it) and ask_creator (answer a question strictly from a
brain, with citations).
Resources
youtube://transcript/{videoId}— a timestamped transcript, fetched and cached on first readyoutube://library/{videoId}/{summary|skill}— a saved note (local only, and enumerable)youtube://brain/{channelId}/{manifest|profile}— what a channel brain covers, or the profile written from it (local only, and enumerable)
Error codes
Failures are reported inside the result so the model can read and recover from them, each prefixed with a code and followed by a next step.
Code | Meaning |
| The video cannot be accessed |
| yt-dlp reports the video needs a signed-in account |
| No captions in the requested language; the message lists the ones that exist |
| An upcoming stream, or one whose recording is still processing |
| Transient; retried automatically with backoff before surfacing |
| A tooling problem; the message says how to fix it |
| A bad argument, caught before any network call |
| The client cancelled the request |
Environment variables
All optional.
Variable | Default | Purpose |
| unset | Require this bearer token on the HTTP transport. Set this if you expose the server beyond localhost. |
| unset | Comma-separated Host allowlist; enables DNS-rebinding protection |
| unset | Comma-separated Origin allowlist |
|
| Interface to bind |
|
| HTTP port. The Docker image sets |
|
| Requests per window, per client |
|
| Rate-limit window |
|
| Close HTTP sessions idle this long |
|
| Reject new sessions past this many |
|
| Concurrent yt-dlp processes |
| 30 days | Transcript cache lifetime |
Library Storage
Content is stored in ~/.youtube-knowledge/:
~/.youtube-knowledge/
├── transcripts/ # Cached timestamped transcripts
│ └── {video_id}.{lang}.json
├── library/ # Saved notes
│ └── {video_id}/
│ ├── metadata.json
│ ├── summary.md
│ └── skill.md
├── brains/ # Channel brains
│ └── {channel_id}/
│ ├── manifest.json # What the brain covers, and where a build stopped
│ ├── chunks.json # The timestamped passages
│ └── profile.md # The written account, if one was saved
├── downloads/ # Full downloads
├── clips/ # Extracted clips
├── frames/ # Captured stills
├── subtitles/ # Exported SRT / VTT / TXT
├── index.json # Library index
└── search-index.json # Full-text search indexTranscripts are cached for 30 days by default; pass refresh: true to any
transcript tool to bypass the cache, or set YOUTUBE_MCP_TRANSCRIPT_TTL_MS.
Every tool that writes files confines its output to your home directory, and
outputDir is rejected if it points anywhere else.
Usage Examples
Find a moment and cite it
"Find where this video talks about rate limiting and give me the timestamp:
https://youtube.com/watch?v=..."search_transcript returns each match with a link that opens the video at that
second, so the claim can be checked rather than taken on trust.
Find a moment and clip it
"Find where she says 'the real bottleneck was the database' and cut me a
30-second clip around it"search_transcript locates the moment, extract_clip cuts it. Only the byte
range covering the clip is downloaded.
Read one section of a long video
"Summarize just the 'Benchmarks' chapter of this 3-hour podcast"get_chapters finds the section, then get_transcript with chapter: "Benchmarks" reads only that part instead of the whole thing.
Survey a playlist cheaply
"What does this 40-video course cover, and which three videos should I watch?"digest_playlist returns metadata and chapters for every video in one call.
Prepare footage for an edit
"Pull these four moments as separate clips and export the subtitles as SRT"extract_clips cuts all four in one call; export_subtitles writes a file your
editor can import.
Build and query a knowledge base
"Summarize this video and save it to my library tagged 'databases'"
"What have I saved about connection pooling?"save_to_library stores it; search_library searches across everything saved
with full-text ranking.
Build a brain for a creator
"Build a brain for @Fireship, then tell me everything they've said about Rust"build_brain reads the channel into timestamped passages — interrupt it and
call it again to continue. ask_brain then answers from what was actually
said, returning the moments themselves so every claim can be checked against
the video. Run build_brain again a month later and it reads only the new
uploads.
Testing
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report, with thresholds enforcedThe suite covers the pure logic directly, drives the real server through an MCP client over an in-memory transport, exercises the library against a real temporary filesystem, and snapshots the tool manifest so any change to the public surface shows up as a reviewable diff.
Development
npm run dev # Watch mode
npm run build # Build for production
npm run rebuild # Clean and rebuild
npm start # Run server (stdio)
npm run start:http # Run server (HTTP)
npm run validate # Typecheck + lint + format check + testCI runs the same gate on Node 22 and 24 for every push and pull request, then boots the built server as a real MCP client to verify the manifest.
Contributing
Contributions are welcome — see CONTRIBUTING.md for the project layout, coding standards, and how to add a tool.
Security
The HTTP transport is unauthenticated unless you set MCP_AUTH_TOKEN. See
SECURITY.md before exposing it beyond localhost, and to report a
vulnerability.
License
MIT License - see LICENSE for details.
Acknowledgments
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to extract transcripts from YouTube videos, allowing AI to analyze and work with video content directly.8153MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables access to YouTube video content through transcripts, translations, summaries, and subtitle generation in various languages.54MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that analyzes YouTube videos, enabling users to extract transcripts, generate summaries, and query video content using Gemini AI.13MIT
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables searching YouTube videos, retrieving and storing transcripts, and performing semantic search over video content without using the official YouTube API.29MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/teobouancheau/youtube-knowledge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server