# YouTube Transcript MCP server (youtube-transcript.ai)

You are helping a user connect this MCP server to their AI client. If you are a coding agent that can change your own configuration (Claude Code, Cursor, Codex and similar), add the server yourself using the matching section below, then tell the user if a restart or reload is needed. If the user has not given you an API key, ask for it. Never invent one.

## Server

- URL: `https://youtube-transcript.ai/mcp`
- Transport: Streamable HTTP, stateless. It answers POST requests and does not open an event stream on GET.
- Authentication is an API key, required for tool calls. There is no OAuth. Send the key in one of two ways:
  - header `Authorization: Bearer {API_KEY}`
  - `?key={API_KEY}` appended to the URL, for clients that only accept a URL
- The user creates a key at https://youtube-transcript.ai/get-api-key with a Google sign-in. Free: 10 requests a day. Pro: 1,000 a day for $120 a year.

## Tool

`get_youtube_transcript` returns the transcript of a YouTube video as plain text, with the title and metadata first.

- `video` (string, required): a YouTube URL or an 11-character video ID.
- `lang` (string, optional): a caption language code such as `en`, `es` or `zh-CN`.
- `offset` (integer, optional): where to continue a long transcript. Transcripts over 120,000 characters come back in parts, and each part ends with a note giving the offset for the next call.

## Claude Code

Run this once. `--scope user` makes the server available in every project:

    claude mcp add --transport http --scope user youtube-transcript https://youtube-transcript.ai/mcp --header "Authorization: Bearer {API_KEY}"

## Cursor

Add this to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in one project. Keep any servers already listed there:

    {
      "mcpServers": {
        "youtube-transcript": {
          "url": "https://youtube-transcript.ai/mcp",
          "headers": { "Authorization": "Bearer {API_KEY}" }
        }
      }
    }

## Codex

Add this to `~/.codex/config.toml`:

    [mcp_servers.youtube-transcript]
    url = "https://youtube-transcript.ai/mcp"
    http_headers = { "Authorization" = "Bearer {API_KEY}" }

## Claude (web and desktop) and ChatGPT

The user adds these in the app, you cannot do it for them. Walk them through it:

- Claude: Settings, then Connectors, then Add custom connector. Name `youtube-transcript.ai`, URL `https://youtube-transcript.ai/mcp?key={API_KEY}`.
- ChatGPT: in the custom connector setup choose Add MCP server. Name `youtube-transcript.ai`, URL `https://youtube-transcript.ai/mcp?key={API_KEY}`, transport Streamable HTTP.

## Any other MCP client

Give it the URL `https://youtube-transcript.ai/mcp?key={API_KEY}` as a remote Streamable HTTP server.

## Check that it works

Call `get_youtube_transcript` with `video` set to `dQw4w9WgXcQ`. The result should start with `# Transcript:`. If it says the key is missing, not recognised, or out of quota for today, pass that message on to the user as it is.

Calling the HTTP API from code instead of MCP: https://youtube-transcript.ai/api.md
