Skip to main content
Glama
brian-huanggg

youtube-mcp

Youtube MCP

Fast, minimal, and reliable YouTube MCP for AI agents.

Banner

Install

Claude Code

claude mcp add youtube -- uvx youtube-watch-mcp

Before publish (local dev): point uvx at the checkout instead: claude mcp add youtube -- uvx --from /path/to/youtube-mcp youtube-watch-mcp

Claude Desktop / Codex / other MCP clients

Add to the client's MCP config:

{
  "mcpServers": {
    "youtube": {
      "command": "uvx",
      "args": ["youtube-watch-mcp"]
    }
  }
}

CLI only

uvx --from youtube-watch-mcp youtube-watch-mcp-cli info "https://youtu.be/VIDEO_ID"

That's it. uvx pulls youtube-watch-mcp, yt-dlp, and dependencies into an isolated environment automatically. Nothing to install globally.

Optional: ffmpeg on PATH is required only for --asr (speech-to-text on caption-less videos). Core transcript extraction needs nothing.

Related MCP server: youtube-mcp

Optional API key

A YouTube Data API key is not needed to read videos. Add one only to enable cross-YouTube search:

claude mcp add youtube -e YOUTUBE_API_KEY=your_key -- uvx youtube-watch-mcp

Transcript extraction never uses the key (YouTube only allows caption download for video owners).

Tools

Tool

Returns

Purpose

get_info(url)

title, duration, chapters, has_captions

Cheap probe before fetching.

get_transcript(url, asr=False)

file path + word count + preview

Clean transcript to disk. Returns path, not full text.

search_transcript(url, query)

timestamped snippets

Grep a long video without loading it all.

get_segment(url, start, end)

text slice

Read one time range.

Design principle: pull, don't dump. Transcripts write to a local cache file; tools return a path and a short preview. The agent reads or searches on demand — long videos never flood the context.

/get_info $url
/get_transcript $url
/search_transcript $url
/get_segment $url

Architecture

Adapters (thin):   cli.py   mcp_server.py   skill
                        │  call
Core (all logic):  fetch → clean → chunk → cache
                        │  uses
Backends:          youtube-transcript-api · yt-dlp · faster-whisper

Fetch fallback chain:

  1. youtube-transcript-api — fastest, no download

  2. yt-dlp auto-captions

  3. yt-dlp manual captions

  4. --asr: audio → local faster-whisper

On yt-dlp failure the engine self-updates yt-dlp and retries once — most breakage is a stale yt-dlp.

Caching: results are keyed by video ID under ~/.cache/youtube-mcp/<id>/. Repeat calls are instant.

Cleaning: auto-captions are de-duplicated (rolling-caption overlap removed), stripped of timestamps and [Music] noise, and whitespace-collapsed before the agent ever sees them.

Requirements

  • Python 3.11+ (managed automatically by uvx)

  • ffmpeg — optional, only for --asr

Docs

  • FAQ — keyless? no-caption videos? --from gotcha? long-video handling?

  • Architecture — core/adapter split, fetch chain, the cleaning moat, cache.

License

MIT

Available Tools

4 tools
get_infoA

Cheap probe of a YouTube video: title, duration, chapters, caption availability.

Call this first to decide whether to fetch a transcript and how to read it.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It transparently indicates this is a 'cheap probe' (low cost) and lists the exact data fields available. While it doesn't explicitly state read-only behavior or error handling, the 'probe' framing and metadata-only scope imply a safe, non-destructive operation.

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?

The description is two sentences, front-loading the core purpose and specific return fields, followed by a concise usage directive. Every word serves a purpose, with no filler or repeated schema 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?

Despite having no output schema or annotations, the description covers the tool's purpose, typical usage sequence, and the kind of data returned. It also references sibling tools implicitly by mentioning 'fetch a transcript', making the tool's role in the overall workflow clear. This is sufficient for a simple metadata probe.

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?

The schema contains a single 'url' parameter with no description, and schema coverage is 0%. The description compensates by clarifying that the tool probes 'a YouTube video', making it clear that the url refers to a YouTube video URL. This adds meaningful semantic context beyond the bare schema.

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?

The description clearly states the tool's function: 'Cheap probe of a YouTube video' and enumerates specific data returned (title, duration, chapters, caption availability). This distinguishes it from sibling tools like get_transcript, which fetch transcripts rather than metadata.

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

Usage Guidelines5/5

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

The description explicitly directs usage: 'Call this first to decide whether to fetch a transcript and how to read it.' This provides clear context for when to use this tool versus alternatives, effectively positioning it as the preliminary step before transcript-related tools.

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

get_segmentA

Return transcript text for the time range [start, end) in seconds.

ParametersJSON Schema
NameRequiredDescriptionDefault
endYes
urlYes
langNo
startYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full transparency burden. It discloses the half-open interval and time unit, which is useful. However, it does not describe the output format, error behavior, or explicitly confirm read-only nature, leaving some ambiguity.

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?

The description is a single, concise sentence with no wasted words. It front-loads the core action and directly states the key constraints.

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

Completeness3/5

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

The description is adequate for the core function of retrieving a time-bounded transcript segment, but it lacks detail on the optional lang parameter and the expected return structure. With no output schema and a low-parameter-information schema, additional context would help, though the tool is relatively simple.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It explains start and end as time boundaries, but does not explain the url or lang parameters. The agent must infer url identifies the transcript and lang selects language, which is not explicitly stated.

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?

The description clearly states the tool returns transcript text for a specific time range, using the precise half-open interval [start, end) in seconds. This distinguishes it from sibling tools like get_transcript (full transcript) and search_transcript (search within transcript).

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?

The description provides clear context on when to use the tool (to retrieve a segment of a transcript by time). However, it does not explicitly mention alternatives or when not to use it, so it falls just short of full guidance.

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

get_transcriptA

Fetch a cleaned transcript and write it to a local file.

Returns the file path plus a short preview and stats — NOT the full text. Read the file, or use search_transcript / get_segment, to pull detail on demand.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
langNo

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description discloses important behavioral traits: it writes to a local file (side effect) and returns only a file path, preview, and stats, not the full text. This is valuable transparency. It could mention error handling or cleanliness, but the key side effect and return shape are covered.

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?

The description is three sentences long, front-loaded with the primary action, and every sentence provides distinct value: action, return type, and alternative tools. There is no redundancy or wasted wording.

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

Completeness4/5

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

Given the tool's simplicity (2 params, no annotations, no output schema), the description covers the most essential aspects: what it does, what it returns, and when to use alternatives. It lacks details on the 'lang' parameter and file location, but overall it is sufficiently complete for an agent to use effectively.

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

Parameters2/5

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

Schema description coverage is 0%, so the description needed to explain parameters, but it doesn't. Neither 'url' nor 'lang' is described in the text; 'url' is implied but not explicitly stated, and 'lang' is completely unexplained. The description fails to compensate for the schema's lack of parameter documentation.

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?

The description states a specific action ('Fetch a cleaned transcript') and resource ('write it to a local file'), clearly distinguishing this tool from siblings by noting that search_transcript / get_segment are for pulling detail on demand. The purpose is immediately understandable.

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?

The description provides guidance on when to use alternatives ('use search_transcript / get_segment, to pull detail on demand') and implicit context for this tool (e.g., when you need a quick preview/stats). It does not explicitly state 'use this when...' but the context is clear enough.

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

search_transcriptA

Find cues matching a query. Returns timestamped snippets only.

Use for long videos: locate the relevant moments without loading everything.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
langNo
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that it returns only timestamped snippets ('Returns timestamped snippets only'), which is useful. However, it does not mention permissions, read-only nature, pagination, or error behavior. The description adds some but not extensive behavioral context.

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?

The description is two short sentences, front-loaded with the main action. The first sentence states the purpose, and the second gives context. No waste; every word earns its place.

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

Completeness3/5

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

Given the tool's simplicity and the presence of an output schema, the description is adequate for basic use. However, it does not explain important parameters like 'url' and 'lang', and it assumes the reader knows what 'cues' are. The completeness is minimal but not severely lacking.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It explicitly references 'query' but does not explain the 'url' or 'lang' parameters. It provides no additional meaning beyond the schema, leaving two of three parameters undocumented in both schema and description.

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?

The description clearly states the tool 'finds cues matching a query' and returns 'timestamped snippets only', identifying both the action and the resource. It differentiates from siblings like get_transcript and get_segment by focusing on search and targeted retrieval.

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?

It provides explicit guidance: 'Use for long videos: locate the relevant moments without loading everything.' This implies when to use the tool and contrasts with loading a full transcript, though it does not explicitly name alternatives. The context is clear enough for an agent to select this tool appropriately.

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. 4 tool updatesv0.1.0
    • First observedget_info
    • First observedget_segment
    • First observedget_transcript
    • First observedsearch_transcript

TDQS

A4.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct role: get_info probes metadata, get_transcript fetches and saves the transcript, search_transcript finds matching cues, and get_segment extracts a specific time range. No two tools overlap in purpose.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with lowercase and underscores: get_info, get_transcript, search_transcript, get_segment. The style is uniform and predictable.

Tool Count5/5

Four tools is an appropriate size for a focused transcript retrieval and search server. Each tool serves a distinct step in the workflow without unnecessary redundancy.

Completeness5/5

The tool set covers the full lifecycle: probe video info, fetch transcript, search within it, and extract specific segments. There are no obvious gaps for the stated purpose of retrieving and navigating video transcripts.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers