popcorn

popcorn

An MCP server that enables AI agents to analyze videos locally by extracting transcripts, detecting scene changes, and returning key frames.

Category
Visit Server

README

<p align="center"> <a href="#quick-start">README</a> โ€ข <a href="LICENSE">โš–๏ธ License</a> </p>

<h1 align="center"> <br> ๐Ÿฟ <br> popcorn <br> </h1>

<p align="center"> <a href="docs/i18n/README.zh.md">๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡</a> โ€ข <a href="docs/i18n/README.ja.md">๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž</a> โ€ข <a href="docs/i18n/README.ko.md">๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด</a> โ€ข <a href="docs/i18n/README.es.md">๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol</a> โ€ข <a href="docs/i18n/README.de.md">๐Ÿ‡ฉ๐Ÿ‡ช Deutsch</a> โ€ข <a href="docs/i18n/README.fr.md">๐Ÿ‡ซ๐Ÿ‡ท Franรงais</a> โ€ข <a href="docs/i18n/README.pt.md">๐Ÿ‡ง๐Ÿ‡ท Portuguรชs</a> โ€ข <a href="docs/i18n/README.ru.md">๐Ÿ‡ท๐Ÿ‡บ ะ ัƒััะบะธะน</a> โ€ข <a href="docs/i18n/README.ar.md">๐Ÿ‡ธ๐Ÿ‡ฆ ุงู„ุนุฑุจูŠุฉ</a> โ€ข <a href="docs/i18n/README.it.md">๐Ÿ‡ฎ๐Ÿ‡น Italiano</a> โ€ข <a href="docs/i18n/README.nl.md">๐Ÿ‡ณ๐Ÿ‡ฑ Nederlands</a> โ€ข <a href="docs/i18n/README.tr.md">๐Ÿ‡น๐Ÿ‡ท Tรผrkรงe</a> โ€ข <a href="docs/i18n/README.vi.md">๐Ÿ‡ป๐Ÿ‡ณ Tiแบฟng Viแป‡t</a> โ€ข <a href="docs/i18n/README.hi.md">๐Ÿ‡ฎ๐Ÿ‡ณ เคนเคฟเคจเฅเคฆเฅ€</a> </p>

<h4 align="center">An agent skill that gives any coding agent the ability to watch and understand video. Works with <a href="https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview" target="_blank">Claude Code</a>, <a href="https://openai.com/index/introducing-codex/" target="_blank">Codex</a>, and any MCP-compatible agent.</h4>

<p align="center"> <a href="LICENSE"> <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"> </a> <a href="package.json"> <img src="https://img.shields.io/badge/version-0.4.0-green.svg" alt="Version"> </a> <a href="package.json"> <img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg" alt="Node"> </a> <a href="https://modelcontextprotocol.io"> <img src="https://img.shields.io/badge/MCP-Compatible-purple.svg" alt="MCP Compatible"> </a> </p>

<br>

<p align="center"> <a href="#quick-start">Quick Start</a> โ€ข <a href="#how-it-works">How It Works</a> โ€ข <a href="#mcp-tools">MCP Tools</a> โ€ข <a href="#transcription-backends">Transcription</a> โ€ข <a href="#configuration">Configuration</a> โ€ข <a href="#troubleshooting">Troubleshooting</a> โ€ข <a href="#license">License</a> </p>

<p align="center"> Popcorn enables AI agents to watch and understand long-form videos by extracting transcripts, detecting scene changes, and returning key frames. Everything runs locallyโ€”no external APIs, no fees, complete privacy. </p>


Quick Start

# Install FFmpeg (required)
brew install ffmpeg                    # macOS
sudo apt install ffmpeg                # Ubuntu/Debian

# Install Popcorn
git clone https://github.com/anthropics/popcorn.git
cd popcorn && npm install && npm run build

# Optional: Install a transcription backend
pip install mlx-whisper                # Apple Silicon (fastest)
pip install openai-whisper             # Any platform

Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "popcorn": {
      "command": "node",
      "args": ["/path/to/popcorn/dist/index.js"]
    }
  }
}

Key Features:

  • Scene Detection โ€” Captures frames at visual transitions, not fixed intervals
  • Local Transcription โ€” 4 backend options (mlx-whisper, faster-whisper, whisper-cpp, whisper)
  • Inline Images โ€” Returns key frames directly in MCP responses
  • Smart Presets โ€” Auto-configures for screencasts, presentations, movies, interviews
  • Zero Config โ€” Just pass a video path and it works
  • Privacy First โ€” Everything runs locally, no data leaves your machine

Documentation

Getting Started

Guides

Reference


How It Works

Core Components:

  1. FFprobe โ€” Extracts video metadata (duration, resolution, codecs)
  2. FFmpeg Scene Detection โ€” Finds visual transitions using select='gt(scene,N)' filter
  3. Parallel Frame Extraction โ€” Captures JPEGs at scene change timestamps
  4. Multi-Backend Transcription โ€” Whisper variants convert audio to timestamped text
  5. Analysis Bundle โ€” Results saved to .popcorn/ directory
  6. MCP Response โ€” Returns metadata + inline base64 images
Video File โ”€โ”€โ–ถ FFprobe โ”€โ”€โ–ถ FFmpeg โ”€โ”€โ–ถ Whisper โ”€โ”€โ–ถ Analysis Bundle
                 โ”‚           โ”‚          โ”‚              โ”‚
                 โ–ผ           โ–ผ          โ–ผ              โ–ผ
              metadata    frames    transcript    MCP Response

MCP Tools

Tool Description
popcorn_analyze Main analysis โ€” extracts frames, transcribes audio, returns results
popcorn_suggest Probe video metadata and get recommended settings
popcorn_presets List available video types and objectives
popcorn_backends Detect your system and show transcription options
popcorn_read Read transcript slices with time filtering

Basic Usage

{
  "tool": "popcorn_analyze",
  "arguments": {
    "path": "/path/to/video.mp4"
  }
}

With Presets

{
  "tool": "popcorn_analyze",
  "arguments": {
    "path": "/path/to/video.mp4",
    "videoType": "screencast",
    "objective": "detailed"
  }
}

Video Types

Type Best For Scene Detection
screencast Tutorials, coding sessions, UI demos Low threshold
presentation Slides, lectures, keynotes Slide transitions
movie Films, TV shows Balanced
interview Podcasts, talking heads Transcription priority
surveillance Security footage, dashcam High threshold
sports Live events, fast action High frame rate

Objectives

Objective Use When
summary Quick overview needed
detailed Don't miss anything
find_moment Searching for specific content
transcribe Audio/speech is most important
visual_only Only care about visuals
quick_scan Fast preview needed

Transcription Backends

Popcorn auto-detects your system and recommends the best backend.

Backend Comparison

Backend Speed Best For Install
mlx-whisper Fastest Apple Silicon (M1/M2/M3/M4) pip install mlx-whisper
faster-whisper Fast NVIDIA GPUs pip install faster-whisper
whisper-cpp Moderate Cross-platform brew install whisper-cpp
whisper Slow Most compatible pip install openai-whisper

Processing Times (60-min video)

Backend Time
mlx-whisper 3-8 min
faster-whisper 5-10 min
whisper-cpp 10-20 min
whisper 30-60 min

Force a Backend

{
  "tool": "popcorn_analyze",
  "arguments": {
    "path": "/path/to/video.mp4",
    "backend": "mlx-whisper"
  }
}

Configuration

All Parameters

Parameter Type Description
path string Required. Absolute path to video file
videoType string Video type preset
objective string Analysis objective preset
transcribe boolean Enable/disable transcription
backend string Transcription backend
model string Whisper model (tiny, base, small, medium, large)
language string Language code (e.g., en, es, fr)
frameMode string scene or interval
sceneThreshold number Scene sensitivity (0-1)
maxFrames number Maximum frames to extract
inlineFrames number Frames to return as base64

Output Structure

.popcorn/<video>_<timestamp>/
โ”œโ”€โ”€ analysis.json          # Full metadata
โ”œโ”€โ”€ transcript.txt         # Plain text
โ”œโ”€โ”€ transcript.json        # Timestamped segments
โ”œโ”€โ”€ transcript.chunks.json # LLM-friendly chunks
โ””โ”€โ”€ assets/
    โ”œโ”€โ”€ audio.wav
    โ””โ”€โ”€ frames/
        โ”œโ”€โ”€ scene_000001.jpg
        โ””โ”€โ”€ ...

Troubleshooting

FFmpeg not found

brew install ffmpeg          # macOS
sudo apt install ffmpeg      # Ubuntu/Debian

No transcription backend

pip install mlx-whisper      # Apple Silicon
pip install openai-whisper   # Any platform

Too few frames detected

{ "sceneThreshold": 0.15, "minSceneInterval": 2 }

Too many frames detected

{ "sceneThreshold": 0.5, "minSceneInterval": 10 }

See Troubleshooting Guide for more solutions.


Development

npm install          # Install dependencies
npm run build        # Build
npm run dev          # Development mode
npm start            # Run server

Project Structure

popcorn/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts        # MCP server
โ”‚   โ”œโ”€โ”€ analyze.ts      # Analysis pipeline
โ”‚   โ”œโ”€โ”€ ffmpeg.ts       # Video processing
โ”‚   โ”œโ”€โ”€ transcribe.ts   # Multi-backend transcription
โ”‚   โ”œโ”€โ”€ presets.ts      # Video type presets
โ”‚   โ””โ”€โ”€ commands.ts     # Shell execution
โ”œโ”€โ”€ docs/               # Documentation
โ””โ”€โ”€ skills/             # Agent skills

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing)
  5. Open a Pull Request

License

MIT License โ€” see LICENSE for details.


Acknowledgments


<p align="center"> Made with ๐Ÿฟ for AI agents everywhere </p>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured