Labsco
MCP SERVER

YouTube MCP Server

by temiedani

Search YouTube, read video and channel details, pull comments and transcripts, and turn a video into flash cards or a ten-question quiz.

Games, Entertainment & Fandom
Summary
The study tools are what set it apart from a search wrapper.

Search, comments and channel stats are table stakes; flash cards with timestamps back into the video, and a quiz drawn from the transcript rather than the title, are not. Both work from content the API already gives you, so there is no second service in the loop. Budget for the YouTube quota — comment and trending calls are the expensive ones.

What it is

A YouTube Data API wrapper with a study layer on top. Beyond search, metadata and comments it uses the transcript and description to generate learning material — flash cards and a mixed-format quiz — from a video you point it at.

What you get
  • Videos searched by term with a result cap — `get_videos`
  • One video's details, and a channel's statistics — `get_video_info`, `get_channel_details`
  • Comments on a video, defaulting to 100, and trending videos by region code, defaulting to US and 50 results — `get_video_comments_tool`, `get_trending_videos_tool`
  • Related videos for a given video — `get_related_videos_tool`
  • A comprehensive summary of a video, optionally including its comments — `summarize_video`
  • Flash cards generated from the content, with fill-in-the-blank, question-and-answer and definition types, timestamps for reference, and optional category and difficulty filters — `generate_video_flashcards`
  • A quiz of exactly 10 questions mixing multiple choice, true/false and fill-in-the-blank, with answers and explanations — `generate_video_quiz`
Requirements

A Google Cloud project with the YouTube Data API v3 enabled. Two credentials are involved: an API key in `YOUTUBE_API_KEY` in a `.env` file, and OAuth 2.0 desktop-app credentials downloaded as `credentials.json` in the project root — the first run opens a browser to authorise and writes a `token.pickle`. Optional settings are `YOUTUBE_API_QUOTA_LIMIT` and `YOUTUBE_API_REGION`. Python 3.11 with `uv`; install with `uv pip install -e .` and launch `mcp_videos.py` through `uv --directory <path> run mcp_videos.py`. Keep `credentials.json` and `token.pickle` out of version control.