Skip to main content
Glama
README.md
# reel-lens 🎬 — let Claude watch videos

[![CI](https://github.com/selim163/reel-lens-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/selim163/reel-lens-mcp/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)
![MCP](https://img.shields.io/badge/MCP-server-black)

**Paste a link to a TikTok, Instagram Reel, YouTube video or X post and ask Claude about it.**
reel-lens is a local [MCP](https://modelcontextprotocol.io) server that gives Claude what it needs to understand a video:

- 📝 **What is said:** a timestamped transcript, made on your machine with [faster-whisper](https://github.com/SYSTRAN/faster-whisper)
- 🖼️ **What is shown:** still frames across the whole video, plus any moment you ask for
- 🏷️ **The context:** creator, caption, date, views and likes

Free, no API keys, no cloud service. Everything runs on your own computer.

> 🇩🇪 [Deutsche Anleitung](README.de.md)

```text
You:    What's the trick in this reel? https://www.instagram.com/reel/...
Claude: [watch_video] The creator shows how to ... At 0:12 you can see ...
```

## Supported sites

**Tested** (Windows 11, December 2026): TikTok, Instagram Reels, YouTube and X, each with download, still frames and transcript.

**Through yt-dlp, not tested by us:** Facebook, Reddit, Vimeo, Twitch clips, Bilibili and [every other site yt-dlp supports](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md). Some posts can only be seen when logged in (in our test a Reddit video); see [Troubleshooting](#troubleshooting).

Local video files work too (mp4, mov, m4v, mkv, webm, avi, 3gp).

## Quick start

You need [uv](https://docs.astral.sh/uv/getting-started/installation/) (Windows: `winget install astral-sh.uv`, macOS: `brew install uv`). ffmpeg ships with reel-lens.

**Claude Code**

```bash
claude mcp add reel-lens --scope user -- uvx --from git+https://github.com/selim163/reel-lens-mcp reel-lens-mcp
```

**Claude Desktop**: add this to `claude_desktop_config.json` (Settings → Developer → Edit Config) and restart Claude Desktop:

```json
{
  "mcpServers": {
    "reel-lens": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/selim163/reel-lens-mcp", "reel-lens-mcp"]
    }
  }
}
```

If Claude Desktop can't find `uvx`, write its full path instead (Windows: `C:\\Users\\<you>\\.local\\bin\\uvx.exe`).

The same JSON works in Cursor, VS Code, Windsurf and other MCP clients. The first start takes a minute while uv installs everything. The first transcript downloads the Whisper model once (`small`: about 480 MB); if the connection stalls, the download resumes where it stopped.

> reel-lens is a local (stdio) server: it works in desktop apps and CLIs on your computer, not in the Claude mobile app or on claude.ai in the browser.

## Tools

| Tool | What it does |
|---|---|
| `watch_video(url, frames?, language?, transcribe?)` | Fetch a link and return metadata, caption, transcript and still frames |
| `watch_file(path, frames?, language?, transcribe?)` | The same for a video file on your computer, e.g. a screen recording |
| `frames_at(path, seconds)` | Still frames at exact moments, to look closer at something |

Ideas for prompts:

- *"Summarize this TikTok and list every product shown."*
- *"Is the claim in this reel true? Check the transcript."*
- *"Translate what is said in this video into English."*
- *"Write down the recipe from this Short with amounts."*
- *"Show me the moment at 0:42 again, what does the screen say?"*

## How fast is it?

Measured on one Windows 11 PC, CPU only, with the default model `small`:

| Video | Download | Transcript |
|---|---|---|
| 16 s Instagram Reel | 3–5 s | 4 s |
| 41 s X video | 2–4 s | 4 s |
| 9:38 min YouTube video (1080p) | 51 s | 130 s |

On computer-generated German test speech (53 s, once clean and once with loud noise), `small` got 0 % and 4 % of the words wrong, `medium` 1 % and 3 %. `medium` took 2.5 times as long and is a 1.5 GB download instead of 480 MB. That is why `small` is the default. Try `medium` for dialects, fast speech or noisy audio.

## Configuration

Set environment variables in the `env` block of your MCP config.

| Variable | Default | Meaning |
|---|---|---|
| `REEL_LENS_WHISPER_MODEL` | `small` | `tiny`, `base`, `small`, `medium`, `large-v3`. Bigger is more accurate but slower. |
| `REEL_LENS_WHISPER_DEVICE` | `auto` | `auto` uses an NVIDIA GPU if its CUDA 12 libraries are installed, otherwise the CPU. Or set `cpu` or `cuda`. |
| `REEL_LENS_WHISPER_COMPUTE` | `int8` | Precision; `int8` is fastest on CPU |
| `REEL_LENS_COOKIES_FROM_BROWSER` | – | e.g. `firefox`, for sites that need you to be logged in |
| `REEL_LENS_COOKIES_FILE` | – | Path to a `cookies.txt` instead |
| `REEL_LENS_KEEP_HOURS` | `24` | Downloaded videos are deleted after this many hours (`0` keeps them) |
| `REEL_LENS_MAX_MINUTES` | `20` | Longer videos are refused |
| `REEL_LENS_MAX_FILESIZE_MB` | `500` | Larger files are not downloaded |
| `REEL_LENS_FRAME_MAX_SIDE` | `1024` | Longest side of still frames in pixels |
| `REEL_LENS_CACHE` | `~/.cache/reel-lens` | Where videos, transcripts and models are kept (Windows: `%USERPROFILE%\.cache\reel-lens`) |

Example:

```json
"env": { "REEL_LENS_WHISPER_MODEL": "medium", "REEL_LENS_COOKIES_FROM_BROWSER": "firefox" }
```

## Troubleshooting

**"login required" or "rate-limit" (Instagram, X, Reddit, …)** Log in to the site in Firefox and set `REEL_LENS_COOKIES_FROM_BROWSER=firefox`. On Windows yt-dlp often can't read Chrome's cookies. Or save the video yourself and use `watch_file`. Cookies are credentials: never share or commit a `cookies.txt`.

**A site suddenly stops working** Sites change often and yt-dlp follows quickly. With uvx, run `uvx --refresh --from git+https://github.com/selim163/reel-lens-mcp reel-lens-mcp` once to pick up the newest version.

**Transcription is slow** Use `REEL_LENS_WHISPER_MODEL=base`, or an NVIDIA GPU with `REEL_LENS_WHISPER_DEVICE=cuda` (needs NVIDIA's CUDA 12 and cuDNN 9 libraries).

**The transcript is nonsense** Over music without speech Whisper sometimes invents words. reel-lens marks such lines as `(unsure)` and tells Claude to rely on the frames and caption.

## How it works

```text
link ──► yt-dlp ──► video in local cache ──┬─► PyAV ──────────► still frames (JPEG)
                                           ├─► faster-whisper ─► transcript with timestamps
                                           └─► metadata ───────► creator, caption, stats
                                                   │
                                     MCP (stdio) ◄─┘──► Claude
```

Nothing leaves your machine except the download itself. Videos are cleaned up after 24 hours by default; transcripts are cached so follow-up questions are instant.

Captions and transcripts come from strangers. reel-lens hands them to Claude inside a clearly marked block labelled as untrusted data, so that instructions hidden in a video are reported rather than followed.

## Development

```bash
git clone https://github.com/selim163/reel-lens-mcp
cd reel-lens-mcp
uv sync
uv run --extra dev pytest -q
```

The test suite runs offline and creates its own test clips. See [CONTRIBUTING.md](CONTRIBUTING.md). Pull requests are welcome!

**Helping with an AI assistant?** [CONTRIBUTING.md](CONTRIBUTING.md#contributing-with-an-ai-assistant) lets you choose how to help (report a problem, test on your computer, small fix, new feature) and has a ready-made prompt for each. [AGENTS.md](AGENTS.md) prepares any AI coding assistant for this repository.

## Responsible use

reel-lens is made for understanding videos, not for collecting or redistributing them. Only use it with content you are allowed to access, respect the creators' rights and the terms of the sites you use, and don't share downloaded material. You are responsible for how you use it.

## License

[MIT](LICENSE). Dependencies have their own licenses (yt-dlp: Unlicense, faster-whisper: MIT, PyAV: BSD, Pillow: MIT-CMU, NumPy: BSD, MCP SDK: MIT); the ffmpeg binary shipped by imageio-ffmpeg is LGPL/GPL.