picture-mcp
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., "@picture-mcp Compress vacation.jpg to under 200KB and strip its GPS data."
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.
picture-mcp
Everyday image jobs for your AI agent, by intent: shrink this to 200 KB, strip the GPS before I post it, make me a favicon set.
picture-mcp is an MCP server for the image chores people
actually have. It needs Pillow and nothing else (no ImageMagick, no libvips, no ffmpeg, no
Node), so uvx picture-mcp works the same on Windows, macOS and Linux.
How it differs from the other Pillow/sharp image MCP servers (e.g. TOBYCAI/image-mcp, graphics-mcp, Image-Toolbox-MCP, mcp-image-optimizer). Those are generic resize/convert wrappers. This one adds the parts that matter in practice:
Compress to a size:
target_size="200KB"runs a real quality search and the result is measured, not guessed. It refuses to silently shrink your pixels.A privacy tool that proves its work:
strip_metadataremoves GPS, camera serials, XMP, IPTC, comments and data hidden after the JPEG end marker, losslessly for JPEG, lists exactly what it found, and re-reads its own output to verify it is clean.The agent can see:
preview=truereturns a small thumbnail of the result as MCP image content, andcontact_sheetturns 50 files into one labelled picture to review.Safe by construction: a
--dirsandbox with symlink and..protection, never overwrites, atomic writes, a decompression-bomb guard,batchthat dry-runs first.
Install
Claude Code:
claude mcp add picture -- uvx picture-mcp --dir ~/PicturesClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"picture": {
"command": "uvx",
"args": ["picture-mcp", "--dir", "C:\\Users\\you\\Pictures"]
}
}
}Add more --dir entries to allow more folders. HEIC/HEIF (iPhone photos) is an optional extra
because it needs a native wheel: use uvx --from "picture-mcp[heic]" picture-mcp.
Related MCP server: mcp_images
Tools
Tool | What it does |
| Format, size, mode, transparency, DPI, animation, EXIF summary, GPS yes/no and where, orientation, corrupt/truncated check |
|
|
| png, jpg, webp, gif, bmp, tiff, ico, avif and heic when available; alpha to jpg is flattened on a |
|
|
| Remove GPS/EXIF/XMP/IPTC/comments, report what was removed, verify the output |
| Clockwise degrees (any angle), flip; |
|
|
| Many images into one labelled grid, returned as an image |
| Favicon set (ico, 16, 32, apple-touch 180, 192, 512 + |
| Dominant colours as hex with percentages |
| Any of resize/convert/compress/strip_metadata/rotate_flip/crop over a folder or glob; dry run by default; per-file result table |
Conventions every tool follows:
Output goes next to the input as
photo.resized.jpg(oroutput=...). Nothing is ever overwritten unless you passoverwrite=true. Writes are atomic (temp file + rename).EXIF orientation is applied first, so sizes and crop boxes mean what a viewer shows.
Animated GIF/WebP/PNG keep every frame and duration. If the target format cannot animate (jpg, bmp...), the result says "flattened to its first frame".
Metadata: EXIF and the ICC profile are carried through resize/convert/crop/rotate by default, XMP/IPTC are not. If the output still has GPS the result tells you.
keep_metadata=falsedrops EXIF.preview=trueon any tool returns a small JPEG thumbnail of the result.
Try asking
"What is in
D:\photos\IMG_4412.jpg? Does it have a location?""Make
hero.png1600 px wide and under 300 KB, as WebP.""Remove the GPS data from everything in
D:\to-post\and show me what you removed.""Make a 1080x1080 square thumbnail of each photo in this folder, centered, as JPEG."
"Give me a contact sheet of
D:\screenshots\*.pngso I can pick the right one.""Make a favicon set from
logo.svg.pngand give me the HTML tags.""This photo shows sideways in Slack. Fix it."
"What are the brand colours in
banner.png?""Convert every PNG in
assets/to WebP. Dry run first."
Security
Use
--dir. Without it the server can read and write any path your account can. With it, every input and output path is resolved (..collapsed, symlinks followed, including a symlink as the final component) and refused if it ends up outside an allowed directory.batchglobs skip matches that resolve outside.No network, no subprocesses. The server only opens files you point it at.
Decompression bombs. Images over 100 megapixels (frames included) are refused before they are decoded, with an error naming the size.
--max-pixels MPchanges the limit, and a tool call can passallow_huge=trueafter you decide to trust a file.No overwrites, atomic writes. A crash mid-encode never leaves a half-written file or damages an existing one.
image_inforeveals GPS coordinates of a photo to the agent by design (that is its job);strip_metadatais the fix before sharing.Outside a sandbox, an agent that is prompt-injected could write image files anywhere you can. That is why
--diris in every install line above.
Development
uv sync --extra test --extra heic
uv run pytest
uv run ruff check src tests
uv run mypy --strict srcTests generate real images with Pillow (gradients, text, alpha, EXIF with GPS, animated GIF, CMYK, palette PNG, EXIF-rotated, a 20 MP image) and verify the outputs by re-opening and measuring them, plus a stdio test that launches the real server and talks MCP to it.
A from-scratch tutorial that builds a minimal version of this server step by step: picture-mcp-the-hard-way.
License
MIT
Available Tools
11 toolsbatchA
Apply one operation to many files and get a per-file result table.
operation: resize | convert | compress | strip_metadata | rotate_flip | crop. pattern: a file, or a glob such as 'D:/photos/.jpg' or 'D:/photos/**/.png'. params: that operation's own options, e.g. {'width': 1600}, {'format': 'webp'}, {'target_size': '300KB'}. dry_run defaults to TRUE: it lists what would be written (and what would fail, e.g. existing outputs) without touching anything; call again with dry_run=false to apply. Outputs land next to each input as name.resized.jpg, or in output_dir keeping the file names. Files that look like earlier outputs of the same operation are skipped. One bad file does not stop the run: failures are listed in the table (the call only errors if every file failed). Never overwrites unless overwrite=true.
Inputs: pattern (required), operation (required), params, dry_run, +3 more.
compressA
Make an image file smaller.
target_size='200KB' (or '1.5MB', or bytes): finds the highest quality that still fits, by searching (jpg/webp/avif) and tells you the result. If even min_quality cannot fit, it fails and says what is achievable, unless allow_downscale=true, which then shrinks the pixel dimensions step by step (reported). PNG is lossless: it is re-optimised, and lossy_png=true allows palette reduction (256 -> 16 colors) to reach a target. Without a target: quality=1-100, or preset high (88) / balanced (78) / small (60). format='webp' (or jpg/png) converts while compressing, e.g. a photo PNG to WebP. Output goes to photo.compressed.jpg unless output= is given; never overwrites unless overwrite=true. Warns if the result is not smaller than the input.
Inputs: path (required), format, output, preset, +9 more.
contact_sheetA
Combine many images into ONE labelled grid so you can review them at a glance. paths takes files, folders (their images, not recursive) and globs like 'D:/shots/**/*.png'. Each thumbnail is labelled with its file name; unreadable files get a red UNREADABLE tile and are listed. Output defaults to contact-sheet.jpg in the first image's folder (never overwrites unless overwrite=true). preview defaults to true here: the sheet itself is returned as an image.
Inputs: paths (required), output, columns, preview, +4 more.
convertA
Convert an image to another format: png, jpg, webp, gif, bmp, tiff, ico, and avif / heic when this install supports them (an error says so if not).
Transparency going to jpg or bmp is flattened onto background (a name like 'white'
or hex like '#ff00ff'; the result says so). Animated GIF/WebP/PNG stay animated when the
target can hold an animation, otherwise the first frame is used and the result says so.
CMYK and 16-bit images are converted to RGB/8-bit. lossless=true applies to webp.
Output is photo.webp next to the input (photo.converted.png if the format is unchanged)
unless output= is given; existing files are never replaced unless overwrite=true.
Inputs: path (required), format (required), output, preview, +6 more.
cropA
Crop an image. Pick exactly one mode: box=[left, top, right, bottom] in pixels of the upright image; aspect='16:9' (or '1:1', '4:5') for the largest region with that ratio; width= and height= for a window of exactly that size. For aspect and width/height, gravity picks where the region sits: center (default), top, bottom, left, right, top-left, top-right, bottom-left, bottom-right. Out-of-range boxes are an error, not silently clipped. Output: photo.cropped.jpg unless output= is given; never overwrites unless overwrite=true.
Inputs: path (required), box, width, aspect, +8 more.
image_infoA
Describe an image file: format, pixel size, mode, transparency, DPI, file size, animation (frame count and duration), EXIF summary (camera, date, software), whether it contains a GPS location (and where), EXIF orientation, and whether the file is corrupt or truncated. Reads headers and verifies the file decodes, so it is the right first call for any image. preview=true also returns a small thumbnail.
Inputs: path (required), preview.
make_iconsA
Make icons from a logo/image. kind='favicon_set' (default) writes favicon.ico
(16/32/48), favicon-16x16.png, favicon-32x32.png, apple-touch-icon.png (180, flattened
onto background), icon-192.png and icon-512.png into a folder (output=, default
-favicons next to the input) and returns the tags to paste. kind='ico'
writes one multi-size .ico (sizes=[16,32,...,256], default 16-256).
Non-square sources are padded with transparency (fit='pad') or center-cropped
(fit='crop'). Warns if the source is smaller than the largest icon. Never overwrites
unless overwrite=true.
Inputs: path (required), fit, kind, sizes, +5 more.
paletteB
Dominant colors of an image as hex codes with their share of the picture (most common first). Transparent pixels are ignored. count is 1-16. preview=true returns a swatch strip.
Inputs: path (required), count, preview, allow_huge.
resizeA
Resize an image. Give width and/or height (pixels) or percent.
One side only: the other follows the aspect ratio. Both sides, by mode: fit (default) = largest size inside the box, keeps aspect ratio; fill = cover the box and center-crop the overflow (thumbnails, avatars); exact = stretch to exactly width x height.
Never enlarges unless allow_upscale=true (a too-large request keeps the original size and says so). Output goes to photo.resized.jpg next to the input unless output= is given (its extension picks the format, so output='x.webp' resizes and converts). Animated GIF/WebP keep every frame. quality (1-100) applies to JPEG/WebP/AVIF output. keep_metadata=false drops EXIF (including GPS). Existing files are never replaced unless overwrite=true. allow_huge=true lifts the decompression-bomb limit (default 100 MP).
Inputs: path (required), mode, width, height, +9 more.
rotate_flipA
Rotate clockwise by degrees (90/180/270 are exact and lossless; other angles enlarge
the canvas and fill corners with background, transparent by default) and/or flip
('horizontal' = mirror left-right, 'vertical' = upside down).
EXIF orientation is always applied first, so degrees=0 with no flip simply fixes a photo that shows sideways in some viewers (auto-orient) and removes the stale tag. Output: photo.rotated.jpg unless output= is given; never overwrites unless overwrite=true.
Inputs: path (required), flip, output, degrees, +6 more.
strip_metadataA
Remove private metadata (GPS location, camera make/model/serial, dates, software, XMP, IPTC, comments, trailing embedded data) so a photo can be shared safely. Reports exactly what was found and removed, then re-reads the output to verify it is clean.
JPEGs are stripped losslessly (pixel data copied byte for byte). With
keep_orientation=true (default) a bare Orientation tag is kept so the photo still shows
upright; keep_orientation=false bakes the rotation into the pixels (re-encodes at
quality). Other formats are re-encoded without metadata (PNG is lossless, WebP lossy).
The ICC color profile is kept. Output: photo.stripped.jpg next to the input unless
output= is given; never replaces a file unless overwrite=true.
Inputs: path (required), output, preview, quality, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct operation (info, resize, convert, compress, strip_metadata, rotate_flip, crop, contact_sheet, make_icons, palette), and descriptions explicitly cross-reference when outputs differ. The only fuzzy boundaries are the meta-tool `batch` (which re-exposes resize/convert/compress/strip_metadata/rotate_flip/crop for many files) and some overlap between `convert` and `compress` with its `format=` parameter, but both are clearly documented as single-file vs many-file and quality-targeted behaviors.
All names are lowercase snake_case, which is consistent, and each is descriptive of its action or resource. Minor deviation: the set mixes bare verb/noun names (resize, convert, palette, batch) with compound verb_noun names (strip_metadata, rotate_flip, make_icons, contact_sheet) rather than a single predictable pattern.
Eleven tools is well within the ideal 3-15 range for an image utility server, and every tool earns its place: one per core operation plus two workflow helpers (batch, contact_sheet) and two generation tools (make_icons, palette). Nothing feels redundant or padded.
The surface covers the full practical lifecycle: inspect, resize/convert/compress, crop/rotate, sanitize metadata, batch-process, and generate derived assets (icons, contact sheets, palettes). Gaps are minor and mostly in creative editing: no drawing/text overlay, watermarking, or tone/color adjustments (brightness, contrast, saturation), which agents would have to work around.
Maintenance
Related MCP Connectors
Resize, convert, compress, crop and thumbnail images, and strip EXIF and GPS metadata.
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Image processing over MCP: compress and split images, generate images and QR codes.
Image and PDF toolkit: convert to AVIF/WebP/JXL, resize, crop, remove backgrounds, optimize PDFs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform GIMP-style image operations such as open, resize, crop, flip, rotate, blur, desaturate, text overlay, export, and batch processing via MCP tools, supporting both mock (Pillow) and live GIMP backends.2MIT
- AlicenseAqualityCmaintenanceMCP server for raster image manipulation using Pillow and OpenCV. Enables image operations such as resizing, cropping, rotating, format conversion, filtering, and auto-enhancement via MCP tools.8MIT
- AlicenseAqualityBmaintenanceEnables MCP clients to inspect, convert, resize, compress, crop, rotate, watermark, background-remove, and batch-process images with secure path confinement and result verification.14MIT
- AlicenseNot gradedqualityCmaintenanceLets MCP clients such as Claude, Cursor or VS Code drive a locally installed image editor from plain-language requests, opening files, building and managing layers, making selections, applying adjustments and filters, and exporting the finished result. It exposes 65 tools covering layers, documents, adjustments, selections, filters, undo/redo state and export formats like PNG, PSD and WebP.5MIT