Optiq Mcp

io.github.Baukaalm由 GitHub 账号 Baukaalm 发布v0.1.0-beta.3更新于 Oct 29, 2026

Optimise project images locally with verified quality (SSIM or pixel-exact): JPEG, PNG, WebP, AVIF.

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

本地 MCP 服务器,让助手以可验证的画质分析并优化项目中的 JPEG、PNG、WebP 和 AVIF 图片。

可以做什么
  • 以试运行方式分析图片,报告所选格式、优化前后字节数和实测画质(SSIM 或逐像素一致)
  • 原地优化图片,保留格式与文件名,使代码中的引用继续有效
  • 将优化结果输出到指定目录,此时格式可能改变
  • 支持多种画质模式(无损、视觉无损、均衡、快速)以及保留格式、目标格式、按最长边缩放、清除元数据、最小节省量等选项
适用场景
适合需要压缩项目图片资源、并希望助手在优化前后核验画质且不上传任何文件的场景,例如必须保持图片引用有效的网站或应用仓库。
运行要求
通过 npx 以 stdio 在本地运行(npm 包 optiq-mcp),需要 Node 20 或更高版本。未声明任何账号、API 密钥或环境变量。
安装前请注意
optimize_images 会写入文件:原地模式会替换原图,但仅在结果通过画质检查且体积更小时才替换。有损输出带有标记,重复运行不会叠加损失,除非启用 reoptimize。stripMetadata 会移除 EXIF(含 GPS)和 XMP,这些可能是有用的数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Optiq Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

optiq-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.

sh
claude mcp add optiq -- npx -y optiq-mcp          # Claude Code
json
{ "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

ToolWritesWhat it does
analyze_imagesno (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_imagesyeswrite: "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 as balanced, 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.

来源:mcp/README.md,提交 bb28477

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0-beta.3最新Oct 29, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分