YouTube MCPYouTube MCP

Extract transcripts, summarize content, and query videos effortlessly. Leverage Gemini AI to enhance your YouTube video analysis capabilities. Gain insights and streamline your video content interactions with powerful tools.

Tools

youtube/get-transcript

Retrieves the transcript/subtitles for a specified YouTube video. Uses the YouTube Transcript API to fetch time-coded transcripts in the requested languages. The transcripts include timing information, text content, and duration for each segment. Args: video_id (str): The YouTube video ID (11-character string from video URL) languages (List[str], optional): List of language codes to search for transcripts. Defaults to ["en"] (English). Returns: List[Dict]: A list containing a single dictionary with: - type: "transcript" - data: Dictionary containing video_id, segments (list of transcript entries), and languages requested Raises: ToolError: When transcript retrieval fails (video unavailable, no captions, etc.)

youtube/summarize

Generates a concise summary of a YouTube video's content using Gemini AI. This tool first retrieves the video's transcript, then uses Google's Gemini 2.0 Flash model to create a structured summary of the key points discussed in the video. Args: video_id (str): The YouTube video ID to summarize Returns: List[Dict]: A list containing a single dictionary with: - type: "summary" - data: Dictionary containing video_id, summary text, and model used Raises: ToolError: When summarization fails (API key missing, transcript unavailable, etc.)

youtube/query

Answers natural language questions about a YouTube video's content. This tool leverages Google's Gemini 2.0 Flash model to provide responses to questions based solely on the video's transcript. It extracts insights, facts, and context without watching the video itself. Args: video_id (str): The YouTube video ID to query query (str): Natural language question about the video content Returns: List[Dict]: A list containing a single dictionary with: - type: "query-response" - data: Dictionary containing video_id, the original query, the AI-generated response, and model used Raises: ToolError: When query fails (API key missing, transcript unavailable, etc.)

youtube/search

Searches YouTube for videos matching a specific query and returns detailed metadata. This tool performs a two-step API process: 1. First searches for videos matching the query 2. Then fetches detailed metadata for each result (title, channel, views, etc.) Args: query (str): Search terms to find relevant videos max_results (int, optional): Maximum number of results to return. Defaults to 5, capped at 50. Returns: List[Dict]: A list containing a single dictionary with: - type: "search-results" - data: Dictionary containing original query, list of video objects with detailed metadata, and total result count Video metadata includes: - id: YouTube video ID - title: Video title - description: Video description - thumbnail: URL to high-quality thumbnail - channel_title: Channel name - channel_id: YouTube channel ID - published_at: Publication timestamp - views: View count - likes: Like count - comments: Comment count - duration: Video duration in ISO 8601 format Raises: ToolError: When search fails (API key missing, API error, etc.)

View 2 more tools

Installation

Login to configure client

Configuration

Monthly Tool Calls

11

Local

No

Published

3/24/2025
    YouTube MCP | Smithery