Claude Code · about 2 minutes · Sign in or API key

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.

Server URL
https://youtubetranscriptapi.com/mcp
Before you start

What 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.
Setup

Connect Claude Code

  1. Add the server

    Terminal
    claude mcp add --transport http youtube https://youtubetranscriptapi.com/mcp

    This saves it for the current project only (--scope local, the default). Use --scope user for all your projects, or --scope project to share it through .mcp.json in git.

  2. 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 youtube does the same from the shell.)

  3. Check it

    claude mcp list should 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:

Terminal
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.

Test it

Try this prompt

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.

Pricing

What each call costs

ToolWhat it doesCost
get_transcriptRead what's said in any public video1 credit
search_youtubeSearch YouTube for videos or channels4 credits
search_channelSearch one channel's videos for a topic1 credit
list_channel_videosList a channel's latest 100 uploads20 credits
get_latest_videosSee a channel's 15 newest videosFree
resolve_channelTurn an @handle into a channel IDFree
list_playlist_videosList the videos in a playlist20 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.
Help

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.

YouTube MCP server for Claude Code: one command