Skip to main content
Glama

youtube-transcript-mcp

MCP server that lets coding agents read, search and chapter-summarize YouTube transcripts. No API key needed.

License: MIT CI Python 3.11

get_video_metadata call and result

Quick start

Requires Python 3.11+ and uv. Tested 2026-09-11 from a fresh clone on Windows 11 (POSIX same, minus py):

git clone https://github.com/luigimasango-dev/youtube-transcript-mcp.git
cd youtube-transcript-mcp
uv sync
uv run server.py

It sits waiting for MCP stdio input, so it will appear to do nothing until a client connects. That is normal. Ctrl+C to exit.

Register it with an MCP client (Claude CLI example):

claude mcp add youtube-transcript -- uv --directory C:\Dev\youtube-transcript-mcp run server.py

Or in JSON config:

{
  "mcpServers": {
    "youtube-transcript": {
      "command": "uv",
      "args": ["--directory", "C:\\Dev\\youtube-transcript-mcp", "run", "server.py"]
    }
  }
}

Related MCP server: YouTube for AI Agents

How it works

This started as a small tool for my own use. I kept hitting conversations that contained a YouTube link and needed to know what the video actually said, and re-pasting transcripts around was wasting time. It became a reusable server so that anything running on the Model Context Protocol could just ask.

Captions come through YouTube's public endpoints; metadata comes through YouTube's no-auth oEmbed endpoint. No API key, no Google account, nothing to sign up for.

Tools

Tool

Purpose

Key args

get_transcript

Full transcript as plain text. Accepts watch, youtu.be, embed, shorts, live URLs or a bare 11-char video ID

video_url_or_id, languages=["en"], include_timestamps=False

get_video_metadata

Title, channel name, channel URL and thumbnail via oEmbed (no upload date or description — those need a Data API key)

video_url_or_id

search_transcript

Segments matching a keyword/phrase, case-insensitive, each with a [mm:ss] timestamp

video_url_or_id, query, languages=["en"]

summarize_chapters

Splits the transcript into rough time-blocked chunks at natural pauses for section-by-section summarising. A heuristic, not YouTube's real chapter data

video_url_or_id, gap_seconds=4.0, min_chunk_seconds=45.0, languages=["en"]

All tools return a plain string, including errors (for example "Error: captions are disabled for this video"). No exceptions surface to the calling agent, and no stack traces leak out.

Limitations

  • Only videos with captions (auto-generated or manual) work. Private videos, caption-less videos and live streams without captions return a clear error instead of a guess.

  • No upload dates or full descriptions without a YouTube Data API key, by design.

  • No caching. Two calls against the same video re-fetch both times. Fine for the tool's actual use; add caching if you ever need it at volume.

  • The language list matters. languages=["en"] gets the English track when one exists. If a channel uploads in another language only, pass that code.

Development

uv sync
uv run --with pytest python -m pytest tests/ -v

The suite launches the real server over stdio, calls tools/list, and asserts the four tool names are present. Pin mcp>=1.28.1 but stay below 2.0 — mcp 2.x renamed mcp.server.fastmcp and the import breaks at server start.

License

MIT. See LICENSE.

Available Tools

4 tools
get_transcriptA

Fetch the full transcript of a YouTube video as plain text.

Args:
    video_url_or_id: Full YouTube URL (watch/youtu.be/embed/shorts) or bare 11-char video ID.
    languages: Preferred language codes in priority order, e.g. ["en", "en-GB"]. Defaults to ["en"].
    include_timestamps: If true, prefix each line with a [mm:ss] timestamp.
ParametersJSON Schema
NameRequiredDescriptionDefault
languagesNo
video_url_or_idYes
include_timestampsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavior and does a good job: it explains accepted URL formats, the bare ID alternative, language priority ordering, the default language list, and timestamp formatting. It does not mention edge cases like missing captions or rate limits, but the disclosed behavior covers the core interaction well.

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 compact and well-structured: a one-line purpose, followed by a concise Args block. Every sentence earns its place, and parameter docs are front-loaded with the needed specifics.

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?

For a three-parameter tool with an output schema, the description provides enough to invoke the tool correctly: required argument, optional language behavior, and timestamp control. It could be strengthened with guidance about when to use sibling tools or what happens when no transcript is available, but it is largely complete.

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

Parameters5/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, and it does thoroughly. Each parameter is explained with concrete examples, accepted formats, defaults, and behavioral effects, adding substantial meaning beyond the bare schema properties.

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 first sentence clearly states the action ('Fetch the full transcript'), the resource ('YouTube video'), and the output form ('as plain text'). The word 'full' differentiates it from sibling tools like search_transcript, which implies partial or query-based retrieval.

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

Usage Guidelines3/5

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

Usage is implied by the purpose: use this tool when you need the complete transcript of a YouTube video. However, there is no explicit guidance about when to prefer search_transcript, get_video_metadata, or summarize_chapters instead, nor exclusions such as 'use search_transcript for snippets'.

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

get_video_metadataA

Fetch title, channel name, and thumbnail for a YouTube video via the no-auth oEmbed endpoint.

Note: oEmbed does not expose upload date or full description (those require the official
Data API + an API key). This returns what's available without one.

Args:
    video_url_or_id: Full YouTube URL or bare 11-char video ID.
ParametersJSON Schema
NameRequiredDescriptionDefault
video_url_or_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations available, the description carries the behavioral disclosure burden. It credibly explains that the tool uses a no-auth endpoint, returns only a limited set of metadata, and does not expose upload date or full description. It could also mention error behavior or invalid inputs, but the core behavioral limitations are transparently disclosed.

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 compact and front-loaded with the main purpose. The limitation note is valuable context, and the Args section is minimal and directly useful. Every sentence contributes to correct invocation.

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 single-parameter metadata retrieval tool with a provided output schema, the description covers purpose, input format, expected returned fields, and key limitations. Nothing essential for selecting or invoking the tool is missing.

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

Parameters5/5

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

The input schema provides only a bare string type with 0% description coverage, but the description fully compensates by defining accepted values: 'Full YouTube URL or bare 11-char video ID.' This gives the agent exactly what it needs to construct a valid argument.

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 uses a specific verb ('Fetch') and names the exact resources returned ('title, channel name, and thumbnail'), clearly distinguishing this from the transcript-focused sibling tools. It also names the mechanism ('no-auth oEmbed endpoint'), leaving no ambiguity about what the tool does.

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 clearly implies when to use this tool (when basic YouTube metadata is needed without authentication) and explicitly notes when it is insufficient (when upload date or full description is required, which 'require the official Data API + an API key'). It does not explicitly reference sibling tools, but the field-level exclusions provide solid guidance.

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

search_transcriptA

Search a video's transcript for a keyword/phrase and return matching segments with timestamps.

Args:
    video_url_or_id: Full YouTube URL or bare 11-char video ID.
    query: Keyword or phrase to search for (case-insensitive substring match).
    languages: Preferred language codes in priority order. Defaults to ["en"].
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
languagesNo
video_url_or_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/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 of behavioral disclosure. It does disclose that query matching is case-insensitive and substring-based, and that languages default to ['en']. However, it does not mention what happens when no transcript is available, whether network fetching is involved, or how missing language captions are handled.

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 opens with a precise one-sentence purpose and then uses a clean bulleted Args list. There is no redundant or filler text; every sentence earns its place and the most important information is front-loaded.

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 moderate complexity, the description covers purpose, return type (matching segments with timestamps), and all parameters. An output schema exists to cover return-value details, but the description does not address edge cases or when to choose this tool over siblings, so it is not fully complete.

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

Parameters5/5

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

Schema description coverage is 0%, but the description fully compensates by explaining all three parameters: video_url_or_id accepts a full URL or bare 11-char ID, query is a case-insensitive substring match, and languages are priority-ordered with a default. This adds significant meaning 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 action: search a video's transcript for a keyword/phrase and return matching segments with timestamps. It differentiates itself from sibling tools like get_transcript and get_video_metadata by focusing on search-within-transcript rather than retrieval of the full transcript or metadata.

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

Usage Guidelines3/5

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

The purpose implies when to use it (when you need to find specific content in a transcript rather than reading the whole transcript), but it does not explicitly state when to prefer alternatives. No exclusions or alternative routing are provided, so the usage context is only implied.

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

summarize_chaptersA

Break a transcript into rough time-blocked chunks at natural pauses, for easier per-section summarizing.

This is a heuristic, not real chapter data: it splits wherever the gap between two consecutive
caption snippets exceeds `gap_seconds`, then merges any resulting chunk shorter than
`min_chunk_seconds` into its neighbor so chunks stay summarizable.

Args:
    video_url_or_id: Full YouTube URL or bare 11-char video ID.
    gap_seconds: Silence gap (seconds) between captions that triggers a new chunk boundary.
    min_chunk_seconds: Minimum chunk duration; shorter chunks get merged forward.
    languages: Preferred language codes in priority order. Defaults to ["en"].
ParametersJSON Schema
NameRequiredDescriptionDefault
languagesNo
gap_secondsNo
video_url_or_idYes
min_chunk_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so admirably. It explicitly discloses that this is 'a heuristic, not real chapter data' and explains the exact split/merge algorithm involving gap_seconds and min_chunk_seconds, so the agent knows what behavior to expect.

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 definition is front-loaded with a one-sentence summary, followed by a concise explanation of the heuristic behavior and a clean Args section. Every sentence carries necessary information, and there is no filler.

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?

The tool has an output schema, so return values need not be repeated. The description covers the algorithm, parameters, defaults, and limitations, which is everything an agent needs to call it correctly. The only minor nuance is languages defaulting to ['en'] in the prose while the schema shows null, but the behavior is still clear.

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

Parameters5/5

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

Schema description coverage is 0%, so the description alone documents semantics. It gives meaningful explanations for all four parameters, including units ('seconds'), behavior ('triggers a new chunk boundary', 'merged forward'), and accepted values for video_url_or_id. This fully compensates for the schema's lack of descriptions.

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 opens with a specific verb and resource: 'Break a transcript into rough time-blocked chunks at natural pauses', which clearly defines the tool's output and purpose. It further distinguishes itself from real chapter data and from the sibling retrieval/search tools by stating it is a heuristic chunking operation.

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 phrase 'for easier per-section summarizing' gives a clear context and intended use. It does not explicitly name alternatives (get_transcript, search_transcript) or state when not to use it, so it stops short of a 5, but it is not ambiguous.

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_transcript
    • First observedget_video_metadata
    • First observedsearch_transcript
    • First observedsummarize_chapters

TDQS

A4.4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct operation: fetching raw transcript text, fetching metadata, searching within a transcript, and chunking into chapters. Even though three tools operate on transcripts, their purposes are clearly separated and descriptions make the boundaries obvious.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern: get_transcript, get_video_metadata, search_transcript, summarize_chapters. The verbs clearly indicate the action, and the nouns indicate the resource or output.

Tool Count5/5

With 4 tools, the server is well-scoped for a focused YouTube transcript utility. Each tool covers a meaningful, non-redundant capability without unnecessary bloat.

Completeness4/5

The set covers the core transcript workflows: fetching, searching, chunking, and basic metadata retrieval. A minor gap is the lack of a tool to list available transcript languages or caption tracks, which could help when the default language is unavailable.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers