An MCP (Model Context Protocol) server that provides YouTube transcript and video metadata tools for Claude Code.
- Fetch transcripts in multiple formats (plain text, SRT, VTT, JSON segments)
- List available caption languages for any video
- Retrieve video metadata (title, author, duration, views, description, keywords)
- Combined transcript + metadata in a single request
- No YouTube API key required -- uses
youtube-transcript-plusfor direct extraction - Lightweight stdio transport for seamless Claude Code integration
- Node.js 20 or later
- pnpm (or npm/yarn)
git clone https://github.com/pepinogttv/youtube-mcp.git
cd youtube-mcp
pnpm install
pnpm run buildRegister the MCP server so Claude Code can discover its tools:
claude mcp add youtube-mcp -- node /absolute/path/to/youtube-mcp/build/index.jsReplace /absolute/path/to/youtube-mcp with the actual path where you cloned the repository. Once registered, the tools are available in any Claude Code conversation.
Get the transcript/captions of a YouTube video.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | YouTube video URL or video ID |
lang |
string | No | BCP 47 language code (e.g. en, es, fr). Defaults to the video's primary language |
format |
string | No | Output format: text (default), srt, vtt, or segments (JSON with timestamps) |
List available caption/subtitle languages for a YouTube video.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | YouTube video URL or video ID |
Returns each language with its code, name, and whether it is auto-generated.
Get metadata for a YouTube video.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | YouTube video URL or video ID |
Returns: title, author, channel ID, video ID, duration, view count, live status, keywords, and description.
Get both the transcript and video metadata in a single request. More efficient than calling get_transcript and get_video_details separately.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | YouTube video URL or video ID |
lang |
string | No | BCP 47 language code (e.g. en, es, fr) |
format |
string | No | Output format: text (default), srt, vtt, or segments |
Once the server is registered with Claude Code, you can use prompts like:
- "Get the transcript of https://www.youtube.com/watch?v=dQw4w9WgXcQ"
- "What languages are available for this video? https://youtu.be/abc123"
- "Summarize this YouTube video: https://www.youtube.com/watch?v=xyz789"
- "Get the Spanish transcript of this video in SRT format: https://youtu.be/abc123"
- "What is this video about? Give me the metadata and transcript: https://www.youtube.com/watch?v=xyz789"
# Watch mode for development
pnpm run dev
# Build for production
pnpm run build