YouTube MCP Server

The YouTube MCP Server acts as a smart bridge that allows AI models to "see" and interact with everything on YouTube. Instead of just knowing a video exists, an AI using this tool can look up specific topics, browse trending content, and even read through the comment sections to understand what people are saying. It essentially turns YouTube’s massive library of video data into a searchable, readable database that any AI assistant can use to answer questions or find information more effectively. Beyond basic searches, this server empowers developers to perform deep content analysis directly within their AI workflows. It can extract video transcripts, pull detailed channel statistics, and generate comprehensive summaries of long-form content. One of its most impressive capabilities is its set of specialized educational tools; it can automatically transform a video into a series of study flashcards or a comprehensive ten-question quiz, complete with multiple-choice options and difficulty levels based on the transcript and metadata. For developers, this MCP implementation provides a standardized interface built on Python and the YouTube Data API v3, removing the friction of manual API management and complex authentication. By leveraging the Model Context Protocol architecture, it offers a modular tool registry that includes everything from video discovery to social interaction data. This setup allows Large Language Models to call specific functions—like retrieving related videos or generating automated content summaries—seamlessly, making it an essential building block for creating sophisticated AI applications that require real-time access to the world’s largest video platform.

Category: Design, Media & Creative

Tags: education, metadata, transcripts, video, youtube

Visit YouTube MCP Server

How to install and configure YouTube MCP Server

1. Installation Prerequisites: - Python 3.11+ - uv (Python package installer) - Google Cloud Project with YouTube Data API v3 enabled. Steps: 1. Clone the repository: bash git clone https://github.com/temiedani/youtube-mcp-server.git cd youtube-mcp-server 2. Set up Python Environment: bash # Create virtual environment python -m venv .venv # Activate virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate 3. Install Dependencies: bash uv pip install -e . 4. Google Cloud Credentials: - Go to Google Cloud Console. - Enable YouTube Data API v3. - Create OAuth 2.0 Client ID (Type: "Desktop app"). - Download the JSON, rename it to credentials.json, and place it in the project root. - Run the server once manually to perform the OAuth flow: python mcp_videos.py ---

2. Configuration Environment Variables: Create a .env file in the project root: env # Required YOUTUBE_API_KEY=your_api_key_here # Optional YOUTUBE_API_QUOTA_LIMIT=10000 YOUTUBE_API_REGION=US Claude Desktop Configuration: To add this to Claude Desktop, add the following to your claude_desktop_config.json: json { "mcpServers": { "youtube-mcp": { "command": "python", "args": [ "/absolute/path/to/youtube-mcp-server/mcp_videos.py" ], "env": { "YOUTUBE_API_KEY": "your_api_key_here" } } } } Note: Ensure credentials.json and token.pickle are in the same directory as the script. ---

3. Available Tools | Tool | Parameters | Description | | :--- | :--- | :--- | | get_videos | search (str), max_results (int) | Search for YouTube videos. | | get_video_info | video_id (str) | Get detailed video information and stats. | | get_channel_details| channel_id (str) | Get subscriber counts and channel metadata. | | get_video_comments_tool | video_id (str), max_results (int) | Retrieve and analyze user comments. | | get_trending_videos_tool | region_code (str), max_results (int) | List current trending videos by region. | | get_related_videos_tool | video_id (str), max_results (int) | Find content related to a specific video. | | summarize_video | video_id (str), include_comments (bool) | Generate a comprehensive summary of a video. | | generate_video_flashcards | video_id (str), max_cards (int), categories (list), difficulty (str) | Create educational flashcards with timestamps. | | generate_video_quiz | video_id (str) | Generate a 10-question quiz (MCQ, T/F, Fill-in-blank). | ---

4. Example Prompts - Search and Analyze: "Search for the latest videos about 'Quantum Computing' and give me a summary of the top result including what the comments are saying." - Educational: "Generate 10 medium-difficulty flashcards for the video with ID dQw4w9WgXcQ focusing on the key definitions." - Testing Knowledge: "Create a quiz based on the content of the YouTube video at this URL: [URL]." - Channel Research: "Get the channel statistics and most recent trending videos in the US region for 'Technology' category."

What you can do with YouTube MCP Server

Use Case 1: Automated Educational Study Aids Problem: Students and self-learners often watch long educational videos or lectures but struggle to retain information or test their knowledge effectively without manual note-taking. Solution: This MCP allows an AI model to ingest a video's transcript and metadata to automatically generate interactive study materials. By using the generate_video_flashcards and generate_video_quiz tools, the AI can create structured recall exercises directly from the source material. Example: A medical student watches a 45-minute lecture on "Renal Physiology." They ask the AI: "Generate 10 medium-difficulty flashcards and a multiple-choice quiz based on this video." The AI uses the MCP to pull the transcript, identifies key concepts like "Glomerular Filtration Rate," and presents a formatted quiz with answers and explanations.

Use Case 2: Content Strategy and Competitive Research Problem: Digital marketers and content creators spend hours manually browsing YouTube to identify trending topics, analyzing competitor channel performance, and reading comments to understand audience pain points. Solution: The MCP provides tools for bulk data retrieval, including get_trending_videos_tool, get_channel_details, and get_video_comments_tool. An AI can process this data to identify patterns, sentiment, and content gaps within a specific niche. Example: A tech YouTuber asks the AI: "Analyze the top 5 trending tech videos in the US today. Compare their view-to-like ratios and summarize the top three most common complaints in the comment sections." The AI fetches the data via the MCP and provides a report on what topics are currently resonating or failing with the audience.

Use Case 3: Rapid Technical Troubleshooting for Developers Problem: Developers often search for coding tutorials to solve a specific bug, but finding the exact moment a solution is mentioned in a 20-minute video is time-consuming and inefficient. Solution: Using the summarize_video and get_video_info tools, an AI can "watch" several videos on behalf of the developer. It can scan transcripts for specific code snippets or keywords and provide a concise summary of the solution found in each video. Example: A developer asks: "I'm getting a 404 error with my Next.js middleware. Find a YouTube tutorial that addresses this and give me a summary of the fix." The AI searches for relevant videos, summarizes the most highly-rated one, and provides the specific timestamp where the code fix is demonstrated.

Use Case 4: Brand Reputation and Sentiment Monitoring Problem: Companies launching a new product often struggle to keep up with the volume of feedback…

Key facts

  • Open Source
  • Design, Media & Creative, Web Search & Research
  • education, metadata, transcripts, video, youtube

Part of MCP Servers

Related MCP servers

  • MCP MD2PDF Server — Convert Markdown documents to PDF with support for Mermaid diagrams.
  • MCP Media Processing Server — A server for media processing, offering powerful video and image manipulation using FFmpeg and ImageMagick.
  • MCP Music Analysis — Analyze audio from local files, YouTube, or direct links using librosa.
  • MCP OCR Server — An MCP server for Optical Character Recognition (OCR) using the Tesseract engine.
  • MCP NPX Fetch — Fetch and transform web content into various formats like HTML, JSON, Markdown, or Plain Text.
  • MCP Naver News — Search for news articles using the Naver News API. Requires Naver News API credentials.
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories