Mochify MCP
mochify-cli
一个用于 mochify.app 的命令行工具和 MCP 服务器——这是一个由原生 C++ 引擎驱动的、注重隐私的快速图像压缩和转换 API。
在终端中将图像压缩并转换为现代格式(AVIF、JXL、WebP、Jpegli),或者通过 模型上下文协议 (Model Context Protocol) 让 Claude 等 AI 助手直接访问图像处理功能。
安装
macOS (Homebrew):
brew tap getmochify/mochify
brew install mochifyLinux / WSL:
# x86_64
curl -L https://github.com/getmochify/mochify-cli/releases/latest/download/mochify-linux-x86_64 -o mochify
chmod +x mochify
sudo mv mochify /usr/local/bin/
# arm64
curl -L https://github.com/getmochify/mochify-cli/releases/latest/download/mochify-linux-arm64 -o mochify
chmod +x mochify
sudo mv mochify /usr/local/bin/手动安装: 所有二进制文件均可在 Releases 找到。
从源码安装:
cargo install --path .Related MCP server: tinypng-mcp-server
身份验证
登录您的 mochify.app 账户以解锁全部配额:
mochify auth login这将打开您的浏览器,您可以在其中登录并授权 CLI。您的凭据会自动保存到 ~/.config/mochify/credentials.toml 中——无需环境变量或手动复制密钥。CLI 和 MCP 服务器都会自动读取它们。
mochify auth status # check whether you're signed in
mochify auth logout # remove saved credentials免费层级(未认证)限制为每天 25 张图像。请在 mochify.app 注册。
CLI 使用方法
mochify [OPTIONS] <FILES>...选项
标志 | 描述 |
| 输出格式: |
| 目标宽度(像素) |
| 目标高度(像素) |
| 裁剪至精确尺寸 |
| 旋转: |
| 输出目录(默认:与输入相同) |
| 自然语言提示词——自动解析参数 |
| API 密钥覆盖(或设置 |
示例
# Convert a JPEG to AVIF
mochify photo.jpg -t avif
# Resize and convert to WebP
mochify photo.jpg -t webp -w 800
# Batch convert a folder to AVIF at 1200px wide
mochify ./images/*.jpg -t avif -w 1200 -o ./compressed
# Use a natural-language prompt instead of explicit flags
mochify photo.jpg -p "convert to avif and resize to 1200px wide"
# Prompt works with multiple files too
mochify ./images/*.jpg -p "compress for web, keep under 1000px wide" -o ./outMCP 服务器 (Claude Desktop)
mochify 可以作为 MCP 服务器 运行,让 Claude 直接在对话中为您处理图像。
设置
首先运行 mochify auth login,然后将以下内容添加到您位于 ~/Library/Application Support/Claude/claude_desktop_config.json 的 Claude Desktop 配置文件中:
{
"mcpServers": {
"mochify": {
"command": "mochify",
"args": ["serve"]
}
}
}重启 Claude Desktop。mochify 服务器将出现在您的连接中,并自动使用您保存的凭据。
使用方法
只需用自然语言描述您的需求,并提供图像的完整路径:
"Convert
/Users/me/Desktop/photo.jpgto AVIF at 1000px wide"
"Compress all the JPEGs in
/Users/me/projects/blog/images/to WebP and save them to/Users/me/projects/blog/compressed/"
Claude 将自动调用 squish 工具。
API
由位于 https://api.mochify.xyz/v1/squish 的 mochify API 提供支持。
图像在内存中处理,绝不会存储在磁盘上
支持 JPEG (Jpegli)、AVIF、JXL、WebP 和 PNG 输出
每张图像最大 25MB
访问 mochify.app 获取网页界面。
This server cannot be deployed
Maintenance
Related MCP Connectors
Convert images to PNG, JPEG, WebP, or AVIF through one public remote MCP tool.
Image processing over MCP: compress and split images, generate images and QR codes.
Normalize and convert more than 400 file types via TweekIT's hosted MCP streamable HTTP endpoint.
Hosted MCP tools for FFmpeg-style video and audio processing through FFMPEG API.
Related MCP Servers
- AlicenseCqualityDmaintenanceImage Tools MCP is a Model Context Protocol (MCP) service that retrieves image dimensions and compresses images from URLs and local files using the TinyPNG API. It supports converting images to formats like webp, jpeg/jpg, and png, providing detailed information on width, height, type, and compressi210 npm9MIT
- Apache 2.0

Cloudinaryofficial
AlicenseNot gradedqualityDmaintenanceCloudinary MCP server enables AI agents to upload, manage, analyze transform, optimize and deliver media using Cloudinary’s API.10MIT- AlicenseNot gradedqualityDmaintenanceMCP server for image optimization, conversion, AI generation, and gallery management via SnapiX API.7 npmMIT