Fetch YouTube subtitles and transcripts for AI analysis
Harness the power of Large Language Models (LLMs) by seamlessly integrating YouTube transcripts into your AI applications with this robust Model Context Protocol (MCP) server. This guide provides an in-depth look at leveraging this tool for enhanced AI workflows.
This MCP server unlocks direct access to YouTube video captions and subtitles, streamlining the process of feeding contextual information to your LLMs.
For Claude Desktop users, Smithery offers a one-command installation:
npx -y @smithery/cli install @kimtaeyoon83/mcp-server-youtube-transcript --client claude
get_transcript
ToolThis server revolves around a single, powerful tool:
get_transcript
: Extracts transcripts from YouTube videos.
url
(string, required): Accepts both full YouTube video URLs (e.g., https://www.youtube.com/watch?v=VIDEO_ID
) and video IDs (e.g., VIDEO_ID
). This flexibility simplifies integration.lang
(string, optional, default: "en"
): Specifies the desired language code for the transcript (e.g., "ko"
for Korean, "en"
for English, "es"
for Spanish). If omitted, defaults to English.To enable this server within Claude Desktop, add the following configuration block to your settings:
{ "mcpServers": { "youtube-transcript": { "command": "npx", "args": ["-y", "@kimtaeyoon83/mcp-server-youtube-transcript"] } } }
mcp-get
For command-line enthusiasts, mcp-get
provides a dedicated tool for managing MCP servers:
npx @michaellatman/mcp-get@latest install @kimtaeyoon83/mcp-server-youtube-transcript
awesome-mcp-servers
Discover a curated collection of MCP servers at awesome-mcp-servers to further enhance your LLM applications.
Install dependencies:
npm install
Build the server:
npm run build
For real-time development with automatic rebuilds:
npm run watch
Execute the test suite to ensure functionality:
npm test
Debugging MCP servers, which communicate via standard input/output (stdio), can be tricky. The MCP Inspector is highly recommended:
npm run inspector
This server incorporates comprehensive error handling to gracefully manage common issues:
Extracting Transcripts by URL:
await server.callTool("get_transcript", { url: "https://www.youtube.com/watch?v=VIDEO_ID", lang: "en" });
Retrieving Transcripts by Video ID:
await server.callTool("get_transcript", { url: "VIDEO_ID", lang: "ko" });
Real-World Use Case: Claude Desktop Integration
In your Claude Desktop chat interface, simply provide a YouTube link and a prompt:
chat: https://youtu.be/ODaHJzOyVCQ?si=aXkJgso96Deri0aB Extract subtitles
This server prioritizes security through:
๐ A simple TypeScript library for creating MCP servers.
#๏ธโฃ ๐ A C# SDK for building MCP servers on .NET 9 with NativeAOT compatibility โก ๐
โ Java SDK for building MCP servers using Quarkus.
๐ Provides MCP tool calling support in LangChain, allowing for the integration of MCP tools into LangChain workflows.