Skip to main content
Glama
pauliusdotpro

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: rippr

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
apiNoWhich API created the job. Default: audio
jobIdYesThe jobId returned by youtube_to_audio or youtube_transcript
maxCharsNoTranscript jobs only: truncate the returned transcript. Default: 100000
waitSecondsNoLong-poll up to this many seconds for completion. Default: 25

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only, idempotent, non-destructive semantics, but the description adds real behavioral detail beyond them: long-polling up to waitSeconds (max 25), api-dependent return shapes (a fresh short-lived download link vs. transcript content), and the failure path (API error code and message). That is substantially more than the structured fields convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the identifying purpose and condition, then the polling contract, then the return/error semantics. Every sentence carries distinct information with no repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by describing both success return values per api and the failure return values. Combined with 100% schema coverage, an agent has everything needed to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters including the waitSeconds maximum and the api enum. The description restates the waitSeconds cap and alludes to the api switch but adds no syntax or format detail beyond the schema — baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource ('Check the status of a job') plus the exact provenance of the resource ('returned by youtube_to_audio or youtube_transcript'), which cleanly separates it from both siblings. An agent can tell this is a polling/status tool, not a job-creation tool, without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear trigger condition: use it when a job 'did not finish in time' from one of the named sibling tools. It does not state any exclusions or failure fallbacks (e.g. what to do if the job is still pending after WaitSeconds), so it stops short of full when/when-not routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesYouTube video/Shorts URL (e.g. https://www.youtube.com/watch?v=jNQXAC9IVRw) or an 11-character video ID
formatNoOutput audio format. Default: mp3
endTimeNoClip end in seconds (optional, must be greater than startTime)
qualityNoAudio quality: kbps (128, 192, 256, 320), 'standard', or 'best'. Ignored for lossless wav/flac. Default: standard
startTimeNoClip start in seconds (optional)
maxWaitSecondsNoHow long to wait for completion before returning a jobId. Default: 120

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=true, openWorldHint=true) by disclosing the ~2 minute wait ceiling, the jobId fallback path, the ~30 minute link expiry, and the unsupported source classes. These are exactly the operational traits an agent needs to sequence a download.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then formats, clipping, return values, timing behavior, and exclusions in a logical order. Slightly dense with one sentence repeating the schema's enum lists, but nearly every clause carries actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so (link, fileName, fileSize, durationSeconds), plus timeout, expiry and source-limit behavior. Nothing an agent needs to invoke and then download the result is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with documented enums, so the schema already carries parameter meaning; the description largely restates the format/bitrate enumerations and the startTime/endTime clipping that are already in the schema. It adds little syntax or constraint detail beyond what is structured, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+output (convert a public YouTube video/Shorts URL to an audio file) and immediately distinguishes itself from youtube_transcript and get_job by naming the download-link return. An agent can identify the tool's job without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear conditions for use and explicit exclusions: private, removed, age-restricted and live videos are not supported, and sources are capped at 3 hours. It also routes the agent to get_job when the wait times out. It does not, however, contrast this tool against the sibling youtube_transcript (audio vs. text), which is the main missing routing cue.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesYouTube video/Shorts URL or an 11-character video ID
formatNoOutput format. Default: text
sourceNoCaption source: preferred (default), manual (human captions only) or automatic (auto-generated only)
languageNoCaption language tag such as en, en-US, de, pt-BR. Omit for automatic selection.
maxCharsNoTruncate the returned transcript to this many characters. Default: 100000
chunkSizeNoTarget characters per chunk for the 'llm' format (500-12000, default 4000)
maxWaitSecondsNoHow long to wait for completion before returning a jobId. Default: 120

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond the safe-read annotations: the ~2 minute wait with jobId continuation, the TRANSCRIPT_NOT_AVAILABLE failure with no speech-to-text fallback, and the manual-English → auto-English → first-track selection order. These are exactly the operational traits an agent needs and are not in the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then formats, language rules, timeout and error handling in a logical progression with no filler. Dense but every sentence carries information; slightly long without visual breaks keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with no output schema, the description covers return shapes (formats and their contents), async completion via jobId, failure mode, and defaults. Combined with annotations that cover safety semantics, nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains that 'llm' produces ordered timestamped chunks for RAG/summaries (the schema only names the enum), gives language tag examples, and clarifies chunkSize is only relevant to the 'llm' format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (get) plus resource (transcript), scoped to public YouTube videos/Shorts and existing captions (manual or auto-generated). Clearly distinct from youtube_to_audio (audio download) and tied to get_job via the async fallback, so an agent can route without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating context: default language-preference order, format selection for different downstream uses, and explicit routing to get_job when a jobId is returned. It also implies a when-not ('no speech-to-text fallback'), but does not explicitly say which sibling to use when captions are unavailable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updatesv0.1.0
    • First observedget_job
    • First observedyoutube_to_audio
    • First observedyoutube_transcript

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers