convert_to_webpLABSCO SUMMARY
The fallback engine is why it installs cleanly.
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.
What it is
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.
What you get
- One tool that converts a whole directory —
convert_to_webp, takingsrc(default.),quality0–100 (default 75),lossless,overwrite,threads(default CPU count),preserveMetaandflat - Two engines with automatic fallback — Google's
cwebpfrom libwebp-tools when available, Sharp in pure JavaScript when not - Three output modes —
.webpalongside the originals by default, originals replaced withoverwrite, or everything collected into one directory withflat - 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
Requirements
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.
Setup effort
Build from source — git clone https://github.com/mhe8mah/webp-batch-mcp.git
USE CASES
Shrinking a folder of site images
Convert the whole directory in one call, letting it use every core, and read the savings report.
Converting PNGs without losing anything
Turn on lossless mode, which the project recommends specifically for PNG sources.
Collecting output somewhere separate
Set the flat output directory so converted files land in one place instead of scattered beside the originals.
Keeping camera and color data
Enable metadata preservation so EXIF and ICC profiles survive the conversion.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/mhe8mah/webp-batch-mcp.git
cd webp-batch-mcp
npm install
npm run buildMCP Clients
Cursor
{
"mcpServers": {
"webp-batch": {
"command": "node",
"args": [
"<YOUR_PATH_TO_WEBP_BATCH_MCP>/dist/server.js"
]
}
}
}