YouTube Transcript MCP Server
Fetches YouTube video transcripts by URL or video ID, supporting language selection, timestamped transcript entries, time-range pagination for long videos, and retrieval of available transcript and language information.
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 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 Transcript MCP Server (FastMCP)
A Model Context Protocol (MCP) server built with FastMCP that fetches YouTube video transcripts with pagination support for handling long videos.
Features
Fetch transcripts from YouTube videos using URL or video ID
Pagination support for long videos
Multiple language support
Timestamps for each transcript entry
Get info about available transcripts
Built with FastMCP for simplicity and reliability
Related MCP server: YouTube Transcript MCP Server
Installation
Install uv if you don't have it already, uv is necessary to be able to install the required dependencies in claude's isolated environment.
Step 1: Clone the Repository
git clone https://github.com/LucFauvel/youtube-transcript-mcp
cd youtube-transcript-mcpStep 3: Test the Server
uv run main.pyIf it starts without errors, you're ready to configure Claude Desktop!
Usage
Running the Server Directly
uv run main.pyInstalling as MCP Server
For Claude Desktop on macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
For Claude Desktop on Windows: Edit %APPDATA%/Claude/claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"youtube-transcript": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/youtube-transcript-mcp",
"run",
"main.py"
]
}
}
}For VSCode: run the MCP: Open User Configuration command and edit the mcp.json
Add this configuration:
{
"servers": {
"youtube-transcript": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/youtube-transcript-mcp",
"run",
"main.py"
]
}
}
}Available Tools
1. get_youtube_transcript
Fetches the transcript of a YouTube video with pagination support.
Parameters:
video_url_or_id(required): YouTube video URL or video IDstart_time(optional, default: 0): Start time in seconds (default: 0)end_time(optional, default: None, means end of video): End time in secondslanguages(optional, default: ["en"]): Array of preferred language codes
Example Usage:
Get the transcript of the fist 10 seconds of this video https://www.youtube.com/watch?v=dQw4w9WgXcQGet the Spanish transcript for https://www.youtube.com/watch?v=dQw4w9WgXcQSummarize this video https://www.youtube.com/watch?v=dQw4w9WgXcQ2. get_transcript_info
Get information about available transcripts for a YouTube video.
Parameters:
video_url_or_id(required): YouTube video URL or video ID
Example Usage:
What transcripts are available for https://www.youtube.com/watch?v=dQw4w9WgXcQ?Response Format
get_youtube_transcript Response
{
"video_id": "dQw4w9WgXcQ",
"language": "English",
"language_code": "en",
"is_generated": false,
"total_duration": "213.42s",
"requested_start_time": "30.00s",
"requested_end_time": "45.00s",
"actual_start_time": "30.02s",
"actual_end_time": "44.91s",
"total_entries": 128,
"returned_entries": 7,
"transcript": "[30.02s] We’re no strangers to love\n[31.75s] You know the rules and so do I\n[33.48s] A full commitment’s what I’m thinking of\n[36.02s] You wouldn’t get this from any other guy\n[38.10s] I just wanna tell you how I’m feeling\n[41.00s] Gotta make you understand\n[44.91s] Never gonna give you up"
}get_transcript_info Response
{
"video_id": "dQw4w9WgXcQ",
"total_entries": 128,
"total_duration": "213.42s",
"total_duration_formatted": "03:33",
"available_transcripts": [
{
"language": "English",
"language_code": "en",
"is_generated": false,
"is_translatable": true,
"translation_languages": [
{ "language": "Spanish", "language_code": "es" },
{ "language": "French", "language_code": "fr" },
{ "language": "German", "language_code": "de" },
{ "language": "Japanese", "language_code": "ja" }
]
},
{
"language": "English (auto-generated)",
"language_code": "en",
"is_generated": true,
"is_translatable": true,
"translation_languages": [
{ "language": "Spanish", "language_code": "es" },
{ "language": "French", "language_code": "fr" }
]
}
]
}Error Handling
The server handles common errors gracefully:
Transcripts disabled for video
No transcript found in requested languages
Video unavailable
Invalid page numbers
Network errors
Tips for Long Videos
Use
get_transcript_infofirst to see total entries and durationSpecify timestamps of interesting parts or chapters of the video
Ask the LLM to space out and sample different timestamps within the video
Example workflow:
1. Get transcript info for [video URL]
2. Get the first 5 minutes of transcript
3. Summarize the first 5 minutes
4. Get the last 10 minutes of the transcript and summarize itGetting the Code
The complete main.py code is provided above. Save it as main.py and the dependencies are in the pyproject.toml file.
Project Structure
youtube-transcript-mcp/
├── main.py # Main FastMCP server implementation
├── pyproject.toml # UV project file
└── README.md # This fileDependencies
fastmcp: FastMCP framework for building MCP serversyoutube-transcript-api: For fetching YouTube transcripts
Troubleshooting
Server not appearing in Claude Desktop:
Ensure the path in config is absolute, not relative
Check that Python is in your PATH
Restart Claude Desktop after config changes
Check Claude Desktop logs for errors
Transcript not found:
Not all videos have transcripts
Try using
get_transcript_infoto see available languagesSome videos may have auto-generated transcripts only
License
MIT License - feel free to use and modify as needed.
Available Tools
2 toolsget_transcript_infoA
Get information about available transcripts for a YouTube video.
Args:
video_url_or_id: YouTube video URL or video ID
Returns:
JSON string with available transcript languages, total entries, and video duration
Inputs: video_url_or_id (required). Returns: result
get_youtube_transcriptB
Fetches the transcript of a YouTube video between specified timestamps.
Args:
video_url_or_id: YouTube video URL or video ID
start_time: Start time in seconds (default: 0)
end_time: End time in seconds (default: None, means end of video)
languages: Preferred languages for transcript (default: ['en'])
Returns:
JSON string containing transcript entries with metadata
Inputs: video_url_or_id (required), end_time, languages, start_time. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools serve clearly separate purposes: one retrieves transcript content, the other retrieves metadata about available transcripts. An agent can trivially choose between fetching data and inspecting availability without risk of misselection.
Both tools use a consistent snake_case 'get_' verb pattern, which is predictable. The only minor deviation is that one name includes the 'youtube' qualifier while the other uses 'transcript_info', but the pair is still immediately readable.
Two tools is on the thin side, but the server's scope (YouTube transcript access) is narrow and each tool earns its place: metadata discovery plus content retrieval. Nothing extraneous is present.
The surface covers the core workflow: checking available languages/duration, then fetching entries with time-range and language filters. Minor gaps exist (no plain-text/formatted output option, no search within a transcript), but agents can work around these from the JSON output.
Maintenance
Related MCP Connectors
Fetch YouTube transcripts with timestamps, search history, and export data for AI models.
Transcripts of YouTube videos, playlists and channels with timestamps; SRT or WebVTT too.
Transcripts, translations, summaries, subtitles, and search for public YouTube videos.
YouTube transcripts, comments, video details, heatmaps, search, channels and playlists.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables fetching YouTube video transcripts with Google OAuth 2.0 authentication. Supports both manual and auto-generated transcripts with optional timestamps from video URLs or IDs.-
- AlicenseAqualityDmaintenanceRetrieves transcripts from YouTube videos with support for multiple languages, timestamp control, and language detection. Enables video content analysis, summarization, and quote extraction without manually downloading or watching videos.42123 npm16MIT
- 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