Labsco
lnmunhoz logo

MCP YouTube Transcript Server

from lnmunhoz

Retrieves transcripts from YouTube videos for content analysis and processing.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

MCP YouTube Transcript Server

smithery badge

A Model Context Protocol server that enables retrieval of transcripts from YouTube videos. This server provides direct access to video transcripts through a simple interface, making it ideal for content analysis and processing.

mcp-youtube-transcript

Table of Contents

Features

โœจ Key capabilities:

  • Extract transcripts from YouTube videos
  • Support for multiple languages
  • Format text with continuous or paragraph mode
  • Retrieve video titles and metadata
  • Automatic paragraph segmentation
  • Text normalization and HTML entity decoding
  • Robust error handling
  • Timestamp and overlap detection

API Reference

get_transcripts

Fetches transcripts from YouTube videos.

Parameters:

  • url (string, required): YouTube video URL or ID
  • lang (string, optional): Language code (default: "en")
  • enableParagraphs (boolean, optional): Enable paragraph mode (default: false)

Response Format:

{
  "content": [{
    "type": "text",
    "text": "Video title and transcript content",
    "metadata": {
      "videoId": "video_id",
      "title": "video_title",
      "language": "transcript_language",
      "timestamp": "processing_time",
      "charCount": "character_count",
      "transcriptCount": "number_of_transcripts",
      "totalDuration": "total_duration",
      "paragraphsEnabled": "paragraph_mode_status"
    }
  }]
}

Development

Project Structure

โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ index.ts            # Server entry point
โ”‚ โ”œโ”€โ”€ youtube.ts          # YouTube transcript fetching logic
โ”œโ”€โ”€ dist/                 # Compiled output
โ””โ”€โ”€ package.json

Key Components

  • YouTubeTranscriptFetcher: Core transcript fetching functionality
  • YouTubeUtils: Text processing and utilities

Features and Capabilities

  • Error Handling:

    • Invalid URLs/IDs
    • Unavailable transcripts
    • Language availability
    • Network errors
    • Rate limiting
  • Text Processing:

    • HTML entity decoding
    • Punctuation normalization
    • Space normalization
    • Smart paragraph detection