YouTube MCP server for Claude Code
One command adds the hosted server; sign in through /mcp or pass an API key as a header. Claude Code can then pull transcripts, search YouTube and list channels while it works.
https://youtubetranscriptapi.com/mcpWhat you need
- Claude Code in your terminal or IDE.
- An API key from Dashboard → API Keys (or sign in instead, where the app supports it). New accounts get 100 free credits.
Connect Claude Code
Add the server
Terminalclaude mcp add --transport http youtube https://youtubetranscriptapi.com/mcpThis saves it for the current project only (
--scope local, the default). Use--scope userfor all your projects, or--scope projectto share it through.mcp.jsonin git.Sign in
Start Claude Code, run
/mcp, pick youtube and choose to authenticate. Your browser opens our consent screen; approve, and Claude Code is connected. (claude mcp login youtubedoes the same from the shell.)Check it
claude mcp listshould show youtube as connected. Then ask for something that needs a video, like the prompt below.
With an API key instead
For CI or a shared machine, skip sign-in and send a key as a header:
claude mcp add --transport http youtube https://youtubetranscriptapi.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
Avoid committing the key: keep this in local or user scope, not in a shared .mcp.json.
Already connected on claude.ai?
If you added the YouTube connector on claude.ai and you're signed in to Claude Code with the same subscription, it shows up automatically and you can skip the steps above.
Long transcripts
Claude Code caps a tool result at 25,000 tokens. Transcripts come in parts of 60,000 characters by default, which fits; Claude Code reads the next part with the offset the result gives it. Later parts are free.
Try this prompt
Use the youtube tools to get the transcript of https://youtu.be/dQw4w9WgXcQ with timestamps, then quote the first line with its timestamp.
Claude Code calls get_transcript with timestamps on and quotes a [m:ss] line. 1 credit.
What each call costs
| Tool | What it does | Cost |
|---|---|---|
| get_transcript | Read what's said in any public video | 1 credit |
| search_youtube | Search YouTube for videos or channels | 4 credits |
| search_channel | Search one channel's videos for a topic | 1 credit |
| list_channel_videos | List a channel's latest 100 uploads | 20 credits |
| get_latest_videos | See a channel's 15 newest videos | Free |
| resolve_channel | Turn an @handle into a channel ID | Free |
| list_playlist_videos | List the videos in a playlist | 20 credits |
- Failed calls are never charged: a video without captions, a bad link, a timeout.
- A long transcript comes back in parts. Later parts, and reading the same video again within 24 hours, cost nothing.
- Free tools still need a balance of at least 1 credit.
- New accounts get 100 free credits, no card needed. See plans.
If something doesn't work
›/mcp shows youtube as needing authentication
Pick it in /mcp and authenticate. The browser step has to finish within 30 minutes.
›401 with an API key
Check the header reads exactly Authorization: Bearer tk_live_… and that the key isn't revoked in the dashboard.
›Remove or re-add it
claude mcp remove youtube, then add it again with the command above.
›It says I've run out of credits
The app shows our message with a link to billing. Free tools such as get_latest_videos need at least 1 credit too. Calls that fail are never charged.
›"Transcript unavailable" for a video
The video has no captions, is private, or was removed. Nothing is charged. Try another language with “use the Spanish captions”, for example, if the video has captions in a different language.
Disconnect
Revoke the key in Dashboard → API Keys. If you signed in instead, use Dashboard → Connected apps.
Claude Code changes its menus from time to time. We checked these steps on 18 October 2026 against Claude Code MCP docs. If something looks different, the app has probably moved it; tell us through the contact form.
Product names and logos belong to their owners and are shown only to say which apps this works with. YouTubeTranscriptAPI isn't affiliated with or endorsed by them.
Ready to connect Claude Code?
Create a free account first if you like: it comes with 100 credits, enough for about 100 transcripts.