picture-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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
This server cannot be deployed
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