Skip to main content
Glama

frame-grab-mcp

CI License: MIT MCP

Give your AI assistant eyes on your videos.

frame-grab-mcp is a Model Context Protocol server that returns video frames as images — so Claude and other vision models can actually look at your footage. Grab a frame, sample a clip, see the whole video as one contact sheet, detect every cut, auto-pick the sharpest thumbnail and export it at the right size for YouTube, Reels, TikTok or LinkedIn, or make a GIF.

Runs locally with ffmpeg. Your footage never leaves your machine.

You:    Look at ~/Exports/reel_v4.mp4 and tell me where the pacing drags.
Claude: [contact sheet + scene detection] 31 cuts in 42s (avg 1.4s), but shots 18–20
        run 4.1s, 3.8s and 5.2s — that's the product demo section around 0:24–0:37.
        Everything else cuts every 1–1.5s, so that stretch will feel slow.
You:    Make a YouTube thumbnail from the sharpest frame.
Claude: Saved reel_v4_youtube_thumb.jpg (1280x720, 214 KB) from 00:00:08.4.
        Here are 4 runner-ups if you'd prefer a different shot.

Tools

Tool

Returns

What it does

grab_frame

🖼 image

Frame at a timestamp (12.5, 1:23, 00:01:23.400, 50%). Optionally saves full-res JPG/PNG/WebP.

sample_frames

🖼 images

1–24 frames evenly spaced (or at exact times) across the clip or a range.

contact_sheet

🖼 image

One grid of evenly spaced frames with timestamp labels and a title bar. The cheapest way to "watch" a video.

detect_scenes

table + 🖼

Every cut with start/end/length, shots per minute, shortest/longest shot, a sheet of each scene's first frame, optional CSV.

make_thumbnail

🖼 image(s)

Platform-sized thumbnail. Auto-pick rejects black/white/flat frames and ranks by sharpness, contrast, exposure and color, then shows runner-ups. Or pass at.

extract_frames

file list

Save stills to a folder: every N seconds, N evenly spaced, one per scene, or exact timestamps.

make_preview

file + 🖼

Optimized looping GIF (custom palette), silent MP4 loop, or animated WebP from a section.

check_setup

text

Confirms ffmpeg/ffprobe, required filters, and the label font.

Thumbnail presets

id

Size

Notes

youtube

1280x720

Auto-compressed to stay under YouTube's 2 MB limit

youtube_shorts

1080x1920

instagram_reels_cover

1080x1920

The profile grid shows the middle 3:4 — keep the subject there

instagram_grid

1080x1440

3:4 profile grid tile

instagram_feed

1080x1350

4:5

tiktok_cover

1080x1920

square

1080x1080

x

1600x900

linkedin

1200x627

Or pass custom width / height. Cropping uses anchor_x / anchor_y (0 = left/top, 1 = right/bottom) so you can keep a subject who isn't centered.


Related MCP server: video-tools-mcp

Requirements

  • Node.js 20+

  • ffmpeg + ffprobe

    • macOS: brew install ffmpeg · Ubuntu: sudo apt install ffmpeg · Windows: winget install ffmpeg

  • A vision-capable MCP client (Claude Desktop, Claude Code, Cursor…) to see the returned images.

Binaries are found via FFMPEG_PATH / FFPROBE_PATH, then PATH, then common folders like /opt/homebrew/bin (Claude Desktop on macOS uses a minimal PATH). Timestamp labels use a system font (Arial/Helvetica on macOS, DejaVu on Linux, Arial on Windows); set FRAME_GRAB_FONT=/path/to/font.ttf to choose your own. If your ffmpeg can't draw text, sheets are made without labels.

Install

Claude Desktop

Settings → Developer → Edit Config:

{
  "mcpServers": {
    "frame-grab": {
      "command": "npx",
      "args": ["-y", "github:anshumanofficial2002-cpu/frame-grab-mcp"]
    }
  }
}

Claude Code

claude mcp add frame-grab -- npx -y github:anshumanofficial2002-cpu/frame-grab-mcp

Cursor / Windsurf / VS Code / other clients

{
  "frame-grab": {
    "command": "npx",
    "args": ["-y", "github:anshumanofficial2002-cpu/frame-grab-mcp"]
  }
}

From source

git clone https://github.com/anshumanofficial2002-cpu/frame-grab-mcp.git
cd frame-grab-mcp && npm install && npm run build
# point your client at: node /absolute/path/to/frame-grab-mcp/dist/index.js

Example prompts

  • "What's on screen at 0:42 in interview_cam_b.mov? Is the lower third readable?"

  • "Make a 5×4 contact sheet of client_raw.mp4 and tell me which shots are usable b-roll."

  • "Count the cuts in this reference reel and give me a shot list with timings."

  • "Pick the best frame from vlog_ep3.mp4 for a YouTube thumbnail — the subject is on the right, keep them in frame."

  • "Make a Reels cover from 00:12.3."

  • "Export one still per scene from montage.mp4 into ~/Desktop/stills as PNG."

  • "Make a 3-second GIF of the logo reveal at 0:05 for X, under 5 MB."

  • "Sample 12 frames from the first minute and check whether my white balance shifts between shots."


Tool reference

Timestamps everywhere accept seconds (12.5), MM:SS, HH:MM:SS.mmm, or a percentage of the duration ("75%"). Range params start / end limit any analysis to part of the clip.

grab_frame

at ("50%"), max_width (1024), format (jpeg|png), save_path, overwrite.

sample_frames

count (8, max 24) or times (list), start, end, max_width (512).

contact_sheet

cols (4), rows (4), start, end, tile_width (320), labels (true), title (true), background (0x111111), font_file, save_path, overwrite.

detect_scenes

threshold (0.3; lower = more sensitive), min_scene_seconds (0.4; ignores flash frames), start, end, include_sheet (true, up to 30 scenes), max_rows (200), csv_output_path, overwrite.

make_thumbnail

Param

Default

Notes

preset

youtube

See table above

width / height

—

Custom size

at

auto

Use this frame instead of auto-picking

start / end

whole clip

Where to look (auto mode skips the first/last 3% for titles and fades)

candidates

24

Frames evaluated

show_candidates

4

Runner-ups returned as images

anchor_x / anchor_y

0.5

Crop anchor

output_path

<name>_<preset>_thumb.jpg

.jpg, .png, .webp

quality

92

overwrite

false

extract_frames

output_folder, mode (count | interval | scenes | timestamps), count (12), interval_seconds, times, scene_threshold (0.3), start, end, format (jpg|png|webp), width, prefix, max_frames (200), overwrite. Files are named <prefix>_<HH-MM-SS-mmm>.<ext>.

make_preview

start (0), duration (4, max 60), output_path (<name>_preview.gif; .gif/.mp4/.webp), fps (12), width (480), colors (128), loop (true), dry_run, overwrite.


How it works

  • Frames are decoded with accurate input seeking (-ss before -i), auto-rotated, scaled with Lanczos, and piped straight back as JPEG/PNG — nothing touches disk unless you ask.

  • Scene detection: ffmpeg's select='gt(scene,T)' on a 320 px proxy for speed.

  • Thumbnail scoring: signalstats (brightness, contrast, saturation) and blurdetect (sharpness) on each candidate. Black, white, flat and detail-less frames are rejected.

  • Contact sheets: one ffmpeg graph with a fast seek per tile, tile for the grid and drawtext for labels. The title is drawn from a temp text file, so odd file names are safe.

  • GIFs: two-stage palette (palettegen + paletteuse) for small, clean files.

HDR footage is not tone-mapped, so frames from HDR clips (e.g. iPhone HDR video) can look washed out.

Safety

  • ffmpeg runs via spawn with argument arrays — no shell.

  • Existing files are never overwritten unless overwrite: true, and outputs can't replace the source video.

  • No network access, no telemetry.

Development

npm install
npm run build
npm test          # unit tests + end-to-end tests on a generated clip with known cuts
npm run inspect   # MCP Inspector

dist/ is committed so npx github:… works without a build; CI verifies it matches src/.

License

MIT © 2026 Anshuman

Available Tools

8 tools
check_setupCheck ffmpeg setupA
Read-only

Confirm ffmpeg/ffprobe are installed, that scene and blur detection filters exist, and which font is used for timestamp labels.

Inputs: no named parameters.

contact_sheetContact sheetB

One grid image of evenly spaced frames with timestamp labels and a title bar — the quickest way to see a whole video at a glance (review an edit, log b-roll, find a moment, describe a clip). Optionally saved as a JPG.

Inputs: path (required), end, cols, rows, +8 more.

detect_scenesDetect scene cutsA

Find hard cuts and big visual changes, and list every scene with start, end and length — for logging an edit, counting cuts (pacing), pulling a shot list from a reference video, or splitting a montage. Optionally returns a contact sheet of the first frame of each scene and writes CSV.

Inputs: path (required), end, start, max_rows, +5 more.

extract_framesExtract frames to a folderA

Save stills to a folder: every N seconds, N evenly spaced frames, one per detected scene, or at exact timestamps. Files are named with their timecode. Good for b-roll stills, storyboards, social carousels or feeding frames to other tools.

Inputs: path (required), output_folder (required), end, mode, +10 more.

grab_frameGrab a frameA

Return the frame at a timestamp as an image you can look at (e.g. 'what's on screen at 1:23?', 'is the logo legible here?'). Optionally also save it at full resolution as JPG, PNG or WebP.

Inputs: path (required), at, format, max_width, +2 more.

make_previewMake a GIF / looping previewA

Turn a section of a video into a looping preview: an optimized GIF (custom palette, small file), a silent MP4 loop, or animated WebP. For X/Slack/Notion/GitHub READMEs, client previews, or reaction clips. Returns the first frame so you can confirm the section.

Inputs: path (required), fps, loop, start, +6 more.

make_thumbnailMake a thumbnailA

Export a thumbnail sized for a platform (YouTube 1280x720, Reels/TikTok/Shorts cover 1080x1920, Instagram grid 3:4, feed 4:5, square, X, LinkedIn). Give at to use a specific frame, or leave it out and the tool samples the video, rejects black/white/flat frames, and picks the sharpest, best-exposed one — returning the top candidates so you can choose a different one. Crops to the aspect ratio with an adjustable anchor.

Inputs: path (required), at, end, start, +10 more.

sample_framesSample frames across a clipA
Read-only

Return several frames as separate images — evenly spaced across the clip (or a range), or at the exact times you list. Use it to review pacing, check continuity, read on-screen text, or describe what happens in a video. For a single overview image, contact_sheet is cheaper.

Inputs: path (required), end, count, start, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation4/5

    Each tool targets a distinct output form: a single returned frame (grab_frame), several returned frames (sample_frames), files on disk (extract_frames), one grid image (contact_sheet), scene list (detect_scenes), platform thumbnail (make_thumbnail), and looping preview (make_preview). The boundaries between grab_frame, sample_frames, extract_frames, and contact_sheet are all frame-oriented and could be momentarily confused, but the descriptions explicitly differentiate their outputs and costs.

    Naming Consistency4/5

    Almost all names follow a snake_case verb_noun pattern (grab_frame, sample_frames, extract_frames, detect_scenes, make_thumbnail, make_preview, check_setup). The only deviation is contact_sheet, which is a bare noun with no verb, but it remains readable and unambiguous.

    Tool Count5/5

    Eight tools is well-scoped for a video frame extraction/inspection server. Each tool covers a genuinely different workflow (setup check, single frame, sampling, bulk export, overview grid, scene detection, thumbnail, preview) with no filler.

    Completeness4/5

    The lifecycle from environment check through inspection, extraction, scene analysis, and social/preview export is well covered. The notable gap is a video metadata/probe tool (duration, resolution, fps) — check_setup confirms ffprobe exists but nothing exposes clip info, which agents would want before choosing timestamps.

    Related MCP Connectors

    Related MCP Servers