# Baukaalm/optiq [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/Baukaalm/optiq  
**GitHub Stars:** 0  
**npm Downloads (last month):** 427  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/baukaalm-optiq

## Description
Optimise project images locally with verified quality: encodes JPEG, PNG, WebP and AVIF candidates (MozJPEG, libwebp, libavif, oxipng) and keeps the smallest one that passes an SSIM or pixel-exact check. npx -y optiq-mcp

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "optiq": {
    "command": "npx",
    "args": ["-y","optiq-image"]
  }
}
```

## Documentation

## What Baukaalm/optiq MCP server does

Baukaalm/optiq exposes local project image optimization through the Model Context Protocol. It is distributed as the `optiq-mcp` npm package and runs as a local stdio process. The server is intended for AI agents that need to inspect or reduce image files while keeping the work on the machine running the MCP client.

Its image engine evaluates a bounded set of JPEG, PNG, WebP, and AVIF candidates. The selected output is the smallest candidate that satisfies the requested quality constraint. Quality can be checked by exact decoded-pixel comparison for lossless work or by SSIM thresholds for visually lossless and balanced optimization. Results include the selected format, sizes before and after, measured quality, and relevant warnings or unmet constraints.

## How it works

The server provides two tools:

- `analyze_images` performs a dry run and does not write files. For each image, it reports the format Optiq would select, the original and estimated output sizes, and the measured quality.
- `optimize_images` performs the write operation. With `write: "in-place"`, it retains image formats and filenames. With `write: "out-dir"`, it writes results to a specified folder and can change formats.

The MCP process is implemented in TypeScript with the MCP SDK. Its package is available from npm as `optiq-mcp`, and the repository includes end-to-end tests that invoke it through the official MCP client.

## Setup and configuration

Run the server through `npx`:

```sh
npx -y optiq-mcp
```

For Claude Code, the equivalent registration command is:

```sh
claude mcp add optiq -- npx -y optiq-mcp
```

Other MCP clients can use a stdio configuration with `npx` as the command and `-y optiq-mcp` as its arguments:

```json
{
  "mcpServers": {
    "optiq": {
      "command": "npx",
      "args": ["-y", "optiq-mcp"]
    }
  }
}
```

The same configuration format is shown for Claude Desktop and Cursor. Because the server works with local project files, the MCP client process needs access to the directories containing the images and the destination directory used for output.

## Tools and capabilities

The underlying Optiq engine supports several optimization modes. `lossless` verifies that decoded pixels, including alpha, remain identical. `visually-lossless` uses an SSIM threshold of at least 0.99 by default, while `balanced` uses a lower threshold of at least 0.975 and a smaller search budget. AVIF uses a stricter quality threshold than JPEG and WebP.

Supported controls include output format selection, automatic format choice, format conversion, maximum output size, maximum dimensions, candidate limits, metadata preservation, animation handling, and behavior when constraints cannot be met. The engine can preserve EXIF, XMP, and ICC metadata by default. It can also report when a requested output limit conflicts with the quality requirement.

## Limitations and notes

`analyze_images` is non-destructive, but `optimize_images` writes files according to its selected write mode. In-place mode keeps formats and names, whereas output-directory mode may change both formats and file sizes. Optimization may leave an image unchanged when re-encoding does not meet the configured minimum savings ratio.

The server is separate from Optiq’s browser, CLI, and Vite interfaces, although they use the same image engine. Codec availability, input validity, size limits, and incompatible format requests can produce errors such as unsupported format, malformed input, constraints unsatisfiable, or codec unavailable.

_Full upstream README: https://allmcps.com/mcp/baukaalm-optiq/readme_

