Model Context Protocol (MCP)

A hosted MCP server with seven read-only YouTube tools. It uses the same account, credits and prices as the REST API.

Endpoint

text
https://youtubetranscriptapi.com/mcp
  • Streamable HTTP, stateless: every request stands alone, with no session to keep.
  • Protocol revision 2026-07-28, plus clients that open with the older initialize handshake (2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05).
  • Responses are JSON. Nothing is pushed from the server, so there is no GET stream to open.

Setup guides

Authentication

OAuth 2.1 (Claude, ChatGPT and other clients that sign in)

  • An unauthenticated request gets 401 with WWW-Authenticate: Bearer resource_metadata="https://youtubetranscriptapi.com/.well-known/oauth-protected-resource/mcp".
  • Authorization server metadata: https://youtubetranscriptapi.com/.well-known/oauth-authorization-server. Issuer https://youtubetranscriptapi.com.
  • Clients register with a Client ID Metadata Document (preferred) or Dynamic Client Registration at /oauth/register. PKCE with S256 is required.
  • Scopes: youtube:read, plus offline_access for refresh tokens. Tokens are bound to the /mcp resource.
  • Access tokens last an hour; refresh tokens rotate on use. A connection stays signed in while the app uses it, and one left unused for 30 days has to sign in again.
  • Users approve each app on a consent screen and can disconnect it in Dashboard → Connect apps; the app stops working on its next call.

API key (IDEs, CLIs, automation)

Send a dashboard API key as a Bearer token. It's the same key the REST API takes:

http
POST /mcp HTTP/1.1
Host: youtubetranscriptapi.com
Authorization: Bearer tk_live_...

Tools

All seven tools are read-only and carry readOnlyHint: true, destructiveHint: false, idempotentHint: true and openWorldHint: true. Costs are charged only when a call succeeds; free tools need a balance of at least 1 credit.

get_transcript · 1 credit

Get the spoken text of one YouTube video from its captions. Use it to summarize, quote, take notes on or answer questions about a specific video. Accepts a video URL, a youtu.be link or the 11-character ID. Costs 1 credit when it succeeds; failed calls are free. Returns plain text; set timestamps to true for [m:ss] markers. Long videos come back in parts: call again with the returned next_offset to read the rest. Later parts, and repeat reads of the same video within 24 hours, cost nothing. A video not read before usually takes 10–30 seconds; videos already read return in about a second.

ParameterTypeDescription
video_urlreqstringYouTube video URL, youtu.be link or 11-character video ID
languagestringCaption language code such as en, es or de. Default en.
timestampsbooleanStart each line with an [m:ss] marker. Default false.
offsetinteger (0–9,007,199,254,740,991)Character offset to read from. Pass next_offset from the previous part. Default 0.
max_charsinteger (5,000–140,000)Largest part to return, in characters. Default 60,000.

Same data as REST GET /api/v2/youtube/transcript.

search_youtube · 4 credits

Search all of YouTube for videos, or for channels when type is "channel". Use it when there is no specific video or channel yet. Costs 4 credits per call. If you already know the channel, search_channel costs 1.

ParameterTypeDescription
queryreqstringWhat to search for
typevideo | channelvideo (default) or channel
limitinteger (1–50)Results to return, 1–50. Default 20.

Same data as REST GET /api/v2/youtube/search.

search_channel · 1 credit

Search one channel's videos for a word or topic, across the channel's full history. Accepts an @handle, channel URL or UC… ID. Costs 1 credit.

ParameterTypeDescription
channelreqstringChannel @handle, channel URL or UC… channel ID, e.g. @mkbhd
queryreqstringWord or topic to find in the channel's videos
limitinteger (1–50)Results to return, 1–50. Default 30.

Same data as REST GET /api/v2/youtube/channel/search.

list_channel_videos · 20 credits

List a channel's most recent uploads, up to 100, with titles, dates and view counts. Costs 20 credits. Only the first page is available. For the newest 15 uploads, get_latest_videos is free.

ParameterTypeDescription
channelreqstringChannel @handle, channel URL or UC… channel ID, e.g. @mkbhd

Same data as REST GET /api/v2/youtube/channel/videos.

get_latest_videos · Free

Get a channel's 15 newest uploads. Free, though the account needs at least 1 credit. Suited to "what's new" questions and daily digests.

ParameterTypeDescription
channelreqstringChannel @handle, channel URL or UC… channel ID, e.g. @mkbhd

Same data as REST GET /api/v2/youtube/channel/latest.

resolve_channel · Free

Turn an @handle, channel URL or name into the channel's UC… ID and title. Free; needs at least 1 credit. The other channel tools already accept handles.

ParameterTypeDescription
channelreqstringChannel @handle, URL, UC… ID or name

Same data as REST GET /api/v2/youtube/channel/resolve.

list_playlist_videos · 20 credits

List the videos in a public playlist, up to 100. Costs 20 credits. Only the first page is available.

ParameterTypeDescription
playlistreqstringPlaylist URL or ID (PL…, UU…, OL…)

Same data as REST GET /api/v2/youtube/playlist/videos.

Results

List-style tools return the same JSON body as the matching REST endpoint in one text block, followed by a second block with the balance left: Credits left: 96. get_transcript returns readable text with a short header:

text
Title: …
Channel: …
Video: https://www.youtube.com/watch?v=…
Language: en
Characters 0–60,000 of 152,311. More follows: call get_transcript again with offset=60000 (next_offset).
Credits charged: 1.
Credits left: 99.

…transcript text…
  • The balance comes from the REST API's X-Credits-Remaining header. At 20 credits or fewer a line with the billing link follows it.
  • Parts are 60,000 characters by default; max_chars takes 5,000–140,000. Later parts, and reading the same video again within 24 hours, cost nothing.
  • timestamps: true puts each caption line on its own line with an [m:ss] marker.

Errors

A failed call is a tool result with isError: true and a JSON body { "error", "status", "detail", "retry_after"? }, using the same codes as the REST API. Failed calls are never charged.

errorstatusMeaning
validation_error422A parameter is missing or invalid, e.g. a link that isn't a YouTube video.
transcript_not_found404The video has no captions, is private, or was removed.
channel_not_found / playlist_not_found404No public channel or playlist matches the input.
insufficient_credits402Not enough credits. The text opens with a plain sentence ("Out of credits: this call needs 20, you have 5. Choose a plan: …"), then the JSON, whose detail carries message, required, available, action_label, action_url and the plans.
rate_limited429Over 300 requests in a minute for this key or connection. retry_after says how long to wait.
upstream_timeout / upstream_error408 / 503A temporary problem fetching from YouTube. Retry in a few seconds.
invalid_auth401The key or connection was revoked while the app was using it.
account_frozen403API access is paused while a payment dispute is reviewed.

At the HTTP level the server answers only 401 invalid_token (missing, expired or revoked credentials; with OAuth the header points the client back to sign-in) and 503 temporarily_unavailable.

Limits

  • 300 requests a minute per API key or connected app, shared with the REST API for that key.
  • list_channel_videos and list_playlist_videos return the first page only, up to 100 videos.
  • How long a client waits for a tool call is up to the client; Claude waits up to 240 seconds.

Machine-readable

  • Server card: https://youtubetranscriptapi.com/.well-known/mcp/server-card.json
  • llms.txt