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 Server get 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
Inputs: video_url_or_id (required). Returns: result
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
Inputs: video_url_or_id (required), languages, format_type. Returns: result
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
Inputs: video_url_or_id (required), languages, max_length. Returns: result
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
Inputs: query (required), video_url_or_id (required), languages. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
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
Transcripts, translations, summaries, subtitles, and search for public YouTube videos.
Search YouTube, read video metadata, and fetch transcripts with language preferences
Transcripts of YouTube videos, channels, playlists and searches; AI transcription when no captions.
Fetch YouTube transcripts with timestamps, search history, and export data for AI models.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables 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-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with YouTube videos by fetching transcripts, summarizing content, and answering questions based on video context.-