halfsize — Claude Code MCP server: exact-size video compression
halfsize is an MCP server for Claude Code that compresses videos to a specified size and measures the result with VMAF and SSIM. Files stay local and FFmpeg handles the encoding.
MIT ★ 123 updated 2026-11-15
claude mcp add halfsize -- npx -y halfsizeWhat halfsize does
halfsize compresses a video to a target size, then reports quality scores from VMAF and SSIM. It chooses a bitrate and resolution before encoding in two passes. Processing happens locally; the video is not uploaded to a third-party server.
Running it through npx requires Node.js 18 or later. FFmpeg comes with the install; if it cannot be downloaded, halfsize uses a system installation instead. On Windows, halfsize.exe from the archive that includes FFmpeg runs without Node.js.
What it helps with
- compressing video to a target size
- checking video quality after compression
- fitting a video within a Discord or WhatsApp limit
- getting a JSON compression report
Example prompts for the agent
- Compress
video.mp4to 25 MB and report its quality scores. - Prepare
recording.mp4for Discord’s file limit. - Compress several videos to 10 MB and return the results as JSON.
How to install halfsize
Platform CLI
claude mcp add halfsize -- npx -y halfsizePlatform CLI
codex mcp add halfsize -- npx -y halfsizeConfig file
{
"mcpServers": {
"halfsize": {
"command": "npx",
"args": [
"-y",
"halfsize"
]
}
}
}Config file
{
"servers": {
"halfsize": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"halfsize"
]
}
}
}Platform CLI
gemini mcp add halfsize npx -y halfsizeStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about halfsize
How do I install halfsize in Claude Code?
Run claude mcp add halfsize -- npx -y halfsize.
What does halfsize do?
It uses FFmpeg to compress videos locally to a target size, then measures quality with VMAF and SSIM.
What does halfsize need to run?
Running it through npx requires Node.js 18 or later and FFmpeg. FFmpeg is bundled with the install; if its download fails, halfsize uses a system installation.