youtube-context-mcp
Provides tools to fetch YouTube video transcripts (plain or timestamped), metadata (title, channel, upload date, duration, view/like counts, chapters, tags), and most-replayed moments, enabling AI agents to summarize, quote, highlight, or link to specific moments in YouTube videos.
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-context-mcpGet transcript and key moments from https://youtu.be/dQw4w9WgXcQ"
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-context-mcp
A small MCP server that gives agents rich context about a YouTube video — its transcript (plain or timestamped), jump-to-the-moment deep links, metadata (title, channel, upload date, duration, view/like counts, chapters, tags), and the most-replayed moments (where viewers rewatch most) — so they can answer questions, summarize, pull quotes, surface highlights, or point you to exactly where something is said.
It builds on youtube-transcript-api
(transcripts) and yt-dlp (metadata), which do the actual
fetching, and shapes them into a focused set of MCP tools designed for agents.
Transcripts are a video's existing captions/subtitles — it does not transcribe audio (no Whisper/ASR). Videos without captions have no transcript to return.
Install
Run it on demand with uv (no install needed):
uvx youtube-context-mcp@latestOr install it:
pip install youtube-context-mcpRelated MCP server: YouTube Insights MCP Server
Use it with an agent
Add it to your MCP client config:
{
"mcpServers": {
"youtube-context": {
"command": "uvx",
"args": ["youtube-context-mcp@latest"]
}
}
}Or, in Claude Code:
claude mcp add youtube-context -- uvx youtube-context-mcp@latestRunning over HTTP
By default the server talks stdio (the client launches it). If your client runs on a different host — for example LM Studio on Windows while this server runs in WSL2 — run it as a long-lived HTTP server instead and point the client at a URL:
youtube-context-mcp --transport http --host 0.0.0.0 --port 8000Then add it by URL:
{
"mcpServers": {
"youtube-context": { "url": "http://localhost:8000/mcp" }
}
}(--host 0.0.0.0 makes it reachable from the Windows side; WSL2 forwards localhost.)
Tools
Tool | What it does |
| Returns the transcript as text. |
| Builds a |
| Lists available transcripts (language, code, manual vs auto-generated, translatable) plus the translation targets. Use it when |
| Returns the video's title, channel, upload date, duration, view/like counts, chapters and tags. |
| Returns the video's most-replayed moments (YouTube's viewer-interest heatmap) as up to |
Proxies (optional)
YouTube blocks most datacenter/cloud IPs, so on a server you may hit RequestBlocked /
IpBlocked (transcripts) or a "Sign in to confirm you're not a bot" block (metadata). Locally
this is rarely needed. The same env vars route both transcript and metadata requests through a
proxy:
Env var | Purpose |
| Use Webshare rotating residential proxies. |
| Optional CSV of country codes, e.g. |
| Use a generic HTTP/HTTPS proxy instead. |
| Per-request timeout in seconds (default |
With no env set, requests go out directly.
Troubleshooting
RequestBlocked/IpBlocked— YouTube blocked the IP. Set the proxy env vars above.No transcript found — call
list_transcriptsto see which languages exist for that video.Transcripts disabled — the uploader turned captions off; nothing can be fetched.
Development
uv sync
uv run ruff check . && uv run ruff format --check .
uv run pytest
uv run mcp dev src/youtube_context_mcp/server.py --with-editable . # interactive inspectorLicense
MIT
Credits
Transcript fetching is done by youtube-transcript-api
by Jonas Depoix, and metadata by yt-dlp. This project is
the MCP adapter that wires them together for agents.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/realiti4/youtube-context-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server