Preferring `cwebp` gets you the best compression, but requiring it would mean a system dependency on every machine; falling back to Sharp means the install works whether or not libwebp-tools is there. `overwrite` replaces your originals — the default puts the `.webp` beside them, which is the safer starting point. Reported test results are 51% savings on a JPEG and 65% on a PNG, 53% average.
An MCP server exposing a single batch image converter, with a CLI alongside it. It scans a directory, converts what it finds to WebP across your CPU cores, and reports file sizes and savings.
- One tool that converts a whole directory — `convert_to_webp`, taking `src` (default `.`), `quality` 0–100 (default 75), `lossless`, `overwrite`, `threads` (default CPU count), `preserveMeta` and `flat`
- Two engines with automatic fallback — Google's `cwebp` from libwebp-tools when available, Sharp in pure JavaScript when not
- Three output modes — `.webp` alongside the originals by default, originals replaced with `overwrite`, or everything collected into one directory with `flat`
- EXIF and ICC metadata preserved on request
- Detailed reporting with file sizes and savings statistics, and real-time progress
- The same options as CLI flags — `--src`, `--quality`, `--lossless`, `--overwrite`, `--threads`, `--preserve-meta`, `--flat`
No account and no key — conversion happens locally. Clone it, `npm install` and `npm run build`, then point your client at `dist/server.js` with `node`; a Dockerfile is included with the images directory mounted at `/data`. The README's global install names `webp-batch-mcp`, which npm does not have; the manifest calls the package `webp-batch` 1.0.0 with the binary at `dist/cli.js`, MIT licensed.
