mcp-youtube-transcript
Fetches YouTube video transcripts from a video URL or bare video ID. Provides tools to retrieve transcripts as plain text (paginated by character range) or as timestamped snippets with start times and durations (paginated by snippet index), supporting configurable caption language codes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-youtube-transcript
A small Model Context Protocol (MCP) server that fetches YouTube video transcripts so an AI assistant can read, summarize, or search what was said in a video.
It runs over stdio (for Claude Desktop, Claude Code, Cursor, and similar clients) or as a stateless Streamable HTTP server (for Docker or remote use).
Tools
Tool | What it does |
| Returns the transcript as one block of plain text. Paginates by character range. |
| Returns an array of |
Both tools accept a full YouTube URL (watch?v=, youtu.be/, /embed/, /v/) or a bare 11-character video ID.
get_transcript
Argument | Type | Default | Notes |
| string | required | YouTube URL or video ID |
| string |
| Caption language code |
| number |
| Character offset to start from |
| number |
| Max characters to return |
Response:
{
"text": "...",
"offset": 0,
"length": 12345,
"total_length": 12345
}get_timed_transcript
Argument | Type | Default | Notes |
| string | required | YouTube URL or video ID |
| string |
| Caption language code |
| number |
| Snippet index to start from |
| number |
| Max snippets to return |
Response:
{
"snippets": [{ "text": "hello", "start": 0.0, "duration": 1.2 }],
"offset": 0,
"count": 500,
"total_snippets": 1834
}Use total_length / total_snippets to decide whether to page for more.
Related MCP server: YouTube Transcripts MCP Server
Install
Requires Node.js 20 or newer.
git clone https://github.com/cchamp-msft/mcp-youtube-transcript.git
cd mcp-youtube-transcript
npm install
npm run buildThe server entry point is build/index.js.
Use with an MCP client
Claude Code
claude mcp add youtube-transcript -- node /absolute/path/to/mcp-youtube-transcript/build/index.jsClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"youtube-transcript": {
"command": "node",
"args": ["/absolute/path/to/mcp-youtube-transcript/build/index.js"]
}
}
}Other clients that support stdio MCP servers (Cursor, Windsurf, Zed, etc.) use the same command and args.
Then ask your assistant something like: "Summarize https://www.youtube.com/watch?v=dQw4w9WgXcQ".
HTTP mode
Set MCP_TRANSPORT=http to expose a stateless Streamable HTTP endpoint instead of stdio.
MCP_TRANSPORT=http MCP_PORT=8000 npm startPath | Purpose |
| MCP endpoint |
| Returns |
Point an HTTP-capable client at http://localhost:8000/mcp.
Docker
docker build -t mcp-youtube-transcript .
docker run --rm -p 8000:8000 -e MCP_TRANSPORT=http mcp-youtube-transcriptConfiguration
All configuration is via environment variables.
Variable | Default | Values |
|
|
|
|
| Port for HTTP mode |
|
|
|
Development
npm run dev # tsc --watch
npm test # vitest
npm run build # compile to build/Source layout:
File | Role |
| Entry point, transport selection |
| MCP tool definitions |
| Video ID parsing and transcript fetching |
| Environment variable parsing |
Limitations
Transcripts come from the unofficial
youtube-transcriptpackage, which scrapes YouTube's caption data. YouTube can change its page structure at any time and break it.Videos without captions in the requested language return an error. Auto-generated captions usually work, but not always.
Heavy use from one IP address may be rate limited or blocked by YouTube.
HTTP mode is stateless and has no authentication. Do not expose it to the public internet without putting it behind a proxy that handles auth.
Contributing
Issues and pull requests are welcome. For anything larger than a small fix, open an issue first so we can talk it over. Please run npm test and npm run build before submitting.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
Your YouTube library, in the AI tools you already use: Claude, ChatGPT, Cursor, any MCP client.
YouTube for AI agents: transcripts, comments, video stats, channel monitor, Shorts captions.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that fetches YouTube video transcripts and optionally summarizes them. Supports multiple transcript formats (text, JSON, SRT, WebVTT), multi-language retrieval, and flexible YouTube URL parsing.641 PyPI6MIT
- FlicenseAqualityDmaintenanceProvides YouTube video transcripts (text and metadata) as MCP tools for AI hosts like Claude Code, enabling summarization, search, and Q&A without watching the video.2-
- AlicenseNot gradedqualityCmaintenanceEnables Claude AI and other MCP clients to retrieve transcripts from YouTube videos in multiple languages and URL formats, with zero local setup through a hosted cloud server or a deployable Cloudflare Worker.99 npmMIT
- AlicenseNot gradedqualityCmaintenanceFetches YouTube video subtitles (transcripts) over MCP, enabling clients like Claude to retrieve and summarize video content.99 npmMIT