atx-mcp

io.github.gridhra由 GitHub 账号 gridhra 发布v0.6.7更新于 Oct 29, 2026

Deterministic, non-generative image transform MCP server: reproducible recipes, immutable originals.

已验证STDIO仅桌面文件与存储媒体与设计

概览

AI 生成的概览

确定性的非生成式图像处理服务器:把可复现的变换配方应用到本地图片,每个结果都保存为不可变修订版本。

可以做什么
  • 把本地图片、LUT、SVG 和字体导入工作区,并列出生成的修订版本
  • 检查图片尺寸、EXIF、是否含 GPS、清晰度与感知哈希
  • 检测倾斜角、文档四边形和文本块,并生成渐变或范围蒙版
  • 以低分辨率预览配方,可叠加网格、地平线或蒙版,并并排或差分比较两个版本
  • 按全分辨率应用配方或内置预设,支持图层、混合模式、水印和局部蒙版调整
  • 把单个或最多 64 个修订版本导出到磁盘
适用场景
适合需要可复现地处理照片或截图的场景:校正倾斜、裁切成社交平台尺寸、调色、加水印、去除 GPS 元数据,或把文档图片处理成视觉模型可读的样子。每个输出都能追溯到配方,适合要求可重复、可审计而非生成式编辑的工作流。
运行要求
以本地 stdio 进程运行;可通过 cargo、预编译二进制、npx(Node.js 18+)或 Docker 安装。需要一个工作区目录,通过 --workspace 参数或 ATX_WORKSPACE 环境变量指定,不存在时会自动创建。无需账号、API 密钥或网络访问。
安装前请注意
它会读写本机文件:import_asset 读取给定路径,export_asset 写入目标路径或目录,因此工作区和导出目标应指向你愿意暴露的目录。Docker 方式下看到的是容器内路径而非宿主机路径。启用 include_exif 时 inspect_image 可能返回包含 GPS 坐标和人名的完整 EXIF。不内置 OCR 引擎,文字由模型自己读取。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

atx-mcp

English | 日本語 | 简体中文

[atx-mcp MCP server – quality and maintenance score on Glama] [Mentioned in Awesome MCP Servers]

A deterministic (non-generative) asset transformation MCP server for general-purpose AI agents, written in Rust.

It executes editing intent — "level the horizon, crop to 16:9, brighten it up a touch" — as a declarative transform recipe, and tracks every result as an immutable revision. The original asset is never modified.

[Before/after: a tilted synthetic cityscape straightened, levels auto-corrected, and a subtle look applied] Tilt correction + auto levels + a look applied (a fully deterministic recipe) — left: input / right: output.

See docs/DESIGN.md for the full design.

Use cases

  1. Eye-catch image for an article

    "Straighten this photo and crop it to a 16:9, 1600px eye-catch. WebP." import_asset → detect_tilt (the AI skips correction when it's already near-level) → apply_transform (rotate → crop → resize → encode) → export_asset. The original is never touched, and the same recipe reproduces the same result every time.

  2. Multiple sizes for social/CMS

    "Generate the OGP, Instagram square, and thumbnail versions of this photo." One original fans out into OGP 1200×630, Instagram 1080 square, and a 400px thumbnail in parallel. The same-recipe-same-revision idempotency means re-running never double-creates output; a one-word preset name works too.

  3. Safe to publish

    "Strip the location data for sure, but don't touch the colors." strip_metadata (exif) removes EXIF including GPS while keeping the ICC profile intact. The AI can also warn ahead of time by checking has_gps from inspect_image.

  4. Color and look adjustments

    "Make just the sky bluer, leave everything else alone." Covers curves / levels / hsl / white_balance, the film_soft preset, and importing your own .cube LUT with import_asset then applying it with lut.

  5. Local (masked) adjustments

    "Darken just the sky a bit, keep the ground as is." generate_mask builds a mask (gradient, luminosity range, or hue range); after wiring it into the adjustment, render_preview with overlay:"mask" shows exactly where it will bite before you commit.

  6. Layer compositing

    "Blur a copy of this photo and blend it in at 50% screen for a soft glow." The layers stack combines 16 blend modes, opacity, and masks to build reproducible composites like soft focus.

  7. Watermarks, retouching, and perspective

    "Stamp my logo in the corner, remove the power lines, and fix the converging verticals." svg_overlay burns in a logo, clone/heal remove blemishes or wires by compositing both texture and tone, and perspective corrects converging verticals.

  8. Reading documents (OCR pre-processing)

    "Read this receipt photo for me." / "What does this slide say?" detect_document finds the page or screen and returns a perspective quad ready to paste, the ocr_document preset (grayscale, auto levels, light sharpen) and trim concentrate the pixel budget on the text, and render_preview with long_edge:1568 hands the model an image it can actually read. No OCR engine is bundled: the model does the reading, atx only makes the pixels legible and reproducible. detect_text_blocks answers the question that decides the rest — "will this text survive the downscale, and where do I cut?" — by returning the text blocks in reading order plus ready-to-paste crop bands. threshold (Otsu / Sauvola) and ocr_binarize exist for external OCR engines.

  9. Verification and accountability

    "Show me this image before and after the edits, side by side." compare_revisions places before/after side by side, or returns a difference heatmap with stats like mean_abs_diff. Every revision keeps its lineage, so the full edit history behind any image used in an article can be traced and reproduced — byte-identical on any machine.

  10. Splitting one scan into separate images

"Two mounted sheets were scanned on one page. Save them as two files, keeping a little of the mount around each." There is no split operation: the model runs one apply_transform per piece against the same source revision (crop to the left/right half, then trim to snap to the paper's edges with padding to keep some mount), and export_asset writes both at once. render_preview with no recipe and overlay:"grid" is how it reads the coordinates first.

What atx doesn't do — generative editing, RAW development, ML-based auto-cropping, OCR itself — is out of scope; see docs/DESIGN.md for the roadmap.

Install

atx-mcp is a single self-contained binary with no runtime dependencies. Pick one of the following.

1. cargo binstall (prebuilt binary, no compilation)

sh
cargo binstall atx-mcpclaude mcp add --scope user asset-transform -- atx-mcp --workspace /path/to/asset-workspace

cargo-binstall downloads the release archive built by this repository's CI instead of compiling, so this is the fastest route for anyone who already has a Rust toolchain. (--scope user makes the server available in every project; omit it for the current project only.)

2. cargo install (builds from source)

sh
cargo install atx-mcp

Works on any platform a Rust toolchain supports, including ones without a prebuilt binary. Needs a C compiler as well (libwebp is built from its vendored source).

3. Prebuilt binary (no Rust toolchain)

Installer scripts (default install location is ~/.local/bin, or %LOCALAPPDATA%\Programs\atx-mcp on Windows; the archive is verified against SHA256SUMS before extraction):

sh
# macOS / Linuxcurl -fsSL https://raw.githubusercontent.com/gridhra/atx-mcp/main/scripts/install.sh | sh
powershell
# Windowsirm https://raw.githubusercontent.com/gridhra/atx-mcp/main/scripts/install.ps1 | iex

To download manually, grab atx-mcp-<version>-<target>.tar.gz (.zip on Windows) from Releases. Supported targets:

PlatformTarget triple
macOS (Apple Silicon)aarch64-apple-darwin
macOS (Intel)x86_64-apple-darwin
Linux x86_64x86_64-unknown-linux-musl (statically linked, no glibc required)
Linux arm64aarch64-unknown-linux-musl (statically linked, no glibc required)
Windows x86_64x86_64-pc-windows-msvc
sh
claude mcp add asset-transform -- ~/.local/bin/atx-mcp --workspace /path/to/asset-workspace

4. Docker

ghcr.io/gridhra/atx-mcp is a FROM scratch image holding the statically linked binary and nothing else (linux/amd64 and linux/arm64).

sh
claude mcp add asset-transform -- \  docker run -i --rm -v "$PWD:/workspace" ghcr.io/gridhra/atx-mcp:0.6.7

Two things to keep in mind. -i is required: the server speaks the MCP stdio transport and needs stdin to stay open. And paths are container paths: the directory you bind-mount appears as /workspace inside the container, so import_asset and export_asset take paths like /workspace/photos/shot.jpg, not host paths.

5. npx (Node.js 18+, nothing to install)

The prebuilt native binary for your platform is pulled in automatically via optionalDependencies.

sh
claude mcp add --scope user asset-transform -- npx -y atx-mcp --workspace /path/to/asset-workspace

Or add it directly to your MCP client config:

json
{  "mcpServers": {    "asset-transform": {      "command": "npx",      "args": ["-y", "atx-mcp", "--workspace", "/path/to/asset-workspace"]    }  }}

--workspace (env: ATX_WORKSPACE) is the directory used as the asset store. It is created automatically if it doesn't exist.

--max-concurrent-tools (env: ATX_MAX_CONCURRENT_TOOLS) caps how many pixel-processing tool calls (import / inspect / detect_* / apply / preview / compare / mask) run at the same time; the default is the CPU count. Lower it on memory-constrained hosts. Tool work runs on dedicated threads, so the stdio transport (ping, cancellation, the vocabulary tools) stays responsive while images are being processed.

Tools (13)

ToolRole
list_operationsCompact catalog of the recipe vocabulary: every operation with a one-line description and terse parameter hints, plus the built-in preset names. Optional category:"geometry"|"color"|"filter"|"output" narrows it (read-only)
explain_operationFull reference for one operation: parameter table (type, range, required/default, semantics), ready-to-paste JSON examples and gotchas. A built-in preset name works too and returns its full operation list. An unknown name returns the valid operations and presets, grouped (read-only)
import_assetImport a local image into the workspace (sha256-idempotent). Takes path for one file or paths for a batch of up to 64 (a failing file does not abort the batch). Warns via already_derived_from when the bytes are already the output of a recipe in this workspace
inspect_imageInspect dimensions, EXIF summary, ICC profile, presence of GPS data, luma statistics, a sharpness score (variance of the Laplacian — relative, so compare it against a known-good capture of the same subject) and a perceptual_hash (dHash, 16 hex digits) for "is this the same picture?". include_exif:true additionally returns every EXIF field as {ifd, tag, value} entries — off by default because the full dump can carry GPS coordinates and names (read-only)
detect_tiltEstimate tilt angle via Canny+Hough (coarse) plus a projection profile (sub-0.1° refinement). Also returns horizontal/vertical family estimates; the full score curve is opt-in via include_score_curve:true. Returns "do not correct" when confidence is low (read-only)
detect_documentFind the dominant quadrilateral (page, screen, whiteboard, sign) via Canny + contours and return it as a perspective-ready quad (tl, tr, br, bl) with confidence, area_ratio, an output_size_hint and a paste-ready suggested_operation. Returns quad:null with a reason (no_quad_found / already_rectified / low_confidence) rather than guessing (read-only)
detect_text_blocksFind the text-like blocks (headline, paragraphs, table, caption) via Otsu binarization + run-length smearing + connected components, in reading order, each with line_count, median_line_height_px and ink_ratio. legibility.line_height_at_1568_px says whether the text survives a downscale to long edge 1568 (below ~16px it usually does not), and legibility.recommended_bands splits the image into horizontal bands that clear that bar — each entry is already a crop operation to paste before render_preview (read-only)
generate_maskGenerate a deterministic grayscale mask (linear_gradient / radial_gradient / luminosity_range / color_range) as a PNG revision with the same dimensions as the reference image, to be referenced from an operation's mask field (idempotent)
render_previewApply a recipe (or a preset) at low resolution (long edge ≤768 by default, long_edge 256..1568 to hand a vision model a legible page) and return it as an inline image. overlay:"grid"|"thirds"|"horizon" overlays composition guide lines, and overlay:"mask" (with mask_revision_id) tints the coverage of a mask (drawn on the preview only; it has no effect on the actual transform). Also reports estimated_vision_tokens, a rough width*height/750 budget for the returned image
apply_transformApply a recipe (or a preset) at full resolution and produce a new revision (the same recipe always yields the same revision). Takes revision_id for one image or revision_ids to run the same recipe over a batch of up to 64
compare_revisionsDownscale two revisions to long edge ≤640 and return them composited into a single inline image, arranged via layout:"side_by_side"|"stacked" (for A/B and before/after visual comparison), or layout:"diff" for a single pixel-difference heatmap plus mean_abs_diff/max_abs_diff/changed_pixel_ratio and an ssim score (requires equal dimensions). Every layout also reports perceptual_hash_distance, the Hamming distance between the two dHash values (≤5 usually means the same picture re-encoded or resized, ≥20 means two different pictures)
list_assetsRead the revision ledger (read-only)
export_assetWrite revisions out of the workspace: revision_id + dest_path for one file, or revision_ids + dest_dir for up to 64 at once, named by filename_template (default "{revision_id}.{ext}", also {index} / {stem}). An existing file is only overwritten when overwrite:true is explicitly set, and it never writes inside the workspace store or through a symbolic link

Recipe example

json
{  "operations": [    { "op": "rotate", "angle_degrees": -1.8 },    { "op": "crop", "aspect_ratio": "16:9" },    { "op": "resize", "width": 1600 },    { "op": "encode", "format": "webp", "quality": 82 }  ]}

Supported ops (29): auto_orient / rotate / perspective / crop (crop, pad) / trim / resize (cover, contain, fill) / adjust / color_matrix / curves / levels / lut / white_balance / hsl / blur / median / unsharp_mask / convolve / threshold / clone / heal / svg_overlay / flip / vignette / grain / gradient_map / pixelate / auto_levels / encode (jpeg, png, webp, avif) / strip_metadata. The operation vocabulary is deliberately kept out of the tool schemas: call list_operations for the up-to-date catalog and explain_operation for one operation's full schema, examples and gotchas.

LUT (.cube)

A .cube 3D/1D LUT is an asset, not an image: import it first, then point a recipe at the revision it produced.

  1. import_asset the .cube file. It is stored as an immutable revision with mime_type: "application/x-cube" (inspect_image refuses it on purpose — it is not an image).
  2. Reference the returned revision_id from a recipe:
json
{ "op": "lut", "lut_revision_id": "rev_...", "strength": 0.8 }

strength (0..1, default 1.0) blends linearly with the original. Because revisions are immutable, including the referenced id in the recipe_hash keeps the transform fully deterministic — but it also means the recipe is only reproducible inside a workspace that holds that LUT, so move the .cube alongside the recipe when you move a look between machines. Referencing an unknown id fails with a structured error before any pixel work happens.

SVG overlays (logos and watermarks)

An .svg is a vector asset, like a .cube LUT: import it first, then stamp it onto a raster image from a recipe.

  1. import_asset the .svg file. It is stored as an immutable revision with mime_type: "image/svg+xml", and the summary reports the SVG's intrinsic size (0x0 means it has none — no viewBox and no absolute width/height on the root <svg>). inspect_image refuses it on purpose: it is a vector asset, not a raster image.
  2. Reference the returned revision_id from a recipe:
json
{ "op": "svg_overlay", "svg_revision_id": "rev_...",  "x": 24, "y": 24, "width": 320, "opacity": 0.25, "blend_mode": "normal" }

x/y are the overlay's top-left corner in the coordinates of the image at that point in the pipeline (so put the overlay after your resize/crop); negative values are allowed and the overflow is clipped. Omit width and height to rasterize at the SVG's intrinsic size, give one to scale while preserving the aspect ratio, or give both to stretch to an exact box — an SVG with no intrinsic size is a structured error unless you give both. Compositing uses the same W3C formula and the same 16 blend_mode values as layers.

Text in an SVG

atx never reads system fonts: the installed fonts differ from machine to machine and would break byte-for-byte reproducibility. <text> is therefore skipped unless you ask for it:

json
{ "op": "svg_overlay", "svg_revision_id": "rev_...", "x": 120, "y": 80,  "width": 48, "render_text": true, "font_revision_ids": ["rev_..."] }
  • render_text defaults to false, which keeps the old behaviour exactly (the shapes render, the glyphs do not, and the result carries a warning). Converting text to paths in your vector editor still works and needs no font at all.
  • render_text:true draws the text with one bundled font, Roboto Regular (embedded in the binary), plus any fonts you pass in font_revision_ids (up to 4). Nothing else is ever loaded, so the output is identical on every machine.
  • A font is an asset like a LUT or an SVG: import_asset a .ttf / .otf file, and the summary reports the family names to write in font-family. Japanese and other CJK text needs an imported font — Roboto has no CJK glyphs, and characters missing from every loaded font render as boxes and are counted in a warning. inspect_image refuses a font revision on purpose: it is an asset, not an image.

Masks (local adjustments)

A mask is a grayscale image revision: its BT.709 luma is the weight, so white means "apply this operation at full strength" and black means "leave the pixel alone". Any of the 14 tone/filter ops (adjust, color_matrix, curves, levels, hsl, lut, white_balance, blur, median, unsharp_mask, convolve, grain, gradient_map, auto_levels) accepts one.

  1. generate_mask builds one deterministically against a reference image, with exactly that image's dimensions:
kindParametersWhat it selects
linear_gradientangle_degrees (0 = white at the top fading down, positive = clockwise), start, end (0..1 positions along the axis where the weight goes 1→0)A graduated filter (skies, foregrounds)
radial_gradientcenter_x, center_y (0..1 relative), radius (0..1 of the half-diagonal), feather (0..1 extra falloff band)A vignette or a subject spotlight
luminosity_rangemin, max (0..255), feather (luma units of soft shoulder outside the range)Highlights, midtones or shadows
color_rangehue_center (0..360), hue_width (1..180 half-width), feather (extra degrees)One hue family (sky blue, foliage green)

You can also import_asset your own grayscale image instead.

  1. Attach the returned revision_id to an operation:
json
{ "op": "curves", "master": [[0,0],[128,168],[255,255]],  "mask": { "revision_id": "rev_...", "invert": false, "feather_px": 8.0 } }

invert (default false) flips the weight to 1-w; feather_px (default 0.0) blurs the mask edge by that gaussian sigma in pixels of the current image.

  1. render_preview with overlay:"mask" and mask_revision_id tints the preview red where the weight exceeds 0.5 and dims it elsewhere, so the coverage can be checked before committing.

Masks are referenced by revision id exactly like LUTs, so the same caveat applies: the recipe hash includes the id, and the recipe only reproduces inside a workspace that holds that mask.

Layers

A recipe may carry a layers stack instead of (or in addition to) a flat operations list. Layers composite bottom-to-top, each layer's ops run against its own source before it is blended onto the running composite:

json
{  "layers": [    { "source": "base", "ops": [] },    {      "source": { "revision_id": "rev_..." },      "ops": [{ "op": "blur", "sigma": 8 }],      "blend_mode": "multiply",      "opacity": 0.6    }  ],  "operations": [    { "op": "resize", "width": 1600 },    { "op": "encode", "format": "webp", "quality": 82 }  ]}
  • source is either "base" (the input revision passed to apply_transform / render_preview) or {"revision_id": "rev_..."} (any other revision already in the workspace). Every layer's source must match the base image's dimensions exactly, or the recipe fails with a structured error before any pixel work happens.
  • ops is a normal operations list, applied to that layer's source alone.
  • mask, blend_mode (default "normal") and opacity (default 1.0) control how the layer composites onto the layers below it.
  • Blend mode is one of 16 W3C modes: the 12 separable modes normal, multiply, screen, overlay, darken, lighten, color_dodge, color_burn, hard_light, soft_light, difference, exclusion, plus the 4 non-separable modes hue, saturation, color, luminosity.
  • When layers is present, the top-level operations becomes the finishing pass, applied once to the composited result — this is where resize and the final encode belong (encode must still be last and appear at most once).
  • Call explain_operation {"operation":"layers"} for the full reference.

Presets

A preset can also be inlined inside a recipe as a single operation — {"op": "preset", "name": "ocr_document"} — so a named look can be combined with your own ops. The macro expands in place before anything runs, so the recipe hashes exactly as if you had written the preset's operations out by hand, and a preset that carries layers cannot be inlined (that is a structured error). Call explain_operation {"operation":"preset"} for the rules.

apply_transform and render_preview take either recipe (the raw DSL) or preset (a built-in named recipe from crates/atx-mcp/presets/) — exactly one of the two:

SetPresetWhat it does
basicseyecatch_16_9Center-crop to 16:9, resize to 1600px wide, WebP q82
basicsfilm_softSoft film look: gentle S-curve plus a 15% pull towards luma
basicsproduct_cleanClean product shot: near-neutral white balance, levels lift, light sharpen
basicsthumbnail_squareCenter-crop to 1:1, resize to 800x800, WebP q80
basicsweb_optimizeFit inside 2000x2000 without upscaling, WebP q80
basicsgrayscaleBlack and white via a BT.709 luma color_matrix
basicssepiaClassic sepia tone via color_matrix
filmfilm_warmWarm film stock: amber white balance, soft S-curve, light grain
filmfilm_coolCool film stock: blue-leaning white balance, soft S-curve, light grain
filmmatte_fadeFaded matte: lifted blacks via curves, slight desaturation
filmfilm_grain_strongHeavy, coarse grain over a gentle S-curve (pushed/high-ISO look)
filmcinema_teal_orangeTeal-and-orange cinematic grade via targeted hsl shifts
monobw_neutralNeutral black and white via a BT.709 luma color_matrix
monobw_high_contrastHigh-contrast black and white: luma conversion plus a strong S-curve
monobw_red_filterB&W through a simulated red filter (classic sky darkener)
monobw_softSoft, low-contrast black and white (matte curve)
monoduotone_navy_creamNavy-to-cream duotone via gradient_map
editorialproduct_whiteAuto levels stretch, neutral white balance, final sharpen
editorialfood_vividWarm orange/yellow saturation boost plus a contrast lift
editorialportrait_softSoft matte curve, light desaturation, subtle vignette
editoriallandscape_punchContrast + saturation lift plus a light vignette
editorialarchitecture_cleanAuto levels, sharpen, slight desaturation (pair with a manual perspective op)
socialog_1200x630Open Graph share image: crop 1200:630, resize to 1200 wide, WebP q82
socialx_wide_16_9X (Twitter) wide card: crop 16:9, resize to 1600 wide, WebP q82
socialinstagram_square_1080Instagram square post: crop 1:1, resize to 1080x1080, WebP q85
socialinstagram_portrait_4_5Instagram portrait post: crop 4:5, resize to 1080x1350, WebP q85
socialyoutube_thumb_1280x720YouTube thumbnail: crop 16:9, resize to 1280x720, WebP q85
socialhero_2400Large hero/banner image: fit inside 2400px, WebP q85
building blocksoft_vignetteSubtle vignette on its own, for stacking after other looks
building blockgrain_fineLight, fine, deterministic grain on its own, for stacking
ocrocr_documentMake a page/slide/whiteboard photo legible for a vision model: grayscale, auto levels, light sharpen (no binarization)
ocrocr_receiptNoisy or faded receipts: grayscale, median denoise, stronger auto levels, sharpen
ocrocr_binarizeSauvola adaptive binarization for external OCR engines (prefer ocr_document when a vision model reads the result)
ocrocr_dark_uiDark-mode screenshots: trim the margins, then invert to dark-on-light grayscale

A preset is pure sugar: it resolves to its recipe and flows through the normal pipeline, and the recipe_hash (the idempotency key) is computed on the resolved recipe — so a preset call and the equivalent raw recipe land on the same revision.

Guarantees

  • Deterministic: the same input + the same recipe always produces byte-identical output (regression-checked with golden tests)
  • Idempotent: recipes are normalized (keys sorted, f64 values quantized to a 1e-6 grid) and hashed with sha256. If (input revision, recipe hash) matches an existing pair, the existing revision is returned instead of a new one
  • Originals are protected: objects/ is an append-only, content-addressed store — there is no delete or overwrite API

Development

sh
cargo test --workspace     # unit + integration + property (proptest) testscargo clippy --workspace --all-targets -- -D warnings

Crate layout: atx-core (recipe/transform engine) / atx-geometry (tilt detection) / atx-store (immutable asset store) / atx-mcp (rmcp stdio server).

The three libraries are published on crates.io under longer names, because atx-core there is an unrelated project:

DirectoryPublished asLibrary name in code
crates/atx-coreasset-transform-coreatx_core
crates/atx-geometryasset-transform-geometryatx_geometry
crates/atx-storeasset-transform-storeatx_store
crates/atx-mcpatx-mcpatx_mcp (binary atx-mcp)

So to use the transform engine as a library, depend on asset-transform-core = "0.6.7" and write use atx_core::….

Name

"atx" stands for Asset Transform; the trailing x follows the familiar shorthand for "transform" (as in xform / tx). It was chosen as a short, easy-to-type binary name and directory prefix (crates/atx-core, etc.), and it has no relation to the PC ATX form factor or Markdown ATX-style headings. The crates.io packages spell the name out in full (asset-transform-core, and so on).

License

MIT. See LICENSE.

Non-crate material shipped inside the binary (the bundled Roboto Regular font) is listed with its source and license in THIRD_PARTY_NOTICES.md.

If atx-mcp saves you time, you can buy me a coffee ☕

来源:README.md,提交 8102267

工具

13

apply_transform

Apply transform

Apply a transform recipe at full resolution and issue a new revision. Pass either `recipe` ({"operations": [...]}, applied in order, at most one "encode" and it must be last) or `preset` (a built-in named recipe) - exactly one of the two - and either `revision_id` (one image) or `revision_ids` (the same recipe over a batch of up to 64; one failure does not abort the rest). Call list_operations for the operation catalog and the preset names, explain_operation for one operation's full schema. Idempotent: the same (revision_id, resolved recipe) returns the existing derived revision; a preset hashes identically to the equivalent raw recipe. Note: if the recipe's encode format is png, webp, or avif, any ICC color profile on the source is dropped (embedding is only supported for jpeg output); this is reported as a warning, not an error.

输入参数presetreciperevision_idrevision_ids

compare_revisions

Compare revisions

Scale two revisions to a long edge of 640px each and compose them on one canvas (side by side, or stacked) with an 8px gap, returned inline as a JPEG. A is placed left/top, B is placed right/bottom. Useful for before/after or A/B visual checks. layout="diff" instead requires A and B to share the exact same dimensions and returns a single pixel-difference heatmap plus mean_abs_diff/max_abs_diff/changed_pixel_ratio and an `ssim` score (structural similarity, 1.0 = identical). Every layout also reports `perceptual_hash_distance`: the Hamming distance between the two dHash values (0..=64), where 5 or less usually means the same picture re-encoded or resized and 20 or more means two different pictures.

输入参数layoutrevision_id_a必填revision_id_b必填

detect_document

Detect document

Detect the dominant quadrilateral (a sheet of paper, a screen, a whiteboard, a sign) in a revision with a contour-based search, and return it as a ready-to-paste perspective operation. This is to `perspective` what detect_tilt is to `rotate`: read-only, it never modifies the image, and a null quad means "do not correct". The quad is in post-EXIF-orientation pixel coordinates, ordered tl, tr, br, bl, and `output_size_hint` is exactly the size `perspective` will produce from it. Optional `min_area_ratio` (0.05..=1.0, default 0.2) is the smallest fraction of the frame a candidate may cover. When quad is null the reason is the first warning: no_quad_found, already_rectified (the page already fills the frame) or low_confidence.

输入参数revision_id必填min_area_ratio

detect_text_blocks

Detect text blocks

Find the text-like blocks (headline, paragraphs, table, caption) of a revision with a binarize + run-length smearing + connected-components pass, and report whether the text will survive a preview downscale. Read-only: it never modifies the image. Blocks come back in reading order (top to bottom, then left to right) in post-EXIF-orientation pixel coordinates, each with its line_count, median_line_height_px and ink_ratio. `legibility.line_height_at_1568_px` is the median line height once the whole image is shrunk to long edge 1568 (below ~16 the text is usually unreadable), and `legibility.recommended_bands` splits the image into crops that clear that bar - each entry is already a `crop` operation, so paste one into a recipe before render_preview `long_edge: 1568` and read them in order. `legibility.strategy` says how it split: "whole" (no split needed), "bands" (full-width horizontal bands) or "blocks" (per-block crops, used when the image is too wide for full-width bands to help). Optional `max_blocks` (1..=128, default 32) and `min_block_area_ratio` (0.0..=1.0, default 0.00005) bound how many and how small the blocks may be. No block found means the image has no text-like structure, not an error.

输入参数max_blocksrevision_id必填min_block_area_ratio

detect_tilt

Detect tilt

Detect the tilt (roll) of a revision: Canny + Hough dominant lines for coarse candidates, refined below 0.1 degree with an edge projection-profile search. Horizontal-only and vertical-only estimates are reported separately so a disagreement can be read as perspective/camera position rather than roll, Set include_score_curve=true to also get the whole search range as a score curve (omitted by default to keep the answer small). Read-only: it never modifies the image. A null recommended angle means "do not correct".

输入参数revision_id必填max_abs_angleinclude_score_curve

explain_operation

Explain operation

Full reference for one recipe operation: every parameter with its type, range, required/default status and semantics, one or two ready-to-paste JSON examples, and the gotchas worth knowing before using it. A built-in preset name works too and returns its full operation list, so a preset can be read and copied as a raw recipe. An unknown name returns a structured error listing every valid operation and preset. Read-only.

输入参数operation必填

export_asset

Export asset

Copy revisions' bytes out of the workspace. Pass either `revision_id` + `dest_path` (one file) or `revision_ids` + `dest_dir` (a batch of up to 64 into one existing directory; one failure does not abort the rest) - exactly one of the two forms. For a batch, `filename_template` (default "{revision_id}.{ext}") builds each file name from {revision_id} / {index} (1-based, zero-padded) / {ext} (from the MIME type) / {stem} (the file name the lineage was imported from); it must be a plain file name, and if two entries would collide nothing is written. Refuses to overwrite an existing file unless overwrite=true (ask the user first), and never writes inside the workspace store or through a symbolic link.

输入参数dest_dirdest_pathoverwriterevision_idrevision_idsfilename_template

generate_mask

Generate mask

Generate a deterministic grayscale mask as a new PNG revision, with exactly the dimensions of `reference_revision_id`. `kind` is "linear_gradient" (angle_degrees, start, end), "radial_gradient" (center_x, center_y, radius, feather), "luminosity_range" (min, max, feather) or "color_range" (hue_center, hue_width, feather); the gradients use only the reference's dimensions, the other two compute weights from its pixels. White = the masked operation applies fully, black = not at all. Reference the returned revision_id from any tone/filter operation as "mask": {"revision_id": "rev_...", "invert": false, "feather_px": 0}, or visualise it with render_preview overlay="mask". Idempotent: the same params over the same reference produce byte-identical PNG bytes and return the existing revision.

输入参数endmaxminkind必填startradiusfeathercenter_xcenter_yhue_widthhue_centerangle_degrees另有 1 个

import_asset

Import asset

Import a local image file into the workspace and issue an immutable revision. Pass either `path` (one file) or `paths` (a batch of up to 64; one bad file does not abort the batch, it lands in `failed`) - exactly one of the two. Idempotent: importing the same bytes again returns the existing revision. If the imported bytes are already the output of a recipe held in this workspace, the result carries a warning plus `already_derived_from` so the same recipe is not applied twice.

输入参数pathpaths

inspect_image

Inspect image

Inspect a revision: dimensions, MIME type, byte size, alpha/ICC presence, EXIF orientation and summary, whether GPS (PII) metadata is present, luma statistics, a `sharpness` score (variance of the Laplacian - relative, so compare it against a known-good capture rather than an absolute; for documents below ~30 usually means motion blur or defocus) and a `perceptual_hash` (dHash, 16 hex digits) for telling "is this the same picture?" without comparing pixels. Set include_exif=true to also get every EXIF field as {ifd, tag, value} entries; it is off by default because the full dump can carry GPS coordinates and names.

输入参数revision_id必填include_exif

list_assets

List assets

List revisions in the workspace ledger (lineage, recipe hash, dimensions, sizes).

输入参数asset_id

list_operations

List operations

Compact catalog of the recipe vocabulary: every operation with a one-line description and its parameter names with terse type/range hints, plus the built-in preset names. Optional `category` ("geometry" | "color" | "filter" | "output") narrows the list. Call explain_operation for the full schema of one operation. Read-only.

输入参数category

render_preview

Render preview

Render a recipe as a small JPEG preview (long edge <= 768 by default) and return it inline plus a file path, so the composition can be checked before committing to apply_transform. Takes either `recipe` or `preset`, exactly like apply_transform - or NEITHER, which previews the revision as it is (use this with overlay="grid" to read crop coordinates off an image before writing a recipe). Optional `long_edge` (256..=1568) sets the preview size: raise it to 1568 when the point of the preview is to READ text in the image; 768 is too small for that. Optional `overlay` ("grid" | "thirds" | "horizon") draws semi-transparent composition guide lines on the returned preview only (never on the apply_transform output). overlay="mask" instead visualises a mask: pass `mask_revision_id` (required for this overlay and rejected for the others) and the preview is tinted red where the mask weight exceeds 0.5 and dimmed elsewhere, so the coverage can be eyeballed. Note: if the recipe's encode format is png, webp, or avif, any ICC color profile on the source is dropped (embedding is only supported for jpeg output); this is reported as a warning, not an error.

输入参数presetrecipeoverlaylong_edgerevision_id必填mask_revision_id

版本历史

7
  1. v0.6.7最新Oct 26, 2026
  2. v0.6.5Oct 6, 2026
  3. v0.6.4Sep 30, 2026
  4. v0.6.3Sep 29, 2026
  5. v0.6.2Sep 18, 2026
  6. v0.6.1Sep 16, 2026
  7. v0.6.0Sep 16, 2026

评分

已满足适用检查项的 90%

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

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

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

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