MCP server for local bulk image compression and optimisation

MCP server for local bulk image compression and optimisation

mcp-compressfile•bylexusmarchuk

A Model Context Protocol server that lets AI agents bulk compress, convert, resize, watermark and analyse local images, with results staying on the user's machine.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Exposes 15 tools covering the full image optimisation workflow, including compression, conversion, resizing, cropping, rotation and watermarking.
  • •Supports bulk operations across directories using glob patterns.
  • •Handles AVIF, WebP, JPEG and PNG output, with lossy or lossless compression depending on format.
  • •Includes analysis tools for finding duplicates via perceptual hashing and estimating savings before writing files.

BEST FOR

  • •AI agent workflows that need to batch-optimise a folder of images in a chosen format and quality.
  • •Locating oversized images or duplicate photos before starting a compression job.
  • •Estimating space savings and choosing an output format before converting a batch.

ABOUT MCP-COMPRESSFILE

MCP server for local bulk image compression and optimisation is cataloged as an MCP server attributed to lexusmarchuk. A Model Context Protocol server that lets AI agents bulk compress, convert, resize, watermark and analyse local images, with results staying on the user's machine. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for local bulk image compression and optimisation are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server upload my images anywhere?

No; all processing runs locally via Pillow and no image data is uploaded to any server.

Can I preview compression savings without writing files?

Yes; the estimate_savings tool performs a dry-run prediction across a batch without writing files to disk.

Upstream README

View this exact version on GitHub

README.md · 30774f9027f6 · Fetched 2026-11-13 13:31:15 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

mcp-compressfile

Official Model Context Protocol (MCP) server for compressfile.pro.
Give any MCP-compatible AI agent (Claude, Cursor, etc.) the ability to bulk compress, convert, resize, watermark, and analyse images — entirely on your local machine.


✨ Features

  • 15 AI tools covering the full image optimisation workflow
  • 4 modern formats — AVIF, WebP, JPEG, PNG
  • Lossy & lossless compression with per-format tuned parameters
  • Bulk operations via glob patterns (/data/**/*.png)
  • Transparency handling — alpha composited correctly for every format
  • EXIF auto-rotation applied before any transformation
  • Perceptual duplicate detection using average hashing
  • Dry-run estimation — predict savings before writing any files
  • Privacy first — your images never leave your machine

🌐 No Installation? Use the Web Version

Don't need AI integration? compressfile.pro offers the same compression and conversion directly in your browser — no upload, no account, no install required.

compressfile.promcp-compressfile
Works in browser✅—
No install needed✅—
AI agent integration—✅
Bulk via glob patterns—✅
Runs on local files—✅
Images leave your machine❌ Never❌ Never

🛠 Installation

pip install mcp[server] Pillow pillow-avif-plugin imagehash

Clone this repo and point Claude Desktop at server.py (see Configuration).

Option B — Docker

git clone https://github.com/yourname/mcp-compressfile
cd mcp-compressfile
docker build -t mcp-compressfile .

⚙️ Configuration

Open Claude Desktop → Settings → Developer → Edit Config and add one of the blocks below.

Python

{
  "mcpServers": {
    "mcp-compressfile": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

Docker

{
  "mcpServers": {
    "mcp-compressfile": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/your/images/folder:/data",
        "mcp-compressfile"
      ]
    }
  }
}

Windows users: use forward slashes in paths (C:/Users/You/Pictures).
With Docker, pass /data/... paths to the tools — that is the mount point inside the container.

Restart Claude Desktop after editing the config. A 🔨 hammer icon in the chat input confirms the tools are loaded.


🤖 How to Use in Claude

Once configured, just describe what you want in plain English. Claude picks the right tools, chains them automatically, and reports back with a summary.

1. Type a prompt — Claude identifies the files and plans the job

Claude identifying JPEG files and planning compression

2. Claude executes the batch and returns a full summary

Claude compression results showing 7 files, 4.4 MB → 657 KB, ~85% savings

In this example, a single prompt converted 7 JPEGs to WebP at quality 80,
reducing total size from 4.4 MB to 657 KB — an 85% reduction.


🧰 Tools

File & Folder

ToolDescription
list_filesList all supported images in a directory with file sizes
find_large_imagesFind images above a KB threshold — ideal starting point for a compression job
compare_foldersDiff source vs output to see what's been processed and what's still pending
undo_last_batchDelete an output directory to retry with different settings (confirm=True required)

Analysis & Metadata

ToolDescription
get_image_infoFull metadata for a single file: dimensions, DPI, mode, and all EXIF fields
strip_metadataRemove all EXIF/IPTC/XMP data for privacy before publishing
find_duplicatesGroup near-identical images using perceptual hashing

Transformations

ToolDescription
bulk_compressCompress + convert + optional resize; EXIF orientation auto-corrected
bulk_resizeResize only, preserving format and aspect ratio
bulk_cropCrop a fixed pixel region from a batch; skips files where box exceeds bounds
bulk_rotateRotate by degrees and/or auto-correct EXIF orientation
bulk_watermarkStamp text onto images with configurable position, opacity, and font size

Reporting & Agent Helpers

ToolDescription
compression_reportAggregate stats after a job: total MB freed, per-format breakdown, per-file log
preview_settingsCompress one image at multiple quality levels to find the best trade-off
suggest_formatAnalyse images and recommend the best output format with reasoning
estimate_savingsDry-run prediction across a batch — no files written to disk

💬 Example Prompts

List all images in /data and tell me which ones are larger than 1 MB.
Suggest the best format for all files in /data/photos.
Estimate how much space I'd save converting /data/*.jpg to AVIF at quality 80.
Compress everything in /data/photos to WebP at quality 75, max 1920px wide,
and save to /data/output.
Find duplicate images in /data/vacation.
Add a "© compressfile.pro" watermark to all PNGs in /data, bottom-right, 50% opacity.
Show me a compression preview for /data/hero.jpg at quality 60, 75, 85, and 95.
Generate a full compression report comparing /data/originals and /data/output.

📦 Supported Formats

FormatLossyLosslessTransparencyNotes
AVIF✅—✅Best compression ratio for photos
WebP✅✅✅Best universal format
JPEG✅——Alpha composited onto white background
PNG—✅✅Best for graphics and flat illustrations

Supported input types: .png .jpg .jpeg .webp .tiff .bmp .avif


🔒 Privacy

All processing runs locally via Pillow. No image data is uploaded to any server.
This MCP server is a local companion to compressfile.pro, which provides the same functionality in-browser without any server upload.


📋 Requirements

mcp[server]
Pillow
pillow-avif-plugin
imagehash

Python 3.9 or later.


📄 License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for local bulk image compression and optimisation from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-compressfile)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools