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
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
initializehandshake (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
- Claude — sign in
- ChatGPT — sign in
- Claude Code — sign in or api key
- Cursor — sign in or api key
- VS Code — sign in or api key
- n8n — api key
- Windsurf — api key or sign in
- Codex — sign in or api key
- Gemini CLI — sign in or api key
- OpenClaw — api key or sign in
- Other apps — Zed, Cline, Junie, LM Studio, Warp, Goose, Raycast, Le Chat, Perplexity, Copilot Studio, Make, Zapier
Authentication
OAuth 2.1 (Claude, ChatGPT and other clients that sign in)
- An unauthenticated request gets
401withWWW-Authenticate: Bearer resource_metadata="https://youtubetranscriptapi.com/.well-known/oauth-protected-resource/mcp". - Authorization server metadata:
https://youtubetranscriptapi.com/.well-known/oauth-authorization-server. Issuerhttps://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, plusoffline_accessfor refresh tokens. Tokens are bound to the/mcpresource. - 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:
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.
| Parameter | Type | Description |
|---|---|---|
| video_urlreq | string | YouTube video URL, youtu.be link or 11-character video ID |
| language | string | Caption language code such as en, es or de. Default en. |
| timestamps | boolean | Start each line with an [m:ss] marker. Default false. |
| offset | integer (0–9,007,199,254,740,991) | Character offset to read from. Pass next_offset from the previous part. Default 0. |
| max_chars | integer (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.
| Parameter | Type | Description |
|---|---|---|
| queryreq | string | What to search for |
| type | video | channel | video (default) or channel |
| limit | integer (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.
| Parameter | Type | Description |
|---|---|---|
| channelreq | string | Channel @handle, channel URL or UC… channel ID, e.g. @mkbhd |
| queryreq | string | Word or topic to find in the channel's videos |
| limit | integer (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.
| Parameter | Type | Description |
|---|---|---|
| channelreq | string | Channel @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.
| Parameter | Type | Description |
|---|---|---|
| channelreq | string | Channel @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.
| Parameter | Type | Description |
|---|---|---|
| channelreq | string | Channel @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.
| Parameter | Type | Description |
|---|---|---|
| playlistreq | string | Playlist 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:
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-Remainingheader. At 20 credits or fewer a line with the billing link follows it. - Parts are 60,000 characters by default;
max_charstakes 5,000–140,000. Later parts, and reading the same video again within 24 hours, cost nothing. timestamps: trueputs 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.
| error | status | Meaning |
|---|---|---|
| validation_error | 422 | A parameter is missing or invalid, e.g. a link that isn't a YouTube video. |
| transcript_not_found | 404 | The video has no captions, is private, or was removed. |
| channel_not_found / playlist_not_found | 404 | No public channel or playlist matches the input. |
| insufficient_credits | 402 | Not 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_limited | 429 | Over 300 requests in a minute for this key or connection. retry_after says how long to wait. |
| upstream_timeout / upstream_error | 408 / 503 | A temporary problem fetching from YouTube. Retry in a few seconds. |
| invalid_auth | 401 | The key or connection was revoked while the app was using it. |
| account_frozen | 403 | API 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_videosandlist_playlist_videosreturn 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