About optiq-mcp
optiq-mcp is a local MCP server for optimizing project images without uploading them. It verifies output quality using SSIM thresholds or pixel-exact checks before replacing files.
Key features
- 01Analyze images in a dry run
- 02Optimize JPEG, PNG, WebP, and AVIF
- 03Lossless or SSIM-based quality checks
- 04Write in place or to an output directory
- 05Resize images and strip metadata
Use cases
- 01Preview image size savings before writing
- 02Reduce project image file sizes
- 03Preserve image paths with in-place optimization
- 04Remove EXIF and XMP metadata
MCP support
The server runs locally over stdio and exposes image analysis and optimization tools to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEoptiq-mcp
An MCP server that lets AI agents optimise the images in a project with Optiq. It runs locally over stdio, and nothing is uploaded.
claude mcp add optiq -- npx -y optiq-mcp # Claude Code
{ "mcpServers": { "optiq": { "command": "npx", "args": ["-y", "optiq-mcp"] } } }
The JSON form is for Claude Desktop, Cursor and other clients. For VS Code (.vscode/mcp.json), use
{ "servers": { "optiq": { "type": "stdio", "command": "npx", "args": ["-y", "optiq-mcp"] } } }.
Tools
| Tool | Writes | What it does |
|---|---|---|
analyze_images | no (readOnlyHint) | Dry run. For each image it reports the chosen format, the bytes before and after, and the measured quality (SSIM, or pixel-exact) |
optimize_images | yes | write: "in-place" keeps formats and names, so references in code stay valid. write: "out-dir" may change formats |
What each mode guarantees:
lossless: pixels are verified identical;visually-lossless: SSIM ≥ 0.99;balanced(the default): SSIM ≥ 0.975;fast: the same threshold asbalanced, but no AVIF and fewer encodes.
A file is replaced only when the result passes the check and is smaller. Lossy outputs carry a ~20-byte marker, so
running optimize_images again does not re-encode them and cannot compound the loss (reoptimize: true
overrides this).
Other options:
mode;keepFormat;formats;maxSize(downscale the longest side);stripMetadata(removes EXIF including GPS, and XMP);minQuality;minSaving.
Full docs: https://baukaalm.github.io/optiq/guide/agents
Requires Node ≥ 20. Apache-2.0. The codec licences are listed in the optiq-image NOTICE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.