YouTube Video Summarizer for MCP Server
Summarize lengthy YouTube videos on your MCP server quickly to get concise, shareable highlights and timestamps.
npx -y @nabid-pf/youtube-video-summarizer-mcpOverview
This MCP (Model Context Protocol) server provides fast, programmatic summarization of YouTube videos. It fetches a video’s audio, generates a transcript, and produces concise summaries and timestamped highlights that are easy to share or embed into downstream workflows. The server is designed to run as a tool within an MCP-enabled environment so that language models and other agents can call it as part of larger pipelines.
Summarizing long videos manually is time-consuming; this service automates the common steps (download/extract, transcription, chunking, summarization, and timestamp mapping) and returns structured JSON output that includes clipable highlights and a full summary. The result is useful for content discovery, research, note-taking, accessibility, and automations that integrate video content into conversational agents.
Features
- Download and extract audio from YouTube videos (supports yt-dlp/ffmpeg workflows)
- Automatic transcription (configurable backend: cloud LLMs or local transcription models)
- Chunking and context-aware summarization to preserve coherence
- Timestamped highlights and short, shareable blurbs for each key moment
- Full video summary for quick comprehension
- Simple HTTP API suitable for MCP tool integration
- Caching of transcriptions and summaries to reduce repeated work
- Configurable model, language, and chunking parameters
Installation / Configuration
Prerequisites:
- Python 3.9+
- ffmpeg installed and on PATH
- yt-dlp (or similar) available
- Optional: API key for your chosen LLM/transcription backend
Clone and install:
Environment variables (example):
# Transcription / LLM provider (example keys)
# or "local"
Run the server (development):
Docker example:
# Dockerfile (simplified)
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
Build & run:
Available Tools / Resources
HTTP endpoints (example):
- POST /summarize
- Accepts JSON payload describing the YouTube URL and options
- GET /health
- Basic liveness/ readiness check
- Static files / cache folder
- Local cache for downloaded audio and transcripts
Example POST /summarize request:
POST /summarize
Content-Type: application/json
Example response (abbreviated):
Parameter reference:
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | required | Full YouTube URL or video id |
| language | string | “auto” | Language to force for transcription |
| transcription_model | string | backend-dependent | Which transcription/backend to use |
| summary_model | string | backend-dependent | Model used for summarization |
| max_chunk_seconds | int | 300 | Max seconds per chunk for context windowing |
| highlight_count | int | 5 | Number of top highlights to return |
MCP tool manifest example (to register this server as a tool):
Use Cases
- Content creators: Generate short highlight reels or show notes with exact timestamps to save editing time.
- Researchers and journalists: Quickly extract the most relevant segments from long talks, interviews, or lectures.
- Education: Produce study guides and time-marked clips that students can review.
- Accessibility: Provide concise summaries and time-indexed captions for people who prefer skimming long videos.
- Agents and automations: Allow conversational agents (MCP-aware) to fetch summarized video content to inform responses without streaming the whole video.
Notes, Limitations & Troubleshooting
- Quality depends on the transcription backend and audio quality; noisy or music-heavy tracks may yield less accurate transcripts.
- Respect rate limits and usage costs of cloud LLM/transcription providers.
- Caching significantly reduces repeated work—check cache directory when debugging repeated runs.
- If timestamps seem misaligned, verify ffmpeg + yt-dlp versions and that the downloaded audio matches the video timeline.
For detailed implementation specifics, code examples, and contribution guidelines, see the project repository: https://github.com/nabid-pf/youtube-video-summarizer-mcp