Labsco
bendelpino logo

YouTube

โ˜… 5

from bendelpino

Search YouTube videos and retrieve their transcripts using the YouTube API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

YouTube MCP Server

A Model Context Protocol (MCP) server that enables Claude Desktop (and other applications) to interact with YouTube, providing search and transcript functionality.

Features

  • Search YouTube Videos: Search for videos with customizable result counts
  • Get Video Transcripts: Extract transcripts from YouTube videos using URLs or video IDs
  • AI-Ready Integration: Seamlessly integrates with Claude Desktop for YouTube content analysis

Tools Available

1. search_youtube_videos

  • Purpose: Search YouTube for videos based on a query
  • Parameters:
    • search_term (string): The search query
    • num_videos (int): Number of videos to return (default: 5, max: 50)
  • Returns: List of video information including titles, channels, descriptions, URLs, and metadata

2. get_youtube_transcript

  • Purpose: Extract transcript from a YouTube video
  • Parameters:
    • video_url_or_title (string): YouTube video URL or video ID
  • Returns: Full transcript with timestamps and metadata

3. analyze_youtube_content_prompt

  • Purpose: AI prompt template for comprehensive YouTube content analysis
  • Parameters:
    • search_term (string): Topic to analyze
    • num_videos (int): Number of videos to analyze

Integration with Claude Desktop

Add this configuration to your Claude Desktop MCP settings:

{
  "mcpServers": {
        "youtube": {
            "command": "local/path/to/uv",
            "args": [
                "run",
                "--directory",
                "/Path/to/your/project",
                "youtube_server.py"
            ],
            "env": {
                "YOUTUBE_API_KEY": "your_key_here"
            }
  }
}

Error Handling

  • Missing API Key: Server will warn and search functionality will be limited
  • Invalid Video IDs: Clear error messages for transcript requests
  • API Limits: Respects YouTube API quotas and rate limits
  • Missing Transcripts: Handles videos without available captions

Dependencies

  • fastmcp: MCP server framework
  • google-api-python-client: YouTube Data API access
  • youtube-transcript-api: Transcript extraction