image-mcp
This server provides a local, offline Pillow-based MCP toolset for image processing (12 tools) via stdio.
info – read metadata (format, dimensions, mode, file size).
resize – scale with contain/cover/fill/stretch modes to a new file.
crop – extract a rectangular region safely to a new file.
convert – change format (PNG/JPEG/WEBP/GIF/BMP/TIFF).
compress – re-encode with quality control and report savings.
rotate – rotate clockwise with expand option.
flip – mirror horizontally or vertically.
thumbnail – downscale preview with max side constraint.
watermark – add styled text label at chosen position/opacity.
effects – apply greyscale, sepia, invert, blur, sharpen, contrast, brightness.
placeholder – generate solid-color images with optional centered text.
overlay – composite one image over another at an offset with opacity.
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., "@image-mcp Resize this image to 800px wide"
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.
image-mcp
中文 | English
A local image processing MCP Server based on Pillow (offline, no API key required). It exposes a set of image tools to DeepSeek Harness (or other stdio MCP-compatible clients) via MCP: info / resize / crop / convert / compress / rotate / flip / thumbnail / watermark / effects / placeholder / overlay — 12 tools in total, visible to the model as mcp__images__*.
Features
Offline and zero-cost: pure local Pillow processing, no online API or keys required.
12 image tools: info / resize / crop / convert / compress / rotate / flip / thumbnail / watermark / effects / placeholder / overlay.
Standard protocol: JSON-RPC 2.0, line-delimited stdio MCP; all logs go to stderr (stdout is reserved for the protocol).
Easy integration: plug into a DSH profile with a one-line config via
@deepseek-ai/dsh-mcp-client.
Related MCP server: media-mcp
Installation & Integration (DSH)
pip install -r requirements.txt # 或 pip install PillowAdd the following to your DSH profile patch (e.g. cordis.patch.yml):
- id: mcp-images
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: images
transport: stdio
command: python3
args: ['<PATH-TO>/image_mcp.py']After restarting DSH, the agent can call the mcp__images__* tools.
Standalone Run (without DSH)
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | python3 image_mcp.py
# 返回 12 个工具的 schemaTools Overview
Tool | Description |
| Get image format / dimensions / mode / size |
| Resize by width/height or ratio (contain / cover / fill / stretch) |
| Crop a rectangular region |
| Convert format (PNG/JPEG/WEBP/GIF/BMP/TIFF) |
| Re-encode and compress by quality |
| Rotate (canvas can be expanded) |
| Flip horizontally / vertically |
| Thumbnail with the long edge not exceeding the given size |
| Text watermark (position / color / opacity / font size) |
| Effects: grayscale / sepia / invert / blur / sharpen / contrast / brightness |
| Generate a solid-color placeholder image (with optional text) |
| Overlay another image on the base image (supports transparency) |
Protocol
Transport: stdio, one JSON object per line.
Version: JSON-RPC 2.0, Protocol
2025-03-26.SERVER_NAME=dsh-image-mcp,SERVER_VERSION=0.1.0.
Supported Systems
Supported systems: macOS / Windows / Linux (Python 3 + Pillow, cross-platform).
Windows note: use
python(notpython3) for the command; use absolute paths or backslashes for paths inargs.
License
MIT © TOBYCAI
Available Tools
12 toolscompressA
Re-encode an image at a chosen quality to reduce file size, writing the result to a NEW file (source unchanged). Quality is 1-100 (default 80); lower values produce smaller files. The output format defaults to JPEG but can be set via 'format'. Returns the output path plus bytes_before, bytes_after, and saved_percent so you can see how much space was recovered.
Inputs: out (required), path (required), format, quality.
convertA
Change an image's file format and write it to a NEW file (source unchanged). The target format is inferred from the output file extension (e.g. .webp) unless 'format' is given explicitly; supported targets include PNG, JPEG, WEBP, GIF, BMP, TIFF. When saving to a format without transparency (e.g. JPEG), any alpha channel is flattened onto a white background. Returns the output path and final format.
Inputs: out (required), path (required), format.
cropA
Extract a rectangular sub-region and write it to a NEW file (source unchanged). The region is defined by its top-left corner (x, y) and size (width, height); coordinates are automatically clamped to the image bounds, so partial/out-of-bounds boxes are safe. Returns the output path and the actual box used.
Inputs: x (required), y (required), out (required), path (required), +2 more.
effectsA
Apply a single visual effect and write the result to a NEW file (source unchanged). Effects: greyscale, sepia, invert, blur (uses 'radius'), sharpen, contrast (uses 'factor'), brightness (uses 'factor'). Returns the output path and the effect applied. Unknown effect names raise an error.
Inputs: out (required), path (required), effect (required), factor, +1 more.
flipA
Mirror an image and write it to a NEW file (source unchanged). 'axis' selects horizontal (left-right mirror) or vertical (top-bottom flip). Returns the output path and the axis used.
Inputs: out (required), axis (required), path (required).
infoA
Read-only metadata inspector. Returns the image's absolute path, format, width, height, color mode, and file size in bytes. Use it first to learn an image's dimensions or mode before resizing, cropping, or converting. Never writes to or modifies the source file.
Inputs: path (required).
overlayA
Composite one image on top of another and write the result to a NEW file (sources unchanged). The 'overlay' image is placed at offset (x, y) on the 'base' image; its alpha channel is respected, and an 'opacity' of 0-1 lets you fade it in. Use it for logos, badges, or layering. Returns the output path and the offset used.
Inputs: out (required), base (required), overlay (required), x, +2 more.
placeholderA
Generate a brand-new solid-color image (optionally with a centered label) and write it to 'out'. Useful for mockups, spacer images, or test fixtures. Provide width, height, background color, and optional text with its color and font size. Returns the output path and the generated dimensions.
Inputs: out (required), width (required), height (required), text, +3 more.
resizeA
Resize an image and write the result to a NEW file (the source is never overwritten). Provide width and/or height; if only one is given the other is computed to preserve aspect ratio. 'fit' controls how the image maps into the target box: contain fits inside (no crop), cover fills the box and crops the overflow, fill/stretch forces the exact width x height (aspect ratio may change). Returns the output path and resulting dimensions.
Inputs: out (required), path (required), fit, width, +1 more.
rotateA
Rotate an image clockwise by a number of degrees and write it to a NEW file (source unchanged). With expand=true (the default) the canvas is enlarged so no corners are clipped; set expand=false to keep the original canvas size and crop the overflow. Returns the output path and the angle applied.
Inputs: out (required), path (required), degrees (required), expand.
thumbnailA
Create a downscaled preview whose longest side is at most 'size' pixels (aspect ratio preserved), writing it to a NEW file (source unchanged). Ideal for generating small previews or contact sheets. Returns the output path and the max-side constraint applied.
Inputs: out (required), path (required), size (required).
watermarkA
Burn a text label onto an image and write it to a NEW file (source unchanged). Configure placement (position), color (hex, e.g. #ffffff), opacity (0-1, default 0.6), font size, and padding. The label is drawn with an alpha channel so it blends over the image. Returns the output path and the effective position.
Inputs: out (required), path (required), text (required), color, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct image operation: metadata inspection, resizing, cropping, format conversion, compression, rotation, mirroring, thumbnail generation, watermarking, effects, placeholder creation, and compositing. No two tools overlap in purpose; even resize vs thumbnail and convert vs compress have clear differences in use case.
All tool names are single, lowercase verbs (info, resize, crop, convert, compress, rotate, flip, thumbnail, watermark, effects, placeholder, overlay). The convention is perfectly consistent, with no mixed styles or vague descriptors.
With 12 tools, the server is well-scoped for an image manipulation toolkit. Each tool contributes a distinct capability, and the count is neither sparse nor bloated for the domain.
The tool surface covers the full lifecycle of image manipulation: reading metadata, resizing, cropping, converting, compressing, rotating, flipping, generating thumbnails, adding watermarks, applying effects, creating placeholders, and compositing overlays. There are no obvious gaps for common image operations.
Maintenance
Related MCP Connectors
Image processing over MCP: compress and split images, generate images and QR codes.
Screenshots, PDFs, image editing, QR codes, email validation and more through one hosted MCP server.
Hosted MCP server for AI photo editing: nothing to install, no desktop photo editor needed.
MCP server for Qwen Image 3 AI image generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing tools for image processing operations165 PyPI338PythonMIT
- AlicenseAqualityDmaintenanceAn MCP server for image and video processing that allows AI assistants to resize, convert, compress, and analyze media files locally without API keys. It supports a wide range of formats and provides tools for tasks such as metadata removal, frame extraction, and video conversion.13108 PyPI5MIT
- AlicenseBqualityDmaintenanceA local MCP server for generating and editing images using OpenAI-compatible APIs. It provides text-to-image generation and image editing capabilities with configurable endpoints and saves output directly to local files.219 npmMIT
- FlicenseNot gradedqualityDmaintenanceA powerful Model Context Protocol (MCP) server for image processing, designed to empower AI models with advanced image manipulation capabilities.1-