# Transcribe and translate YouTube videos from Claude Code

> yt2txt is an MCP server. Add it once, then paste a YouTube link in Claude Code, Claude Desktop, Cursor, VS Code or Codex and ask for the transcript, a summary or a translation. It works on videos with no subtitles, because it transcribes the audio itself, in over 90 languages.

Web page: https://yt2txt.com/youtube-transcript-mcp.html

## How it works

1. Get an API key. API access comes with the Pro and Max plans; create a key from the dashboard at https://yt2txt.com/static/dashboard.html
2. Add the server to your MCP client (below).
3. Paste a YouTube link and say what you want. The assistant starts the transcription, waits for it, and reads the result.

The server is `https://yt2txt.com/mcp`. It speaks streamable HTTP and reads the key from the `X-API-Key` header; `Authorization: Bearer <key>` is accepted too. Replace `yttr_your_key` with your own key in each example.

## Claude Code

    claude mcp add --transport http --scope user yt2txt https://yt2txt.com/mcp \
      --header "X-API-Key: yttr_your_key"

`--scope user` makes yt2txt available in every project; leave it out to add it to the current project only. Run `claude mcp list` to check it is connected.

## Claude Desktop and claude.ai

Add yt2txt as a custom connector: open Connectors, choose Add custom connector, enter `https://yt2txt.com/mcp` as the URL, and add a request header named `X-API-Key` with your key as its value.

## Cursor

In `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` for one:

```json
{
  "mcpServers": {
    "yt2txt": {
      "url": "https://yt2txt.com/mcp",
      "headers": {
        "X-API-Key": "yttr_your_key"
      }
    }
  }
}
```

## VS Code

In `.vscode/mcp.json` in your workspace. Keep that file out of version control while it holds your key.

```json
{
  "servers": {
    "yt2txt": {
      "type": "http",
      "url": "https://yt2txt.com/mcp",
      "headers": {
        "X-API-Key": "yttr_your_key"
      }
    }
  }
}
```

## Codex

Codex sends the key as a bearer token:

    export YT2TXT_API_KEY=yttr_your_key
    codex mcp add yt2txt --url https://yt2txt.com/mcp \
      --bearer-token-env-var YT2TXT_API_KEY

## Things to ask

- "Transcribe https://youtu.be/… and give me the main points."
- "Translate this talk into Spanish: https://youtu.be/…"
- "Make chapters with timestamps for https://youtu.be/…"
- "Watch this tutorial and set up the same project here: https://youtu.be/…"

## Tools

| Tool | What it does |
| --- | --- |
| `transcribe` | Start transcribing a YouTube video and return its job id |
| `get_job` | Report a job's status: pending, processing, completed, failed or cancelled |
| `get_transcript` | Read a completed job's transcript, at most 50,000 characters per call |
| `run_action` | Run an AI action on a completed transcript: summarize, translate, chapters, keywords or quiz |
| `get_balance` | Report the plan and the minutes and credits left on the key's account |

The assistant calls `transcribe`, polls `get_job` until the status is `completed`, then reads the text with `get_transcript`, following `next_offset` until it is null. For a translation it calls `run_action` with `translate` and a `target_language`.

## Cost

A tool call costs exactly what the same request costs over the REST API and comes out of the same minutes. API keys come with the Pro and Max plans: https://yt2txt.com/pricing.html

## More

- Developer documentation: https://yt2txt.com/developers.html#mcp
- The whole API reference in one file: https://yt2txt.com/llms-full.txt
