High-performance MCP microservice that compresses images (JPEG, PNG, WebP, AVIF) with smart quality control and batch support.
https://github.com/InhiblabCore/mcp-image-compressionStop sending users bloated images. This MCP server gives you production-ready image compression that works offline, handles multiple formats, and processes batches without breaking a sweat.
You know your images are too big. Users abandon slow-loading pages, and you're burning bandwidth on unoptimized assets. But current solutions force tough choices:
You need compression that's fast, works offline, and integrates cleanly into your existing workflow.
This MCP server handles the complexity so you don't have to. Built on Sharp (the fastest Node.js image processor), it automatically selects optimal compression parameters based on image content while giving you full control over quality and format.
Key advantages:
E-commerce product images:
# Original: 2.4MB PNG product shot
# Compressed: 180KB WebP at 85% quality
# Result: 92% size reduction, visually identical
Blog thumbnails batch:
# Process 50 images in parallel
# Average compression: 75% smaller files
# Processing time: 3.2 seconds total
User avatar uploads:
# Auto-resize to 400px max dimension
# Convert to optimized JPEG at 80% quality
# Typical result: 90% smaller than original
Standalone microservice for handling user uploads:
// Process user uploads on-the-fly
app.post('/upload', upload.single('image'), async (req, res) => {
const compressed = await compressImage({
file: req.file.buffer,
quality: 80,
format: 'webp',
maxWidth: 1920
});
// Save compressed version, serve immediately
res.send(compressed);
});
Embedded in build process for asset optimization:
// Optimize all product images during deployment
const images = await glob('./assets/products/*.{jpg,png}');
await compressImages(images, {
quality: 85,
format: 'webp',
outputDir: './dist/images'
});
Batch processing for content migration:
// Compress entire image library
const results = await compressBatch(imageUrls, {
quality: 75,
parallel: 10,
formats: ['webp', 'avif'] // Generate multiple formats
});
NPX for immediate use:
{
"mcpServers": {
"Image compression": {
"command": "npx",
"args": ["-y", "@inhiblab-core/mcp-image-compression"],
"env": {
"IMAGE_COMPRESSION_DOWNLOAD_DIR": "./compressed"
}
}
}
}
Docker for production:
docker run -p 8080:8080 \
-e IMG_QUALITY=85 \
-e MAX_EDGE=2048 \
ghcr.io/inhiblabcore/mcp-image-compression:latest
Embedded in your application:
npm install @inhiblabcore/mcp-image-compression
Unlike cloud services that add complexity and costs, this runs locally with predictable performance. Unlike basic Sharp wrappers, it includes smart compression algorithms and batch optimization. Unlike heavyweight solutions, it starts in seconds and scales horizontally.
You get enterprise-grade image compression without the enterprise overhead. Set it up once, and forget about image optimization bottlenecks.
Perfect for content-heavy applications, e-commerce platforms, user-generated content systems, and any project where image performance directly impacts user experience.