Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

youtube-mcp

An MCP (Model Context Protocol) server that provides YouTube transcript and video metadata tools for Claude Code.

Features

  • 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-plus for direct extraction
  • Lightweight stdio transport for seamless Claude Code integration

Prerequisites

  • Node.js 20 or later
  • pnpm (or npm/yarn)

Installation

git clone https://github.com/pepinogttv/youtube-mcp.git
cd youtube-mcp
pnpm install
pnpm run build

Usage with Claude Code

Register the MCP server so Claude Code can discover its tools:

claude mcp add youtube-mcp -- node /absolute/path/to/youtube-mcp/build/index.js

Replace /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.

Available Tools

get_transcript

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_languages

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_video_details

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_transcript_with_metadata

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

Examples

Once the server is registered with Claude Code, you can use prompts like:

Development

# Watch mode for development
pnpm run dev

# Build for production
pnpm run build

License

MIT

About

MCP server for YouTube transcripts and video metadata — use with Claude Code

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages