mcpField
Y
YouTube Transcript MCP Server

YouTube Transcript MCP Server

Local
github.com/objones25Media & Design6Updated 81w ago

About YouTube Transcript MCP Server

YouTube Transcript MCP Server is a serverless MCP server on Cloudflare Workers for AI assistants that need YouTube captions. It accepts multiple video URL formats and supports language selection.

Key features

  1. 01Extract captions from URLs or video IDs
  2. 02Select caption language
  3. 03Accept multiple YouTube URL formats
  4. 04Stream connections over SSE

Use cases

  1. 01Retrieve captions for reading
  2. 02Fetch captions in a chosen language
  3. 03Prepare video text for summarization

MCP support

The MCP server exposes the get_transcript tool to MCP clients, retrieving YouTube captions by video URL or ID and language code. It supports SSE connections.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"remote-cloudflare-youtube-transcript": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector"
]
}
}
}
Run commandnpx -y @modelcontextprotocol/inspector

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@modelcontextprotocol/inspector

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

YouTube Transcript MCP Server

A high-performance, serverless implementation of a YouTube transcript extraction service using the Model Context Protocol (MCP), deployed on Cloudflare Workers.

Overview

This MCP server enables AI assistants to retrieve transcripts from YouTube videos through a simple API. The implementation combines the lightweight transcript extraction capabilities seen in kimtaeyoon83/mcp-server-youtube-transcript with the remote MCP server architecture from Cloudflare AI demos.

Features

  • Serverless Deployment: Runs on Cloudflare's global edge network for minimal latency
  • YouTube URL Flexibility: Supports multiple URL formats and direct video IDs
  • Language Selection: Retrieve transcripts in different languages (defaults to English)
  • Edge-optimized: Ultra-fast response times (typically 400-800ms)
  • Minimal Implementation: Less than 300 lines of code for easy maintenance
  • SSE Transport: Implements Server-Sent Events for streaming connections

Available Tools

ToolDescriptionParameters
get_transcriptExtract transcripts from YouTube videosurl (required): YouTube video URL or ID
lang (optional, default: "en"): Language code

Usage with Claude Desktop

Installation
  1. Open Claude Desktop and go to Settings > Developer > Edit Config
  2. Update your configuration file:
{
  "mcpServers": {
    "youtube-transcript": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://your-deployed-worker.workers.dev/sse"
      ]
    }
  }
}
  1. Restart Claude Desktop
Example Prompts
Can you show me the transcript of this YouTube video? https://www.youtube.com/watch?v=dQw4w9WgXcQ
Extract the transcripts from this TED talk and summarize the key points: https://youtu.be/8S0FDjFBj8o

Local Development

Prerequisites
  • Node.js 18 or higher
  • Wrangler CLI (npm install -g wrangler)
Setup
# Clone the repository
git clone https://github.com/yourusername/youtube-transcript-mcp-server.git
cd youtube-transcript-mcp-server

# Install dependencies
npm install

# Run locally
wrangler dev
Testing with MCP Inspector
  1. Install the MCP Inspector:

    npx @modelcontextprotocol/inspector
    
  2. In the inspector:

    • Set Transport Type to SSE
    • Enter http://localhost:8787/sse as the URL
    • Click "Connect"
  3. Try out the get_transcript tool with different YouTube URLs

Deployment to Cloudflare

# Deploy to Cloudflare Workers
wrangler deploy

Technical Implementation

The server is built with a minimal, high-efficiency codebase:

  • YouTubeTranscriptMCPSqlite: Core MCP agent implementation with transcript extraction capabilities
  • McpServer: Handles MCP protocol interactions
  • MCP Protocol Integration: Complete implementation of the Model Context Protocol
Key optimizations:
  1. Efficient URL parsing and validation
  2. Minimal external dependencies
  3. Proper error handling with detailed error messages
  4. Streaming support through SSE

Credits

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.