MCP ExplorerExplorer

Youtube Video Mcp

@yug-spaceon 10 months ago
2 MIT
FreeCommunity
AI Systems
A minimal MCP server to fetch YouTube video transcripts and stream them directly to your LLM client for seamless integration and prompt engineering workflows.

Overview

What is Youtube Video Mcp

youtube_video_mcp is a minimal Model Control Protocol (MCP) server designed to fetch transcripts from YouTube videos and stream them directly to your LLM client, facilitating seamless integration and prompt engineering workflows.

Use cases

Use cases for youtube_video_mcp include generating summaries of video content, creating searchable databases of video transcripts, enhancing accessibility for hearing-impaired users, and supporting research that involves video analysis.

How to use

To use youtube_video_mcp, install the required dependencies using pip, run the server with ‘python main.py’, and call the ‘get_transcript’ tool with a valid YouTube URL to retrieve the video ID and transcript.

Key features

Key features include the ability to extract video IDs from valid YouTube URLs, return plain-text transcripts without timestamps, and utilize the ‘youtube-transcript-api’ library for fetching transcripts.

Where to use

youtube_video_mcp can be used in various fields such as natural language processing, content creation, educational tools, and any application that requires video transcript retrieval for analysis or integration.

Content

YouTube Transcript MCP Server

This is a Model Control Protocol (MCP) server that provides a tool to fetch transcripts from YouTube videos.

Features

  • Extracts video ID from any valid YouTube URL
  • Returns plain-text transcripts (without timestamps)
  • Uses the youtube-transcript-api library

Installation

# Install dependencies
pip install youtube-transcript-api "mcp[fastmcp]"

Usage

Run the server:

python main.py

The server exposes a single tool:

  • get_transcript: Takes a YouTube URL and returns the video ID and transcript

Example

Using the MCP client:

from mcp.client import Client

client = Client(transport="stdio")
response = client.call("get_transcript", {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"})
print(f"Video ID: {response['video_id']}")
print(f"Transcript: {response['transcript'][:100]}...")  # First 100 chars

Error Handling

The server handles these error cases:

  • Invalid YouTube URLs
  • Videos without available transcripts

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers