Skip to main content
Glama

youtube-transcript-mcp

An MCP server that lets an AI assistant read a YouTube video's transcript.

You give the assistant a YouTube link. It calls one tool, get_transcript, and gets the captions back with a start time on every line:

[0:02] tech professionals, and in this video,
[0:04] I'm going to share with you exactly what
[0:06] works, what clients are paying for right

The timestamps let the assistant (and you) point at the exact moment something was said.

New to MCP? It stands for Model Context Protocol. It is a standard way to give an AI assistant a small program it can call, the way a charger standard lets one cable fit many devices. This server is one such program. It runs on your own computer.

What you need

  • A computer running macOS, Linux or Windows

  • uv, a tool that installs Python and the dependencies for you

  • Claude Code or Claude Desktop (any assistant that supports MCP servers over stdio will also work)

  • Python 3.11 or newer. If you don't have it, uv will fetch it.

Related MCP server: YouTube Transcript MCP Server

1. Download it

git clone https://github.com/noelogbuagu/youtube-transcript-mcp.git
cd youtube-transcript-mcp
pwd

Copy the folder path that pwd prints. You need it in the next step. On Windows PowerShell, use Get-Location instead.

2. Check that it works

uv run client.py

The first run downloads the dependencies. You should see a video id, a character count and the first few lines of a transcript. If you do, the server works.

3. Add it to your assistant

Replace /full/path/to/youtube-transcript-mcp with the path you copied.

Claude Code

claude mcp add --transport stdio youtube-transcript -- uv --directory "/full/path/to/youtube-transcript-mcp" run server.py

Check that it was added:

claude mcp list

Then start claude and ask: "Get the transcript of https://www.youtube.com/watch?v=1HtydHmdhrQ and summarise the main point."

Claude Desktop

  1. Open Settings > Developer > Edit Config. This opens claude_desktop_config.json.

  2. Add the server under mcpServers:

{
  "mcpServers": {
    "youtube-transcript": {
      "command": "uv",
      "args": [
        "--directory",
        "/full/path/to/youtube-transcript-mcp",
        "run",
        "server.py"
      ]
    }
  }
}
  1. Quit Claude Desktop completely and open it again. The get_transcript tool should now appear in the tools list.

If Claude Desktop says it cannot find uv, replace "command": "uv" with the full path to it. Run which uv (macOS and Linux) or where uv (Windows) to get that path. Desktop apps often don't see the same PATH as your terminal.

Cursor and other editors

Any editor that can start an MCP server over stdio works with the same command: uv --directory "/full/path/to/youtube-transcript-mcp" run server.py.

Troubleshooting

  • Error: Could not retrieve a transcript: the video may have no captions, or captions may be turned off by its owner. Try another video.

  • Works in the terminal, fails after a while or from a cloud machine: YouTube blocks requests that come from many data-centre addresses. Running the server on your own computer is the reliable way. If you do hit blocks, the next section helps.

  • The tool doesn't show up in Claude Desktop: the config file must be valid JSON (watch for missing commas), and you must fully quit and reopen the app.

Optional: use a proxy

If YouTube blocks your requests, you can route them through a Webshare proxy. Copy .env.example to .env and fill in:

WEBSHARE_USERNAME=
WEBSHARE_PASSWORD=

Leave them empty and the server connects directly. .env is ignored by git, so your credentials stay local.

Using it as a thinking partner

A transcript on its own is just text. What helped me was keeping a notebook next to it: a short note of what I'm trying to decide, and one small file per video with what I took from it. The notebook.example/ folder shows the shape: an aim.md, a card template, and a few rules for the assistant to follow in AGENTS.md. Copy it into its own folder and point your assistant at it.

Development

uv run --group dev pytest        # offline tests, no network needed
uv run client.py                 # live smoke test
uv run server.py --transport streamable-http   # serve over HTTP on 127.0.0.1:8050
uv run mcp dev server.py         # open the MCP Inspector

Project layout

youtube-transcript-mcp/
  server.py                         # entrypoint your assistant starts
  client.py                         # smoke test: starts the server and calls the tool
  notebook.example/                 # optional notes setup
  src/youtube_transcript_mcp/
    utils.py                        # video id parsing, [m:ss] formatting
    youtube/service.py              # fetches captions, optional proxy
    mcp/server.py                   # exposes get_transcript as an MCP tool
  tests/

Built on the MCP Python SDK 2.3 and youtube-transcript-api.

Not built yet

  • Saving transcripts so a later chat can search what was already watched.

  • Hosting the server so it works away from your computer.

License

MIT. See LICENSE.

Available Tools

1 tool
get_transcriptB

Get the caption transcript of a YouTube video, one [m:ss]-stamped line per caption.

NameRequiredDescriptionDefault
video_url_or_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the output shape ('one [m:ss]-stamped line per caption'), which is useful, but says nothing about the dominant failure mode for this operation (videos with disabled or absent captions), authentication, rate limits, or whether the call is read-only and side-effect free.

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?

A single sentence that front-loads the action and resource, then adds the one detail that matters for consumption. Zero filler.

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?

Return values are covered by the output schema, and there is only one parameter, so the structural surface is small. Still, for a network-backed scraping tool the description omits the practically important caveats: caption availability, video accessibility, and error behavior.

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?

One required parameter with 0% schema description coverage, so the description must compensate. It establishes the domain (YouTube video) but does not explain that 'video_url_or_id' accepts either a full URL or a bare ID, leaving that to inference from the parameter name.

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

Purpose4/5

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

States a specific verb and resource: 'Get the caption transcript of a YouTube video'. It also characterizes the returned format at a glance. There are no sibling tools to differentiate from, so a clear single-purpose statement is sufficient, though it never states what happens on failure or what a 'caption' excludes (e.g., auto-generated vs. manual).

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

Usage Guidelines2/5

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

No guidance on when to use this versus other approaches, no preconditions (public video? captions must exist?), and no exclusions. There are no sibling tools to route to, but the agent is left to infer that the video must have captions available and be accessible.

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. 1 tool updatev0.1.0
    • First observedget_transcript

TDQS

A3.5/5.0

Scored across 1 tool

Disambiguation5/5

There is only one tool, so there is no possibility of ambiguity or misselection between tools. Its purpose (fetching a YouTube caption transcript) is unambiguous.

Naming Consistency5/5

The single tool uses a clear, conventional snake_case verb_noun pattern (get_transcript). With only one name there is no inconsistency to speak of, and the name matches the server's stated purpose.

Tool Count4/5

One tool is thin, but the server is deliberately scoped to a single capability and that tool earns its place. It falls just short of a full 5 because the surface offers no room for even closely related operations.

Completeness3/5

Core retrieval of a transcript is covered, but obvious adjacent operations are absent: listing available caption languages, selecting a language, or returning video metadata. Multi-language caption handling in particular is a notable gap that could cause agent failures.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers