mcp-image-optimizer
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., "@mcp-image-optimizer Resize image.jpg to 800px width"
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.
MCP Image Optimizer
A Model Context Protocol server for image optimization. Process images from URLs or local files with advanced transformations powered by Sharp.
Features
πΌοΈ Process images from URLs or local files
π Resize, rotate, flip, blur, sharpen, and more
π¦ Batch process multiple images
π¨ Convert between JPEG, PNG, WebP, AVIF, TIFF
βοΈ Auto-crop borders and whitespace
π― Smart crop with attention detection
π«οΈ Generate low-quality placeholders (LQIP)
π§ Add watermarks (image or text) with full control
π Generate favicons in all required sizes and formats
Related MCP server: Image Toolkit MCP Server
Installation
Run this command to add the MCP server:
claude mcp add image-optimizer -- npx -y mcp-image-optimizerSee Claude Code MCP docs for more info.
Add to your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"image-optimizer": {
"command": "npx",
"args": ["mcp-image-optimizer"]
}
}
}Add the following configuration to your OpenAI Codex MCP server settings:
[mcp_servers.image-optimizer]
args = ["-y", "mcp-image-optimizer"]
command = "npx"See OpenAI Codex for more information.
Add to your VS Code settings for MCP extensions like Cline or Continue:
{
"image-optimizer": {
"command": "npx",
"args": ["mcp-image-optimizer"]
}
}Navigate to Settings β Cursor Settings β MCP β Add new global MCP server
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"image-optimizer": {
"command": "npx",
"args": ["mcp-image-optimizer"]
}
}
}Install globally for faster startup:
npm install -g mcp-image-optimizerThen use this simpler config in any client:
{
"command": "mcp-image-optimizer"
}Usage Examples
Ask your AI assistant:
"Optimize ~/Desktop/photo.jpg to 800px width"
"Convert https://images.pexels.com/photos/32206277/pexels-photo-32206277.jpeg to WebP"
"Batch optimize all images in ~/Downloads/"
"Create a 200x200 thumbnail with smart crop"
"Generate a placeholder for lazy loading"
"Add my company logo as watermark to product images"
"Add 'Copyright 2025' text watermark"
"Generate all favicon sizes from my logo"
Available Tools
Resize, convert, and transform images.
Example:
"Optimize image.jpg to 800px width with 85% quality"Parameters:
input- Image path or URLoutput- Output file pathwidth- Target width in pixelsheight- Target height in pixelsquality- Quality 1-100 for lossy formatsformat- Output format (jpeg, png, webp, avif, tiff)fit- Resize fit mode (cover, contain, fill, inside, outside)Plus rotate, flip, grayscale, blur, sharpen, normalize
Process multiple images at once.
Example:
"Optimize all images in ~/Pictures/ to 1200px width"Parameters:
inputs- Array of image paths or URLsoutputDir- Output directorywidth,height,quality,format- Same as single imageprefix- Add to filename startsuffix- Add to filename end
Extract image metadata.
Example:
"Get info about image.jpg"Returns:
Dimensions, format, color space
File size, DPI
EXIF data presence
Remove borders and whitespace automatically.
Example:
"Auto-crop screenshot.png to remove white borders"Parameters:
input- Image path or URLoutput- Output file paththreshold- Color similarity threshold 0-100backgroundColor- Background to detect
Intelligent cropping to specific dimensions.
Example:
"Smart crop portrait.jpg to 500x500 square"Parameters:
input- Image path or URLoutput- Output file pathwidth,height- Target dimensionsstrategy- "attention" or "entropy"
Generate low-quality image placeholders for lazy loading.
Example:
"Create a blurred placeholder for hero-image.jpg"Parameters:
input- Image path or URLwidth- Placeholder width (default: 20)height- Placeholder height (auto if not set)quality- JPEG quality 1-100 (default: 40)blur- Blur amount 0.3-1000 (default: 5)format- "base64", "datauri", or "file"
Add image or text watermarks with positioning and styling.
Example:
"Add logo.png as watermark to photo.jpg in bottom-right corner"
"Add 'Copyright 2025' text watermark with 50% opacity"
"Add 'CONFIDENTIAL' diagonally across the document"Parameters:
input- Image path or URLoutput- Output file pathwatermark- Path/URL to watermark image, base64 data, or textposition- Corner, center, diagonal, or tile patternopacity- Transparency 0-1scale- Size relative to base imagemargin- Distance from edgesblend- Blend mode for effectsText options:
text,fontSize,fontColor,fontFamily
Generate all favicon sizes and formats for modern web apps.
Example:
"Generate favicons from logo.png and save to ./public"
"Create all icon sizes for my PWA"Parameters:
input- Source image (recommend 512x512 or larger)outputDir- Directory to save all favicon filessizes- Custom sizes array (default: all standard sizes)platforms- Target platforms: web, apple, android, microsoft, allgenerateManifest- Create manifest.json snippet for PWAs
Generated files:
PNG favicons in all sizes (16x16 to 512x512)
apple-touch-icon.png (180x180)
android-chrome-192x192.png, android-chrome-512x512.png
mstile-150x150.png (Microsoft tile)
favicon-html.txt (ready-to-use HTML tags)
manifest-icons.json (PWA configuration)
Path Support
β URLs:
https://example.com/image.jpgβ Absolute paths:
/Users/name/Desktop/image.jpgβ Home directory:
~/Desktop/image.jpgβ οΈ Relative paths: Works with
cwdconfig setting
To use relative paths, add a working directory:
{
"command": "npx",
"args": ["mcp-image-optimizer"],
"cwd": "/Users/yourname/Desktop"
}Requirements
Node.js 22+ (npx handles this automatically)
Compatible MCP client
Troubleshooting
"Command not found"
Make sure Node.js is installed:
node --versionTry the global install method
"File not found"
Use absolute paths:
/Users/name/Desktop/image.jpgCheck file permissions
"MCP tools not available"
Restart your MCP client after configuration
Check config file is valid JSON
License
MIT
Links
Available Tools
8 toolsadd_watermarkB
Add a watermark image or text to an image
Inputs: input (required), output (required), watermark (required), text, +10 more.
auto_cropA
Automatically crop image to remove borders, whitespace, or solid color backgrounds
Inputs: input (required), output (required), threshold, backgroundColor.
batch_optimizeB
Optimize multiple images at once
Inputs: inputs (required), outputDir (required), width, format, +4 more.
create_placeholderA
Generate a low-quality image placeholder (LQIP) for lazy loading
Inputs: input (required), blur, width, format, +3 more.
generate_faviconB
Generate all favicon sizes and formats needed for modern web apps
Inputs: input (required), outputDir (required), sizes, platforms, +2 more.
get_image_infoB
Get metadata and information about an image
Inputs: input (required).
optimize_imageC
Optimize an image from a file path or URL with various transformation options
Inputs: input (required), output (required), fit, blur, +12 more.
smart_cropC
Intelligently crop image to specified dimensions using entropy or attention detection
Inputs: input (required), width (required), height (required), output (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 8 tools
Each tool targets a distinct operation: optimization, batch, info, two distinct crop types, placeholder, watermark, and favicon generation. Even the two crop tools have clearly differentiated purposes (auto removes borders, smart uses AI).
All tool names follow a consistent lowercase_snake_case verb_noun pattern (optimize_image, get_image_info, create_placeholder, add_watermark, generate_favicon). The crop tools use compound verbs but remain stylistically uniform.
8 tools is well-scoped for an image optimization server. Each tool provides meaningful distinct functionality without redundancy or bloat.
The surface covers core image optimization, batch processing, metadata, cropping, placeholders, watermarks, and favicon generation. Minor gaps exist (e.g., no explicit format conversion tool), but the general optimize_image likely covers that, so no severe omissions.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Edit images in one call: resize, convert, compress, crop, metadata, favicons, QR codes, OCR.
Production-ready images in one pass: resize, crop, compress, convert format, upscale, tag for SEO
Resize, compress, convert, watermark and SEO-tag e-commerce product images from a public URL.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Node.js server that provides advanced video and image processing capabilities through the Model Context Protocol, enabling operations like conversion, compression, editing, and effects application.1019 npm29ISC
- AlicenseNot gradedqualityDmaintenanceA server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.19MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that extracts images from URLs or base64 data and converts them into a format suitable for LLM analysis, allowing AI models to process and understand visual content.3705 npm21MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides tools for converting SVG code to high-quality PNG and JPG images with detailed customization options.10 npm4MIT