lazy-media-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lazy-media-mcp prepare /Users/me/demo.mp4 for AI vision"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lazy-media-mcp
Local Model Context Protocol (MCP) server that compresses images/videos and prepares media for AI vision agents.
Designed for coding agents (Claude Code, Codex, Grok, and other MCP clients): returns file paths only (no inline base64), so large screenshots and demos stay within tool limits.
Keywords: MCP server, image compression, video compression, ffmpeg, sharp, AI vision prep, frame extraction, Claude, Codex.
Why this exists
Large screenshots and long demos burn context and often fail tool limits. This server:
Shrinks images to a sensible size/quality
Turns videos into frame packs agents can actually open
Uses JPEG by default for widest agent compatibility
WebP / WebM — do they help AI “read better”?
Format | Role | Default here? |
JPEG | Best universal image input for local agents | Yes |
PNG | Sharper for OCR / UI text / alpha |
|
WebP | Smaller files when the host supports it | Opt-in only |
MP4 | Storage/sharing re-encode | Video compress default |
WebM | Optional container | Opt-in via |
Format does not improve model understanding by itself. Resolution, blur, and compression artifacts matter more. Over-aggressive WebP/JPEG hurts OCR.
Local agents usually do not natively watch WebM/MP4. Prefer prepare_for_ai / video_extract_frames → JPEG paths.
Related MCP server: mcp-media-engine
Requirements
Node.js ≥ 20
ffmpeg + ffprobe on
PATH(video tools)
# macOS
brew install ffmpegInstall / run
From npm
npx -y lazy-media-mcp
# or
npm install -g lazy-media-mcpFrom source
git clone https://github.com/leaf76/lazy-media-mcp.git
cd lazy-media-mcp
npm install
npm run build
npm test
node dist/cli.js # stdio MCPMCP client config (example)
{
"mcpServers": {
"lazy-media": {
"command": "node",
"args": ["/absolute/path/to/lazy-media-mcp/dist/cli.js"],
"env": {
"MEDIA_ALLOWED_ROOTS": "/Users/you,/Users/you/WorkSpace",
"MEDIA_WORKDIR": "/Users/you/.cache/lazy-media-mcp/jobs"
}
}
}
}Tools
Tool | Purpose |
| Metadata only |
| Resize/compress image → workdir path |
| Re-encode video (default MP4) |
| Extract frames for vision |
| One-shot profile pipeline (recommended) |
| Delete a job directory by |
prepare_for_ai profiles
Profile | Behavior |
| Image → JPEG ≤1536 edge; video → up to 10 JPEG frames |
| Prefer PNG / higher quality |
| Smaller edges, fewer frames |
| Higher quality + optional compressed MP4 |
Environment
Variable | Default |
|
|
|
|
| 500MB |
| 200MB |
| 24 |
| 120000 |
|
|
|
|
Security
Path allowlist (realpath checks)
Input/output size caps
Process timeout
ffmpeg/ffprobe invoked with argv arrays only (no shell interpolation)
Outputs go to workdir; originals are not overwritten
Cleanup only deletes direct children of workdir by
job_id
Typical agent flow
1. prepare_for_ai({ path: "/path/to/demo.mp4", profile: "ai_vision" })
2. Read returned outputs[].path frame files in the next vision step
3. media_cleanup({ job_id }) when done (optional)Related
lazy-desktop-mcp — desktop computer-use MCP
lazy_mobile_mcp — Android/iOS mobile automation MCP
session-collab-mcp — multi-session collaboration MCP
License
MIT © leaf76
Available Tools
6 toolsimage_compressC
Compress/resize an image to a job workdir. Default format is JPEG for local agent compatibility. Returns output file paths only.
Inputs: path (required), format, job_id, quality, +2 more.
media_cleanupC
Delete a previous job directory under the media workdir by job_id.
Inputs: job_id (required).
media_inspectA
Inspect image or video metadata (dimensions, codecs, duration, size). Does not modify files.
Inputs: path (required).
prepare_for_aiA
One-shot AI prep: images are resized/compressed; videos become a frame pack (default). Paths only — no inline base64.
Inputs: path (required), job_id, profile.
video_compressA
Re-encode a video (default MP4/H.264). WebM is optional. Prefer video_extract_frames or prepare_for_ai for agent vision.
Inputs: path (required), crf, job_id, container, +2 more.
video_extract_framesA
Extract frames from a video into JPEG/PNG/WebP files for AI vision agents. Returns file paths only.
Inputs: path (required), mode, format, job_id, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: AI preparation, metadata inspection, compression for images and videos separately, frame extraction, and cleanup. No overlapping functionality.
Most tools follow a noun_verb pattern (media_inspect, image_compress, video_compress, video_extract_frames, media_cleanup), but prepare_for_ai breaks the pattern with a verb_preposition_noun structure. Still, all use snake_case and are readable.
With 6 tools, the server is well-scoped for media processing and AI preparation. Each tool addresses a specific need without redundancy or excessive granularity.
Covers core operations (compression, inspection, frame extraction, cleanup, and one-shot AI prep). Missing a list_jobs tool to retrieve previous job IDs, but the main workflow is supported.
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
MCP server for Wan AI video generation
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for image and video processing that allows AI assistants to resize, convert, compress, and analyze media files locally without API keys. It supports a wide range of formats and provides tools for tasks such as metadata removal, frame extraction, and video conversion.135MIT
- AlicenseAqualityCmaintenanceMCP server for AI-powered image, audio, and video generation, enabling media creation directly from Claude, Cursor, and other MCP clients.1144 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server exposing headless ffmpeg operations for video, audio, and image processing via auto-generated typed tools, enabling agentic media file manipulation.GPL 3.0

micompress-mcpofficial
AlicenseNot gradedqualityBmaintenanceAn MCP server that lets AI agents compress images, PDFs, video, audio, documents, and archives, writing the smaller versions back to disk via the MiCompress service.10 npmMIT