Ruah

tools.ruah由 ruah.tools 发布v0.1.1更新于 Nov 3, 2026

设备端图像工具:背景移除、压缩、调整尺寸、裁剪、AI放大、元数据移除。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

On-device image tools: background removal, compression, resize, crop, AI upscale, metadata removal.

已验证STDIO仅桌面

概览

Ruah 的本地 MCP 服务,由 ruah.tools 发布;无需登录;STDIO;6 个工具。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

发布者
ruah.tools

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ruah-mcp

Image tools for AI agents, as an MCP server. Background removal, compression, resizing, cropping, AI upscaling and metadata removal all run on your own computer. Images never leave it.

It is the engine of ruah.tools: the same models, encoders and settings, packaged for an agent to call.

Tools

ToolWhat it does
remove_backgroundCuts the main subject out of a photo and saves a transparent PNG (AI).
compressMakes an image file smaller with little visible loss, or converts it: WebP, AVIF, JPEG, PNG.
resizeChanges the pixel dimensions, keeping proportions (by longest side or percent).
cropCrops to an aspect ratio or exact region, rotates by quarter turns, flips. Pixels are moved, never resampled.
upscaleEnlarges 2× or 4× with AI super-resolution. Keeps transparency.
strip_metadataRemoves EXIF (GPS location, camera, date), XMP, IPTC, comments and embedded thumbnails. JPEG and PNG are cleaned without re-encoding.

Files in, files out: every tool writes a new file next to the original (or to the path you give) and returns its path with a small preview. Existing files, the original included, are never overwritten. Images up to 12000×12000 pixels (144 MP) and 512 MB are accepted; upscale results are capped at 4096×4096.

Install

Requires Node.js 20 or newer.

Claude Code

sh
claude mcp add ruah -- npx -y ruah-mcp

Or as a plugin, which adds a short skill on chaining the tools:

sh
claude plugin marketplace add 0-big/ruah-mcpclaude plugin install ruah@ruah-tools

Any other MCP client (Claude Desktop, Cursor, …): add this to its MCP server config.

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

Then ask your agent things like "remove the background from ~/Desktop/shoe.jpg" or "convert these screenshots to WebP".

What goes over the network

Only the AI model weights, once, from Ruah's model mirror (models.ruah.tools). Each file is checked against a SHA-256 hash pinned in this package before it is used, then kept in a local cache:

ModelUsed bySizeWhen
BiRefNet lite (512²)remove_background98 MBFetched in the background when the server first starts
BiRefNet (512²)remove_background473 MBOnly if the lite model finds no subject
Swin2SR ×2upscale 2×8 MBFirst 2× upscale
Swin2SR ×4upscale 4×55 MBFirst 4× upscale

Compression, resizing, cropping and metadata removal need no download at all.

Installing is separate: npx fetches the package and its dependencies from npm, and on Linux x64 the install script of onnxruntime-node (the AI runtime) also fetches about 260 MB of CUDA and TensorRT files from NuGet, which Ruah never uses. Set ONNXRUNTIME_NODE_INSTALL=skip in the server's environment to leave them out (the Claude Code plugin does).

The cache lives in ~/.cache/ruah/models (or $XDG_CACHE_HOME/ruah/models). Set RUAH_CACHE_DIR to put it elsewhere.

Platforms

  • macOS (Apple Silicon): tested. Upscaling runs on the GPU (WebGPU via Metal) and falls back to the CPU if that fails.
  • Linux, Windows: upscaling runs on the CPU. The full test suite runs on both (x64) for every change; arm64 builds exist but are untested.
  • Intel Macs are not supported: the ONNX runtime the AI tools run on ships no build for them.
  • HEIC (iPhone photos) can be read on macOS only. HEVC is a patent-licensed codec and only macOS provides one here.

Licenses

ruah-mcp is MIT licensed (see LICENSE). The models it downloads keep their own licenses: BiRefNet (MIT) and Swin2SR (Apache-2.0). Lossy PNG compression uses libimagequant 2.4.1, its last BSD-licensed release, compiled to WebAssembly and bundled in dist/index.js. Its notice is dist/LICENSE-libimagequant.txt.

来源:packages/ruah-mcp/README.md,提交 d4b933b

工具

6

remove_background

Remove background

Cut the main subject out of a photo and make the background transparent (on-device AI — the image never leaves this computer). Saves a transparent PNG and returns its path plus a small preview. Use for "remove the background", "cut out", "transparent background", "누끼", product and profile photos. The PNG is lossless and large; to make it smaller, pass it to `compress` with format webp or png (jpeg cannot be transparent). The first call downloads a ~98 MB model once.

输入参数input_path必填output_path

compress

Compress image

Make an image file smaller with little visible quality loss, on-device (same encoders and defaults as ruah.tools). Saves a new file and reports the size before and after; the original is never changed. Formats: keep = same format as the input; webp = usually the smallest and keeps transparency; avif = smaller still, slower to encode; jpeg = photos only, transparency becomes white; png = lossy palette compression that keeps transparency (or lossless=true for exact colours). Prefer webp unless the user needs a specific format. This is also the tool for converting between formats ("convert to WebP/AVIF/JPG/PNG"): set `format`. To change the pixel dimensions, use `resize` instead (it can change the format in the same step).

输入参数formatqualitylosslessinput_path必填output_path

resize

Resize image

Change an image's pixel dimensions, keeping its proportions, on-device (same high-quality resampler and encoders as ruah.tools). Give exactly one of max_side (the longest side in pixels — e.g. 1920 for web pages, 1080 for social posts, 640 for thumbnails) or percent. It never enlarges unless allow_upscale is true. Saves a new file and reports the size before and after; the original is never changed. The output is also compressed with the same format/quality options as `compress`, so "make it 800px and WebP" is one call.

输入参数formatpercentqualitylosslessmax_sideinput_path必填output_pathallow_upscale

crop

Crop, rotate or flip image

Cut an image down to an aspect ratio or an exact region, and/or turn it by quarter turns or mirror it, on-device (same tool as ruah.tools/crop: whole pixels moved, never resampled). aspect_ratio keeps the largest centred area of that shape (e.g. "1:1" for a square profile picture, "16:9" for a video thumbnail, "4:5" for a portrait post). box keeps an exact region, in pixels of the input as it is shown (upright). rotate and the flips work alone or together with either. Saves a new file and reports which region of the input it kept; the original is never changed. To change the pixel size use `resize`; to change only the format or file size use `compress`.

输入参数boxformatrotatequalitylosslessinput_path必填output_pathaspect_ratioflip_verticalflip_horizontal

upscale

Upscale image (AI)

Enlarge an image 2× or 4× with on-device AI super-resolution (the same models as ruah.tools/upscale — the image never leaves this computer). Unlike `resize`, it redraws detail and crisp edges instead of stretching pixels into blur. Made for small or low-resolution images: icons, thumbnails, old web images, small product shots. Saves a new file and returns its path plus a small preview; the original is never changed. The result is limited to 16.8 megapixels (4096×4096): ×4 fits inputs up to about 1000×1000, ×2 up to about 2000×2000. To make an already large photo bigger, use `resize` with allow_upscale. Time grows with the output: small images take seconds, ×4 of 1000×1000 a minute or more. Transparency is kept: a transparent logo, icon or cut-out comes back transparent, with no dark fringe (save as png, webp or avif to keep it). The first ×2 call downloads an 8 MB model once, the first ×4 call 55 MB.

输入参数scaleformatqualitylosslessinput_path必填output_path

strip_metadata

Remove metadata

Remove hidden metadata from an image before sharing it, on-device (same cleaner as ruah.tools): EXIF (GPS location, camera and device, date taken), XMP, IPTC, comments, embedded thumbnails and extra data such as motion-photo video. JPEG and PNG are cleaned losslessly — only the image data and its display settings (colour profile, orientation) are copied, not re-encoded — so the photo looks exactly the same. Other formats (HEIC from an iPhone, AVIF, GIF, …) are rebuilt from their pixels with no metadata at all: WebP stays WebP, images with transparency become PNG, photos become JPEG (quality 92). Saves a new file; the original is never changed. The result lists what was removed (e.g. a GPS location) and what is left — no need to check with other tools. Use for "remove EXIF", "strip GPS / location", "clean metadata before posting".

输入参数input_path必填output_path

版本历史

1
  1. v0.1.1最新Nov 3, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分