local-image-convert-mcp
A local MCP server for converting images privately on your machine, with single-file and batch tools.
Convert one image to JPEG, PNG, WebP, or AVIF with adjustable quality and optional metadata retention.
Batch-convert listed files and/or a non-recursive folder, either as separate outputs or a streamed ZIP archive.
Supports JPEG, PNG, WebP, AVIF, GIF first frame, TIFF, and HEIC/HEIF inputs.
Runs entirely locally: no uploads, no telemetry, and HEIC decoding via bundled WebAssembly.
Strips EXIF/GPS metadata by default and auto-rotates images.
Never overwrites existing outputs; adds numbered suffixes instead.
Restricts all reads/writes to a required
--rootdirectory with path and symlink protections.Enforces limits: 100 MB input, 100 megapixels, 200 batch files per call.
Reports per-file errors in batch mode and skips bad files.
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., "@local-image-convert-mcp convert the HEIC photos in my photos folder to JPEG"
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.
local-image-convert-mcp
A local Model Context Protocol server that converts images on your own machine. Your AI assistant can turn HEIC photos into JPEG, shrink PNGs to WebP or AVIF, or convert a whole folder into a zip, without uploading a single file.
Status: pre-release (0.1.0). Not yet published to npm.
Privacy promise
Nothing leaves your device. The server makes no network requests at runtime (installing or launching via npx downloads the package from the npm registry). HEIC decoding uses a WebAssembly build of libheif that ships inside the npm package; nothing is downloaded on demand.
No telemetry, no analytics, no logs sent anywhere. Diagnostics go only to stderr on your machine.
Metadata is stripped by default. Images are auto-rotated, then EXIF data (camera, GPS location, timestamps) is removed from outputs. Pass
keepMetadata: trueto keep it.Restricted file access. The server only reads and writes inside one allowed root directory that you must set with
--root; it refuses to start without one, and refuses a filesystem root (/,C:\), your home directory, or any folder that contains it (such as/homeor/Users), and a root starting with an unexpanded~(as happens in JSON configs; use the full path); paths are compared after resolving symlinks...traversal, drive-relative paths, NTFS alternate data streams, reserved Windows device names (CON, PRN, AUX, NUL, COM1-9, LPT1-9, CONIN$, CONOUT$) and symlinks that resolve outside the root are rejected. Right before and after each write the output folder is re-checked. If something swaps it for a link to another location, the write is refused; if the swap happens in the instant around opening the file, the file is emptied through its open handle and anOUTPUT_DIR_CHANGED_FILE_LEFTerror is returned with its location (on Linux via/proc/self/fd; on macOS and Windows the location may be unknown). If a write fails for another reason, the file is emptied andWRITE_FAILED_FILE_LEFTis returned with its path. The server never deletes files on error paths, because a name can be swapped between any check and the delete; remove leftover empty files yourself. A batch ZIP is only created after the first image converts successfully. Do not point--rootat a folder that untrusted programs can modify.Never overwrites. If
photo.webpexists, the result is written asphoto-1.webp.
Related MCP server: Lathe
Tools
Tool | What it does |
| Convert one file. Inputs: |
| Convert a list of files ( |
Supported inputs: JPEG, PNG, WebP, AVIF, GIF (first frame), TIFF, HEIC/HEIF.
Both tools are annotated readOnlyHint: false, destructiveHint: false, openWorldHint: false.
Install
Requires Node.js 20 or newer.
npx -y local-image-convert-mcp --root ~/Pictures/convertUntil the package is published, run it from a clone:
git clone https://github.com/swtormy-agents/local-image-convert-mcp
cd local-image-convert-mcp && npm ci && npm run build
node dist/index.js --root ~/Pictures/convertConfigure your MCP client
Most clients (Claude Desktop, Cursor, VS Code, and others) accept a JSON config like this:
{
"mcpServers": {
"image-convert": {
"command": "npx",
"args": ["-y", "local-image-convert-mcp", "--root", "/Users/you/Pictures/convert"]
}
}
}--root is required and should be an absolute path. MCP clients may start the server in an unexpected working directory. Alternatively set the environment variable LOCAL_IMAGE_CONVERT_ROOT (most clients accept an "env" object next to "args").
Options
Flag | Environment variable | Default | Meaning |
|
| none (required) | The only directory the server may read from and write to. A filesystem root ( |
|
| 100 | Largest input file |
|
| 100 | Largest decoded image (protects against decompression bombs) |
|
| 200 | Most files in one |
|
| off | Kill-switch: disable HEIC/HEIF decoding (libheif is then never loaded) |
Errors
Errors explain what went wrong and what to do next, for example:
Path "../secret.png" is outside the allowed root (/Users/you/Pictures). Use a path inside it, or restart the server with a different --root.
Development
npm ci
npm test # builds, then runs unit tests and a stdio smoke testWebsite
A free in-browser converter by the same team: noclaudkit.com/image-converter
Attribution and licences
This project is MIT-licensed. HEIC decoding uses libheif and libde265 via the unmodified npm package libheif-js (LGPL-3.0), installed as a separate dependency you can replace. Raster processing uses sharp (Apache-2.0) with libvips (LGPL-3.0). HEVC/HEIC decoding only; this package never encodes HEVC or HEIC. HEVC may be covered by patents in some countries. No patent licence is granted by this project or its authors; you are responsible for any patent licences required where you use it. Full details, source links and licence texts: THIRD_PARTY_NOTICES.md and licenses/.
Disclaimer
This is an independent open-source project. Claude and Claude Desktop are trademarks of Anthropic, PBC. Cursor is a trademark of Anysphere, Inc. Visual Studio Code and VS Code are trademarks of Microsoft Corporation. All other names are trademarks of their respective owners and are used only to describe compatibility. Format names (HEIC, HEIF, WebP, AVIF, JPEG, PNG) are used descriptively. This project is not affiliated with, endorsed by, or sponsored by Anthropic, Anysphere, Microsoft or any other MCP client vendor. The software is provided "as is", without warranty of any kind (see LICENSE).
Available Tools
2 toolsbatch_convertBatch convert imagesA
Convert several local images at once, from a list of paths and/or a directory (non-recursive). Writes the results as separate files or as one .zip archive into outputDir. Continues past bad files and reports each error. Runs entirely on this machine. Limit: 200 files per call.
Inputs: format (required), outputDir (required), zip, inputs, +4 more.
convert_imageConvert imageA
Convert one local image (JPEG, PNG, WebP, AVIF, GIF, TIFF, HEIC/HEIF) to jpeg, png, webp or avif. Runs entirely on this machine; nothing is uploaded. Paths are relative to the allowed root (/app). Writes a new file and never overwrites existing ones. Returns the output path and sizes.
Inputs: input (required), format (required), quality, outputDir, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
convert_image and batch_convert are clearly distinguished by single-file vs multi-file operation. The descriptions make the boundary explicit (one image vs list/directory, separate files vs zip).
Both names use snake_case and follow an action_object pattern (convert_image, batch_convert). The deviation is minor: 'batch' is a qualifier rather than a strict verb_noun parallel, but it reads naturally.
With only 2 tools the surface is thin, but for a focused image conversion server the single vs batch split is a reasonable minimal scope. It is borderline rather than clearly under-provisioned.
Core conversion is covered, but there is no tool to inspect image metadata, validate paths, or list supported formats/roots. For a local conversion domain, basic CRUD-style operations beyond convert are absent, leaving some discovery dead ends.
Maintenance
Related MCP Connectors
Image and PDF toolkit: convert to AVIF/WebP/JXL, resize, crop, remove backgrounds, optimize PDFs.
Resize, compress, convert, crop, rotate, strip EXIF and watermark one image or a whole zip. Handles HEIC; outputs JPEG, PNG, WebP or AVIF; reports which metadata was removed. Free within a daily quota, no API key. The same tools run free in the browser at byondr.co/image-tools.
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to process images locally via file paths—converting, resizing, removing backgrounds, smart cropping, upscaling, reading or stripping metadata, and batch processing—without files ever leaving the device.MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to inspect, convert, resize, crop, merge, extract and OCR local images, PDFs, audio and video entirely on the user's machine. Modules can be toggled individually, and all operations stay within a sandboxed working folder with atomic writes and no data sent anywhere.21MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to remove backgrounds, compress, resize, crop, AI-upscale, and strip metadata from images entirely on the local computer, so files never leave it.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to inspect, convert, and optimize image assets within project repositories while preserving transparency, sandboxing operations to the workspace root, stripping metadata with verifiable clean certificates, and reverting conversions through a local journal.22 npmMIT