This MCP server uses FastMCP and the public youtube-transcript-api package to fetch
YouTube video captions and return the full transcript as either plain text or SRT subtitles.
It supports:
- Input: Full YouTube URL (e.g.
https://www.youtube.com/watch?v=VIDEO_IDorhttps://youtu.be/VIDEO_ID) - Output: Full transcript as a single plain-text string
- Behavior: Works only for videos with existing captions (manual or auto-generated)
- Python 3.11+
uvinstalled on your system
From the project root (/Users/jaswirraghoe/Documents/youtube_mcp):
cd /Users/jaswirraghoe/Documents/youtube_mcp
uv syncThis will install:
fastmcp— MCP server frameworkyoutube-transcript-api— public YouTube transcript API wrapper
You can run the MCP server using uv:
cd /Users/jaswirraghoe/Documents/youtube_mcp
uv run youtube_mcp_server.pyThis starts the MCP server defined in youtube_mcp_server.py.
| YouTube Transcript | Description |
|---|---|
get_transcript_text |
Return the full transcript as plain text (captions concatenated in order) |
get_transcript_srt |
Return the full transcript in SRT subtitle format |
If the video has no captions, captions are disabled, or the video is unavailable,
the tools return a clear error message.
In your claude_desktop_config.json (or equivalent), you can register this server as:
{
"mcpServers": {
"youtube-transcript": {
"command": "/Users/jaswirraghoe/.local/bin/uv",
"args": [
"--directory",
"/Users/jaswirraghoe/Documents/youtube_mcp",
"run",
"youtube_mcp_server.py"
]
}
}
}After saving the config, restart your MCP client. You should then see a
youtube-transcript server with get_transcript_text and get_transcript_srt
tools that accept YouTube URLs and return the transcript as plain text or SRT.