Halfsize logo

Halfsize

Compresses local videos to target sizes with FFmpeg, then reports VMAF and SSIM quality scores through one MCP tool.

Install Halfsize

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "halfsize": {
      "command": "npx",
      "args": [
        "-y",
        "halfsize"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y halfsize

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

halfsize MCP server gives AI agents a local video-compression tool backed by FFmpeg. Its single `compress_video` tool accepts an input file, target size, optional output path and codec, and can verify the result with the same JSON report used by the CLI. It calculates a bitrate budget, may reduce resolution, performs a two-pass encode, and measures VMAF and SSIM. Reach for it when an agent needs to fit a video within a platform limit without uploading the file.

Use cases

  • Compress a video to a Discord, WhatsApp, or WeChat limit
  • Fit a local recording within a custom file-size target
  • Verify compression quality with VMAF and SSIM
  • Prepare videos for automated CI workflows

Key features

  • Local FFmpeg-based video compression
  • Exact or preset target-size encoding
  • Two-pass bitrate planning
  • Automatic resolution selection
  • VMAF and SSIM quality verification
  • HDR tone mapping

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

5/5 checks healthy over the last 12d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · halfsize (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars145Stargazers on the source repository.
npm downloads3.4kPackage downloads in the last 30 days.
Last commit3d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Halfsize works

What halfsize does

halfsize exposes local video compression to MCP-compatible AI clients. The server uses FFmpeg and applies the same processing flow as the command-line interface: inspect the source, calculate a size-constrained encoding plan, encode the video, and produce a machine-readable quality report.

The target can be an explicit size such as 25 MB, or a platform-oriented limit supported by the CLI, including Discord, WeChat, WhatsApp, Gmail, Outlook, and X/Twitter. Compression happens on the machine running the server, so the input video is not sent to an external upload service.

How it works

Before encoding, halfsize reads the video's duration, dimensions, frame rate, audio bitrate, rotation, and HDR metadata. It derives the available total bitrate from the requested byte limit and duration, subtracting audio and container overhead. The plan can select a smaller output resolution when the target requires it.

Encoding uses a two-pass process. HDR input is tone-mapped, and the completed file can be checked with VMAF and SSIM. The report includes the output size, target comparison, compression ratio, and quality measurements, allowing an agent to relay whether the result meets the requested limit and how much visual quality changed.

Setup and configuration

Run the server through the npm package with a stdio configuration:

config.json
{
  "mcpServers": {
    "halfsize": {
      "command": "npx",
      "args": ["-y", "halfsize", "--mcp"]
    }
  }
}

Node.js 18 or newer is required for the npm installation. FFmpeg is bundled during the first install; if that download is unavailable, halfsize can use an FFmpeg installation already present on the system. The server is stdio-only: it does not open a network port or run as a daemon.

A Windows executable is also available and combines the CLI, local web app, and MCP server without requiring Node.js. The full package includes FFmpeg; a smaller package can download FFmpeg into the user's cache when initialized.

Tools and capabilities

The MCP interface provides one tool:

  • compress_video(input, target, output?, codec?, verify?): compresses a local video to the requested target, optionally chooses an output path and codec, and optionally verifies the result.

The tool uses the same JSON report as the CLI. The command-line interface also supports H.265 output, dry-run planning, multiple input files, and preset platform limits, but the MCP surface is centered on the single compression operation.

Limitations and notes

The MCP transport is limited to stdio, so clients must launch the process rather than connect to a hosted endpoint. Processing depends on local FFmpeg availability, either from the package's download or from the system. Extremely small targets may require resolution reduction, and the quality report reflects the trade-off created by the requested size.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Halfsize

halfsize is an MCP server that connects AI agents to local FFmpeg-based video compression. Its main tool, `compress_video`, accepts an input file and target size, optionally selects an output path and codec, and can verify the result with VMAF, SSIM, and a JSON quality report.

Install it by configuring an MCP client to run `npx -y halfsize --mcp`. Node.js 18 or newer is required, and FFmpeg is bundled during the first install when available.

Yes. Claude Desktop is named as a supported client configuration for the stdio MCP server. Add the `halfsize` server with `npx` as the command and `-y halfsize --mcp` as its arguments.

Yes. Compression runs locally on the machine hosting halfsize, and the server uses stdio without opening a network port or sending the video to an online service.

The `compress_video` tool returns the same JSON report used by the CLI, including the resulting size and quality measurements. Verification can report VMAF and SSIM alongside the compression result.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHalfsize AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/halfsize?style=directory)](https://allmcps.com/mcp/halfsize)
HTML Embed
<a href="https://allmcps.com/mcp/halfsize"><img src="https://allmcps.com/api/badge/halfsize?style=directory" alt="Halfsize on AllMCPs" /></a>