YouTube Transcript MCP Server
Provides tools to fetch full transcripts, search within transcripts, get available languages, and generate summaries for YouTube videos.
Supports YouTube Shorts URLs for transcript retrieval, though full support is listed as a roadmap item.
Click on "Deploy 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 the transcript for 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 Transcript MCP Server
A powerful Model Context Protocol (MCP) server that provides seamless access to YouTube video transcripts using the youtube-transcript-api library.
๐ Features
๐ Get Full Transcripts - Fetch complete video transcripts in text or JSON format
๐ Multi-Language Support - Discover and fetch transcripts in different languages
๐ Smart Search - Search for specific text within video transcripts with context
๐ Transcript Summaries - Get concise summaries of video content
๐ URL Flexibility - Works with any YouTube URL format or direct video IDs
Related MCP server: YouTube Transcript MCP Server
๐ ๏ธ MCP Tools Available
1. get_transcript
Fetch the complete transcript for a YouTube video.
Parameters:
video_url_or_id: YouTube video URL or video IDlanguages: (Optional) List of language codes (e.g., ['en', 'es'])format_type: (Optional) Output format - 'text' or 'json' (default: 'text')
2. get_available_languages
Get all available transcript languages for a video.
Parameters:
video_url_or_id: YouTube video URL or video ID
3. search_transcript
Search for specific text within a video's transcript.
Parameters:
video_url_or_id: YouTube video URL or video IDquery: Text to search forlanguages: (Optional) List of language codes to search in
4. get_transcript_summary
Get a summary of the video's transcript.
Parameters:
video_url_or_id: YouTube video URL or video IDmax_length: (Optional) Maximum summary length in characters (default: 1000)languages: (Optional) List of language codes to use
๐ฆ Installation
Clone the repository:
git clone https://github.com/Ayaanisthebest/MCP-tool-for-YouTube-.git
cd MCP-tool-for-YouTube-Install dependencies:
pip install -e .Or install manually:
pip install youtube-transcript-api mcp[cli] fastmcpโ๏ธ MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"youtube-transcript": {
"command": "python3",
"args": ["-m", "youtube_transcript_mcp_server.server"]
}
}
}Note: On macOS, use python3 instead of python. If you have a different Python setup, you can also use the full path:
{
"mcpServers": {
"youtube-transcript": {
"command": "/opt/homebrew/bin/python3",
"args": ["-m", "youtube_transcript_mcp_server.server"]
}
}
}๐ฏ Usage Examples
Get a transcript:
get_transcript("https://www.youtube.com/watch?v=dQw4w9WgXcQ")Search within a transcript:
search_transcript("dQw4w9WgXcQ", "never gonna give you up")Get available languages:
get_available_languages("https://youtu.be/dQw4w9WgXcQ")Get a summary:
get_transcript_summary("dQw4w9WgXcQ", max_length=500)๐ Supported URL Formats
The server can extract video IDs from various YouTube URL formats:
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://www.youtube.com/embed/VIDEO_IDhttps://www.youtube.com/shorts/VIDEO_IDDirect video ID:
VIDEO_ID
๐งช Testing
Run the test script to verify everything works:
python3 test_server.py๐ Dependencies
youtube-transcript-api>=0.6.2- Core YouTube transcript functionalitymcp[cli]>=1.3.0- Model Context Protocol supportfastmcp>=0.4.0- FastMCP framework for easy MCP server development
๐ Error Handling
The server includes comprehensive error handling for:
Invalid video URLs or IDs
Videos without transcripts
Network connectivity issues
Unsupported languages
Rate limiting
๐ License
MIT License - see LICENSE file for details.
๐จโ๐ป About the Developer
Ayaan Ahmad - Full-Stack Developer & AI Enthusiast
I'm passionate about creating innovative tools that bridge the gap between AI and real-world applications. This YouTube Transcript MCP Server is part of my ongoing work to make AI more accessible and powerful through the Model Context Protocol ecosystem.
Connect with me:
GitHub: @Ayaanisthebest
Building the future of AI-powered tools, one MCP server at a time! ๐
๐ค Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
๐ Roadmap
Support for YouTube Shorts transcripts
Batch transcript processing
Transcript translation capabilities
Enhanced search with fuzzy matching
Transcript export to various formats
Made with โค๏ธ for the AI community
Available Tools
4 toolsget_available_languagesA
Get available transcript languages for a YouTube video.
Args: video_url_or_id: YouTube video URL or video ID ctx: MCP context for logging
| Name | Required | Description | Default |
|---|---|---|---|
| video_url_or_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries the full burden for behavioral disclosure. The word 'Get' implies a read-only operation, but the description does not explicitly state that it is safe, non-mutating, or free of side effects. It also fails to mention any authentication requirements, rate limits, or error behavior.
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 extremely concise, consisting of a single purpose statement and a short argument list. There is no redundant or filler text, and the purpose is front-loaded. Every sentence provides useful information.
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?
For a simple tool with one parameter and an output schema, the description covers the essential purpose and parameter semantics. It does not elaborate on return values (which are covered by the output schema) or usage context, but given the minimal complexity, it is reasonably complete. The lack of usage guidance is a minor gap and is already penalized in the usage_guidelines dimension.
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?
The description clarifies the meaning of the sole schema parameter video_url_or_id by stating it accepts either a YouTube video URL or a video ID. This adds value beyond the schema, which only specifies the type as string. The mention of 'ctx' is extraneous since it is not in the schema, but it does not detract from the added clarity.
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 tool's function: 'Get available transcript languages for a YouTube video.' It uses a specific verb ('Get') and identifies a distinct resource ('available transcript languages'), which clearly differentiates it from sibling tools like get_transcript, search_transcript, and get_transcript_summary.
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 provides no guidance on when to use this tool versus the sibling tools. It does not mention typical workflows, prerequisites, or exclusions. For example, it does not suggest using this tool before get_transcript to check available languages.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_transcriptA
Fetch the transcript for a YouTube video.
Args: video_url_or_id: YouTube video URL or video ID languages: List of language codes to try (e.g., ['en', 'es']). If None, uses default. format_type: Output format - 'text' or 'json' ctx: MCP context for logging
| Name | Required | Description | Default |
|---|---|---|---|
| languages | No | ||
| format_type | No | text | |
| video_url_or_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It mentions that languages are 'tried' and that None uses default, but it fails to state the read-only nature, error handling, or whether the transcript includes timestamps or other formatting details. The extraneous mention of 'ctx' for logging adds confusion without clarifying behavior.
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 concise, with a one-sentence summary followed by an args list. However, the inclusion of 'ctx: MCP context for logging' which does not appear in the input schema is extraneous and could mislead the agent. Removing it would make the description fully tight.
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?
For a simple fetch tool with an output schema, the description covers the essential parameters and basic purpose. However, it lacks usage guidance relative to siblings and does not disclose limitations or edge cases (e.g., videos without transcripts). The output schema presumably handles return structure, so the description is adequate but not fully 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?
The input schema has 0% description coverage, and the description compensates thoroughly. It explains each real parameter: video_url_or_id accepts a URL or ID, languages is a list of language codes with default behavior, and format_type accepts 'text' or 'json'. While 'ctx' is not in the schema and is an unnecessary addition, the remaining parameter explanations are clear and actionable.
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 opens with 'Fetch the transcript for a YouTube video,' a specific verb+resource combination. It clearly differentiates from sibling tools like search_transcript (search within transcripts) and get_transcript_summary (summarize), making the tool's primary function unmistakable.
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 provides no guidance on when to use this tool versus its siblings. It does not mention alternatives such as get_available_languages for listing languages or search_transcript for searching within a transcript, leaving the agent without decision-making context for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_transcript_summaryA
Get a summary of a YouTube video's transcript.
Args: video_url_or_id: YouTube video URL or video ID max_length: Maximum length of the summary in characters languages: List of language codes to use. If None, uses default. ctx: MCP context for logging
| Name | Required | Description | Default |
|---|---|---|---|
| languages | No | ||
| max_length | No | ||
| video_url_or_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden for behavioral disclosure. It does not mention whether an API key is required, whether it makes network calls, side effects, rate limits, or failure modes (e.g., when subtitles are unavailable). The only extra clue is 'ctx: MCP context for logging', but this is minimal.
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 compact and front-loaded, with a clear purpose sentence followed by a terse Args list. The only minor issue is that 'ctx' is described but not present in the input schema, which could cause slight confusion about whether to pass it explicitly.
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 output schema exists, return values don't need explaining. The description covers all input parameters and provides a clear functional summary. It lacks error handling details or alternative tool guidance, but for a simple read-only summarizer, this is sufficient for an agent to invoke correctly.
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 description coverage is 0%, but the docstring explains every parameter: video_url_or_id as URL or ID, max_length as character limit, and languages as optional codes with default behavior. These explanations add substantial meaning beyond the bare schema types and defaults.
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 begins with 'Get a summary of a YouTube video's transcript', which uses a specific verb and resource. It clearly distinguishes this tool from siblings like get_transcript (raw transcript) and search_transcript (search within transcript) by focusing on summarizing.
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 usage when a summary is needed rather than raw transcript or search results. It does not explicitly name alternatives or state exclusions, but the purpose is clear enough to guide selection. A more explicit 'use this when...' would push it to 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_transcriptA
Search for specific text within a YouTube video's transcript.
Args: video_url_or_id: YouTube video URL or video ID query: Text to search for in the transcript languages: List of language codes to search in. If None, uses default. ctx: MCP context for logging
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| languages | No | ||
| video_url_or_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits but only states the core function and parameter list. It does not mention return format, case sensitivity, or requirements like captions being enabled, providing minimal transparency.
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 concise with a single action-oriented sentence and a structured parameter list. It is front-loaded with the purpose and avoids unnecessary detail.
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 presence of an output schema, return values need not be described. The description covers all parameters and the main action, but it doesn't mention limitations (e.g., videos without transcripts) or language code formats, leaving room for improvement.
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?
The Args section adds clear meaning to all schema parameters, including the default behavior for languages and the role of ctx. Since schema description coverage is 0%, this compensation is valuable, though it could clarify language code formats.
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 'Search for specific text within a YouTube video's transcript', which specifies the action, resource, and distinguishes it from sibling tools like get_transcript (which retrieves full transcripts) and get_available_languages (which lists languages).
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 usage for searching within a transcript but does not explicitly compare against alternatives or state when not to use it. The sibling tools are not referenced, leaving the choice of tool to be inferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
get_available_languages - First observed
get_transcript - First observed
get_transcript_summary - First observed
search_transcript
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: fetching full transcripts, listing available languages, searching within a transcript, and summarizing a transcript. There is no overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern in snake_case (get_transcript, get_available_languages, search_transcript, get_transcript_summary). The verbs vary appropriately based on action, but the naming convention is uniform and predictable.
With only 4 tools, the server is tightly scoped to transcript-related operations. Each tool serves a distinct and necessary function for the domain, making the count appropriate and well-balanced.
The tool set covers the core transcript workflow: retrieval, language discovery, searching, and summarization. There are no obvious dead ends or missing operations for a transcript-focused MCP server.
Maintenance
Related MCP Connectors
Search YouTube, read video metadata, and fetch transcripts with language preferences
Extract YouTube transcripts, search what was said, and read on-screen frames with cited timestamps.
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
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
- FlicenseBqualityNot gradedmaintenanceEnables extraction and processing of YouTube video transcripts from individual videos, channels, and playlists. Supports transcript search, batch processing, multiple output formats (JSON, text, SRT, VTT), and bulk operations across multiple videos.1134 npm-
- 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