Give Claude a YouTube video
Claude cannot watch a video, but it reads transcripts well. vid2context hands it the transcript of any YouTube video with timestamps, plus the title, channel and chapters, so Claude can summarize, answer questions and cite the moment each answer comes from.
There are two ways: let Claude fetch videos itself through MCP (Claude Code and Claude Desktop), or upload a file to a Claude Project.
Claude Code
These steps use the published npm package vid2context-mcp.
Add the server for your user, so it is available in every project:
claude mcp add --scope user --transport stdio vid2context -- npx -y vid2context-mcpWith an optional key (another option has to sit between
--envand the name):claude mcp add --env GROQ_API_KEY=your-key --scope user --transport stdio vid2context -- npx -y vid2context-mcp
Then ask:
Get the transcript of https://www.youtube.com/watch?v=jNQXAC9IVRw and tell me what he says about the elephants, with timestamps.
Claude Desktop
Claude Desktop reads servers from claude_desktop_config.json. The full steps, including where the file lives on macOS and Windows, are on the Claude Desktop page. After a restart, the tools menu in a new chat lists vid2context.
What Claude receives
When Claude calls get_transcript, this is the text it gets back for "Me at the zoo", rendered by vid2context from a recorded run:
Title: Me at the zoo
Channel: jawed
URL: https://www.youtube.com/watch?v=jNQXAC9IVRw
Duration: 0:19
Transcript: creator-captions, en (youtube-captions)
Chapters: 0:00 Intro | 0:05 The cool thing | 0:17 End
[0:01] All right, so here we are, in front of the elephants
[0:05] the cool thing about these guys is that they have really...
[0:07] really really long trunks
[0:12] and that's cool
[0:14] (baaaaaaaaaaahhh!!)
[0:16] and that's pretty much all there is to sayA Claude Project, without MCP
To give Claude a video in the web app, upload a context pack: one Markdown file with the header, the chapters and the timed transcript, written for a model to read and cite. These commands use the published CLI through npx, so you only need Node.js 22 or newer.
npx -y vid2context pack "https://www.youtube.com/watch?v=jNQXAC9IVRw" > context.mdAdd context.md to the Project's files. This is that file for "Me at the zoo":
# Video context pack
This document holds the transcripts and metadata of one video (0:19 in total), prepared by vid2context for an AI model to read. Each transcript paragraph starts with the time it begins in the video, in brackets; linked times open the video at that moment.
Citation rule: when you use something from a video, cite it as [Title @ m:ss](link), using the time and link of the paragraph you drew on (or [Title @ m:ss] when the video has no link).
## Me at the zoo
- Channel: [jawed](https://www.youtube.com/channel/UC4QobU6STFB0P71PMvOGN5A)
- Duration: 0:19
- Source: https://www.youtube.com/watch?v=jNQXAC9IVRw
- Language: en
- Transcript: creator captions from youtube-captions
### Description
> Microplastics are accumulating in human brains at an alarming rate
> https://www.youtube.com/watch?v=0PT5c1z3LL8
>
> “Nanoplastics and Human Health” with Matthew J Campen, PhD, MSPH
> https://www.youtube.com/watch?v=RRBN_4L09Mg
>
> 00:00 Intro
> 00:05 The cool thing
> 00:17 End
### Chapters
- [0:00](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=0s) Intro
- [0:05](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=5s) The cool thing
- [0:17](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=17s) End
### Transcript
#### Intro (0:00)
[0:01](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=1s) All right, so here we are, in front of the elephants
#### The cool thing (0:05)
[0:05](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=5s) the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much all there is to saypack also takes several links or a whole playlist and fits them into a token budget with --max-tokens.
Long videos
A transcript costs about 12,000 tokens per hour. For long videos Claude can call get_outline first and read only the chapters it needs with get_section, or receive the transcript in pages with maxTokens.