Skip to main content
Glama
YouTube Audio & Transcript MCP Server

YouTube Audio & Transcript MCP Server

YouTube Audio & Transcript MCP Server

An MCP server that lets AI agents (Claude Desktop, Claude Code, Cursor, and other MCP clients) convert YouTube videos to audio files and fetch YouTube transcripts.

It calls two RapidAPI APIs with your own RapidAPI key:

  • YouTube Audio Downloader & Converter: MP3, M4A, WAV, FLAC, AAC, OPUS, OGG and WebM, with clipping.

  • YouTube Transcript, Subtitle & Metadata API (youtube-transcript-subtitle-metadata-api.p.rapidapi.com): existing manual or automatic captions as text, JSON segments, LLM chunks, Markdown, SRT or VTT.

Tools

Tool

What it does

youtube_to_audio

Converts a YouTube URL to audio. Inputs: url, format (default mp3), quality (128/192/256/320/standard/best), startTime, endTime, maxWaitSeconds. Returns a short-lived download link, fileName, fileSize and durationSeconds. Waits up to about 2 minutes, then returns a jobId if the conversion is still running.

youtube_transcript

Gets the transcript from existing captions. Inputs: url, language (for example en), format (text by default, or json, llm, markdown, srt, vtt), source (preferred/manual/automatic), chunkSize, maxChars, maxWaitSeconds. Returns the transcript content.

get_job

Checks a job that did not finish in time. Inputs: jobId, api (audio or transcript), waitSeconds. Returns a fresh link or the transcript when the job is done.

Errors from the API are passed through with their code, for example Error TRANSCRIPT_NOT_AVAILABLE (HTTP 422): ... or Error RAPIDAPI_NOT_SUBSCRIBED (HTTP 403): ....

Related MCP server: YouTube for AI Agents

Get a RapidAPI key

  1. Open the YouTube Audio API on RapidAPI and subscribe to a plan.

  2. To use youtube_transcript, also subscribe to the YouTube Transcript, Subtitle & Metadata API with the same account.

  3. Copy your X-RapidAPI-Key from the endpoint playground. That value is your RAPIDAPI_KEY.

Install

The server runs with npx, so you do not need to install anything else. It needs Node.js 18 or later.

RAPIDAPI_KEY=your-key npx -y github:pauliusdotpro/youtube-media-mcp

Claude Desktop

Add this to claude_desktop_config.json (Settings, Developer, Edit Config):

{
  "mcpServers": {
    "youtube-media": {
      "command": "npx",
      "args": ["-y", "github:pauliusdotpro/youtube-media-mcp"],
      "env": {
        "RAPIDAPI_KEY": "your-rapidapi-key"
      }
    }
  }
}

Claude Code

claude mcp add youtube-media --env RAPIDAPI_KEY=your-rapidapi-key -- npx -y github:pauliusdotpro/youtube-media-mcp

Cursor

Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "youtube-media": {
      "command": "npx",
      "args": ["-y", "github:pauliusdotpro/youtube-media-mcp"],
      "env": {
        "RAPIDAPI_KEY": "your-rapidapi-key"
      }
    }
  }
}

Environment variables

Variable

Required

Default

RAPIDAPI_KEY

Yes

None

RAPIDAPI_AUDIO_HOST

No

youtube-audio-downloader-converter.p.rapidapi.com

RAPIDAPI_TRANSCRIPT_HOST

No

youtube-transcript-subtitle-metadata-api.p.rapidapi.com

Example prompts

  • "Convert https://www.youtube.com/watch?v=jNQXAC9IVRw to a 320 kbps MP3 and give me the link."

  • "Get the audio from 1:00 to 2:30 of this video as FLAC."

  • "Summarize this video from its English transcript."

  • "Download Spanish subtitles for this video as SRT."

Notes

  • Download links are short-lived (results expire after about 30 minutes). Download the file soon after you get the link.

  • Transcripts come from caption tracks that YouTube already has. If a video has no captions, the tool returns TRANSCRIPT_NOT_AVAILABLE. There is no speech-to-text fallback.

  • Private, removed, age-restricted and live videos are not supported. Sources can be up to three hours long.

  • Process only content that you own or have the right to use. This project is not affiliated with YouTube or Google.

Development

npm install
npm run build
RAPIDAPI_KEY=your-key node dist/index.js

You can test with the MCP Inspector: npx @modelcontextprotocol/inspector node dist/index.js.

License

MIT

Available Tools

3 tools
get_jobCheck a conversion or transcript jobA
Read-onlyIdempotent

Check the status of a job returned by youtube_to_audio or youtube_transcript when it did not finish in time. Long-polls up to waitSeconds (max 25). When the job is done: for api='audio' returns a fresh short-lived download link; for api='transcript' returns the transcript content. Failed jobs return the API error code and message.

Inputs: jobId (required), api, maxChars, waitSeconds.

youtube_to_audioYouTube to audio (MP3, M4A, WAV, FLAC...)A
Idempotent

Convert a public YouTube video or Shorts URL to an audio file and return a short-lived download link. Supports mp3 (default), m4a, wav, flac, aac, opus, ogg, webm; bitrate 128/192/256/320 kbps or standard/best; optional clip via startTime/endTime in seconds. Sources up to 3 hours. Returns link, fileName, fileSize and durationSeconds. Waits up to ~2 minutes; if the conversion is still running, returns a jobId to check later with get_job. The link expires (about 30 minutes), so download it promptly. Private, removed, age-restricted and live videos are not supported.

Inputs: url (required), format, endTime, quality, +2 more.

youtube_transcriptYouTube transcript / captionsA
Read-onlyIdempotent

Get the transcript of a public YouTube video or Shorts from its existing captions (manual or auto-generated). Formats: 'text' (plain transcript, default), 'json' (metadata plus timestamped segments), 'llm' (ordered timestamped chunks for RAG/summaries), 'markdown' (readable with timestamps), 'srt' or 'vtt' (subtitle files). Optionally pick a language tag (e.g. en, es, pt-BR) and caption source. When language is omitted the API prefers manual English, then automatic English, then the first available track. Waits up to ~2 minutes; if still running, returns a jobId for get_job. Fails with TRANSCRIPT_NOT_AVAILABLE when the video has no matching captions (no speech-to-text fallback).

Inputs: url (required), format, source, language, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a clearly distinct action: youtube_to_audio produces audio files, youtube_transcript retrieves captions, and get_job polls async jobs from either. There is no realistic overlap that would cause misselection.

    Naming Consistency3/5

    The three names use three different patterns: youtube_to_audio (noun_to_noun with verb), youtube_transcript (noun_noun, no verb), and get_job (verb_noun). All are snake_case and readable, but the convention is mixed rather than predictable.

    Tool Count4/5

    Three tools is lean but each earns its place: two capabilities plus the shared async-job poller. It is slightly minimal (no batch/playlist helper), but well-scoped for the server's narrow purpose.

    Completeness4/5

    The core surface (audio extraction, transcript retrieval, and job-status handling for both async flows) is fully covered with no dead ends. Minor gaps exist: no playlist/batch support and no lightweight video metadata lookup.

    Related MCP Connectors

    Related MCP Servers