YouTube Transcript MCP Server
Retrieves transcripts from YouTube videos, supporting multiple URL formats, timestamp inclusion/exclusion, language selection, and transcript language availability checking.
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 Transcript MCP Serverget transcript for https://youtu.be/dQw4w9WgXcQ with timestamps"
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 Transcript MCP Server
A Model Context Protocol (MCP) server that retrieves transcripts from YouTube videos for Claude Code. This server allows you to easily extract video transcripts without manually downloading or copying content, making it perfect for analyzing video content, summarizing talks, or extracting information from educational videos.
blog article about this mcp server One More Piece Built: Adding YouTube Analysis to My Learning Iron Man Suit
npm package: @fabriqa.ai/youtube-transcript-mcp
Author: Cengiz Han
Features
Get Video Transcripts: Extract full transcripts from any YouTube video with available captions
Multiple URL Formats: Support for all common YouTube URL formats (youtube.com, youtu.be, etc.)
Timestamp Support: Include or exclude timestamps in transcript output
Language Selection: Request transcripts in specific languages when available
Error Handling: Graceful handling of videos without transcripts or invalid URLs
Efficient Context Usage: Get only the transcript without loading unnecessary video metadata
Related MCP server: YouTube Transcript MCP Server
Installation
Option A: Install from npm (Recommended)
npm install -g @fabriqa.ai/youtube-transcript-mcpAfter installation, the server will be available globally. You can configure it by running:
# The package will be installed in your global node_modules
# Typically: /usr/local/lib/node_modules/@fabriqa.ai/youtube-transcript-mcpOption B: Install from source
Clone this repository:
git clone https://github.com/hancengiz/youtube-transcript-mcp.git
cd youtube-transcript-mcpInstall dependencies:
npm installConfiguration
If installed via npm (Recommended):
Option 1: Using Claude Code CLI (Easiest)
Recommended: Machine-Wide Installation
# Add the MCP server for all projects (machine-wide)
claude mcp add --scope user youtube-transcript npx @fabriqa.ai/youtube-transcript-mcp@latestUnderstanding Scope Options:
Claude Code supports three configuration scopes for MCP servers:
--scope user(Recommended) - Machine-wideAvailable in ALL projects and directories
Configured once, works everywhere
Perfect for tools you use regularly across different projects
--scope local(Default) - Project-specificOnly available in the current directory and subdirectories
Useful for project-specific MCP servers
Each project must configure separately
--scope project- Explicit projectFor specific project configurations
Example usage:
# Machine-wide (recommended for youtube-transcript)
claude mcp add --scope user youtube-transcript npx @fabriqa.ai/youtube-transcript-mcp@latest
# Project-specific (if you prefer)
claude mcp add --scope local youtube-transcript npx @fabriqa.ai/youtube-transcript-mcp@latest
# Or use the convenience script
npx @fabriqa.ai/youtube-transcript-mcp/update-config.jsOption 2: Manual Configuration
Add to your ~/.claude.json:
{
"mcpServers": {
"youtube-transcript": {
"command": "npx",
"args": [
"@fabriqa.ai/youtube-transcript-mcp@latest"
]
}
}
}This uses npx to automatically run the globally installed package without needing to specify paths.
Quick Setup Script (Optional):
After installing via npm, you can use the included configuration script to automatically update your ~/.claude.json:
npx @fabriqa.ai/youtube-transcript-mcp/update-config.jsOr if installed from source:
node update-config.jsThis will automatically add the MCP server using npx, making it available machine-wide across all your projects.
Manual Configuration:
For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"youtube-transcript": {
"command": "npx",
"args": [
"@fabriqa.ai/youtube-transcript-mcp@latest"
]
}
}
}Usage
Once configured, restart Claude Code. The following tools will be available:
1. get-transcript
Retrieve the transcript of a YouTube video.
Parameters:
url(required): YouTube video URL or video IDlang(optional): Language code for transcript (e.g., 'en', 'es', 'fr'). Default: video's default languageinclude_timestamps(optional): Include timestamps in output. Default: true
Supported URL formats:
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://m.youtube.com/watch?v=VIDEO_IDVIDEO_ID(just the 11-character video ID)
Example:
Can you get the transcript from https://www.youtube.com/watch?v=LCEmiRjPEtQ?Get the transcript from this video without timestamps: https://youtu.be/LCEmiRjPEtQSummarize the key learnings from this Andrej Karpathy talk: https://www.youtube.com/watch?v=LCEmiRjPEtQ2. get-transcript-languages
Check what transcript languages are available for a video.
Parameters:
url(required): YouTube video URL or video ID
Example:
What transcript languages are available for https://www.youtube.com/watch?v=LCEmiRjPEtQ?Example Workflow
Here's how you might use this MCP server with Claude Code:
Extract a transcript to summarize a video:
Give me the key learnings from this Andrej Karpathy talk: https://www.youtube.com/watch?v=LCEmiRjPEtQAnalyze specific topics in a video:
Get the transcript from https://www.youtube.com/watch?v=LCEmiRjPEtQ and extract all mentions of "LLM" and "agents"Get transcripts in different languages:
What transcript languages are available for https://www.youtube.com/watch?v=LCEmiRjPEtQ?Extract quotes without timestamps (for long videos):
Get the transcript without timestamps from this video: https://www.youtube.com/watch?v=LCEmiRjPEtQNote: This 60-minute video generates ~19k tokens without timestamps vs ~30k with timestamps.
Research and content creation:
Get 3 key quotes from Andrej Karpathy about partial autonomy apps from https://www.youtube.com/watch?v=LCEmiRjPEtQ
Advanced: Using Claude Code Sub-Agents for Context Efficiency
Save 90% of your context when analyzing videos!
Claude Code supports specialized sub-agents that can analyze YouTube videos in an isolated context, returning only the insights to your main conversation. This means you can analyze many videos without filling up your context window with large transcripts.
Quick Example
Instead of this (fills your context with 20k+ tokens):
Get the transcript and analyze this video: [URL]Do this (only ~2k tokens in your context):
Use sub-agent to analyze this video: [URL]The youtube-transcript-analyzer Agent
This specialized agent:
✅ Fetches transcripts in its own isolated context
✅ Analyzes the content thoroughly
✅ Returns ONLY the analysis to you
✅ Lets you analyze 10+ videos in one session
✅ Keeps your context clean and focused
Learn More
📖 Complete Claude Code Sub-Agent Guide
The guide includes:
How sub-agents save context (with examples)
Complete setup instructions for the youtube-transcript-analyzer agent
Configuration files you can copy directly
Real-world usage examples and workflows
Advanced tips for analyzing multiple videos efficiently
Perfect for: Researchers, content creators, students, and anyone analyzing multiple videos in one session.
Use Cases
Content Summarization: Extract key learnings from hour-long technical talks (e.g., Andrej Karpathy's "Software in the Era of AI")
Research: Analyze conference talks, academic lectures, and educational content without watching
Content Creation: Get accurate quotes and references from video content for blog posts or articles
Learning & Education: Quickly review lecture content, extract main concepts and examples
Accessibility: Convert video content to searchable, readable text format
Interview Analysis: Extract quotes and insights from podcast interviews and panel discussions
Technical Documentation: Pull code examples and technical explanations from tutorial videos
Benefits
Time Saving: Get video content without watching the entire video
Context Efficiency: Extract only the text content you need
Flexible Format: Choose whether to include timestamps
Multi-language: Access transcripts in different languages when available
Easy Integration: Simple URL-based interface for Claude Code
Technical Details
Built with the @modelcontextprotocol/sdk
Uses a custom-built YouTube transcript library (
yt-lib/)Zero external dependencies for transcript fetching (uses native fetch API)
Runs as a local Node.js process communicating via stdio
Supports all YouTube videos with available transcripts/captions
Direct integration with YouTube's Innertube API for reliable transcript access
Limitations
MCP Protocol Token Limit
The MCP (Model Context Protocol) infrastructure has a 25,000 token response limit to protect Claude's context window and prevent performance issues. This limit is imposed by the MCP protocol layer, not by YouTube or this tool.
What this means:
Very long video transcripts (typically 60+ minutes) with timestamps enabled may exceed this limit
The transcript fetches successfully from YouTube, but MCP blocks the response if it's too large
Symptoms:
Error: MCP tool "get-transcript" response (30131 tokens) exceeds
maximum allowed tokens (25000). Please use pagination, filtering,
or limit parameters to reduce the response size.Solutions:
Disable timestamps (recommended for long videos):
Get the transcript without timestamps from https://www.youtube.com/watch?v=VIDEO_IDThis typically reduces response size by 20-30%, making most videos fit within the limit.
Request shorter videos (under 60 minutes usually work with timestamps)
Process in chunks: For very long videos, you may need to work with the transcript data programmatically rather than through the MCP tool
Real-world example (Andrej Karpathy's talk):
https://www.youtube.com/watch?v=LCEmiRjPEtQ (60-minute technical talk)
With timestamps: ~30,000 tokens ❌ (exceeds 25k limit)
Without timestamps: ~19,000 tokens ✅ (works perfectly)
Workaround: Simply ask "Get the transcript without timestamps" for long videos.
Troubleshooting
Server not appearing in Claude Code
Verify the path in your configuration file is correct
Ensure Node.js is installed and in your PATH
Check that dependencies are installed:
npm installRestart Claude Code completely
Check Claude Code logs for any error messages
"No transcript available" errors
Not all YouTube videos have transcripts
Some videos only have auto-generated captions in certain languages
Private or restricted videos cannot be accessed
Try checking if the video has captions enabled on YouTube
Language not found
Use the
get-transcript-languagestool to check available languagesCommon language codes: 'en', 'es', 'fr', 'de', 'ja', 'ko', 'pt', 'ru', 'zh', etc.
Not all videos have transcripts in all languages
Invalid URL errors
Ensure you're using a valid YouTube URL format
Video IDs should be exactly 11 characters
Make sure the video exists and is publicly accessible
Development
To modify or extend the server:
Edit
index.jsto add new tools or modify existing onesUpdate the
ListToolsRequestSchemahandler to register new toolsAdd corresponding handlers in the
CallToolRequestSchemahandlerTest your changes with
npm testRestart the server (restart Claude Code) to test changes
Testing
Run the test suite:
npm testThis will validate:
JSON schema compliance for Claude API
Tool registration and listing
Transcript fetching functionality
Error handling
URL parsing
License
MIT
Author
Created by Cengiz Han
Contributing
Feel free to submit issues or pull requests to improve this MCP server.
Available Tools
2 toolsget-transcriptA
Retrieve the transcript of a YouTube video. Accepts various YouTube URL formats and returns the full transcript with timestamps.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | YouTube video URL (e.g., https://www.youtube.com/watch?v=VIDEO_ID or https://youtu.be/VIDEO_ID) | |
| lang | No | Language code for transcript (e.g., 'en', 'es', 'fr'). Default: video's default language | |
| include_timestamps | No | Include timestamps in the transcript output. Default: true |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It states the tool returns 'full transcript with timestamps' but does not mention error handling, rate limits, or what happens if a transcript is unavailable. A basic retrieval tool is expected, but the lack of edge-case information with no annotations makes this only adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, no verbose or redundant phrasing. Front-loaded with the main purpose, followed by concise details on URL acceptance and output. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters and no output schema, the description covers the basic 'what' but is vague on output format and error scenarios. It does not explain timestamps format or how to handle missing transcripts. It is minimally adequate for a simple tool but not fully informative.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds minimal extra beyond the schema: it reinforces URL format flexibility and implies the default inclusion of timestamps, but does not provide significant new meaning for each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Retrieve' and the resource 'transcript of a YouTube video', and distinguishes itself from the sibling tool 'get-transcript-languages' by focusing on obtaining the actual transcript text. It also specifies handling various URL formats and returning timestamps, making the purpose very specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (to get a transcript) but does not explicitly mention the sibling tool 'get-transcript-languages' or when to prefer it. The context is clear for the core usage, but no exclusion or alternative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-transcript-languagesA
List all available transcript languages for a YouTube video.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | YouTube video URL |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It only states it 'list all available transcript languages' without disclosing behavioral traits like read-only nature, error handling for missing transcripts, authentication requirements, or rate limits. This is insufficient for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with clear verb 'list' and resource. No wasted words, front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one param, no output schema, no annotations), the description is adequate but incomplete. It doesn't mention return format, errors, or limitations (e.g., only works if transcript exists). Could be more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (one parameter 'url' described as 'YouTube video URL'). The description adds no additional meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description explicitly states the tool lists available transcript languages for a YouTube video. The verb 'list' and resource 'transcript languages' are specific, and it distinguishes from the sibling 'get-transcript' which presumably retrieves the actual transcript.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives. The sibling name 'get-transcript' implies a differentiation, but the description does not clarify when to choose this tool or what prerequisites exist (e.g., video must have captions).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have clearly distinct purposes: one retrieves a transcript, the other lists available languages. No overlap or confusion possible.
Both tools follow a consistent 'get-{noun}' pattern, making the naming predictable and easy to understand.
With only 2 tools, the server feels thin for its domain. While it covers the core need, a typical well-scoped server has more tools.
The server provides basic transcript retrieval and language listing, but lacks operations like searching transcripts or filtering by language, leaving minor gaps.
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 Connectors
Fetch the full transcript of any YouTube video as clean text. No API key, no signup.
Fetch transcripts, subtitles, chapters, metadata and frames from YouTube and 10+ video platforms
Extract YouTube transcripts, search what was said, and read on-screen frames with cited timestamps.
Free YouTube transcript fetcher: clean text, timestamped, SRT, VTT, Markdown, or JSON. No API key.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables fetching, searching, and analyzing YouTube video transcripts in multiple languages using yt-dlp. Supports timestamp filtering, language detection, and transcript summaries with robust error handling for production use.4MIT
- FlicenseDqualityDmaintenanceEnables AI assistants to fetch and analyze transcripts from YouTube videos using video IDs or URLs, with support for multiple language preferences.1
- AlicenseAqualityDmaintenanceEnables AI assistants to fetch YouTube video transcripts with precise timestamps, multi-language support, and time-range filtering.31MIT
- AlicenseAqualityDmaintenanceEnables fetching, searching, and summarizing YouTube video transcripts with multi-language support.4MIT
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/hancengiz/youtube-transcript-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server