pixinsight-mcp
This server exposes about 80 PixInsight operations over MCP, letting an AI agent directly drive PixInsight for image processing, analysis, and astrometry.
Image management: open, close, list, rename, clone, restore, crop, export, and get dimensions/stats for views.
Execution: run arbitrary PixInsight processes, PJSR scripts/files, and PixelMath expressions; inspect available processes and parameters.
Astrometry & calibration: plate solve with ImageSolver, copy WCS solutions, run SPFC/SPCC/MGC, find filters/QE curves.
Channels & color: combine RGB channels, align to reference, per-channel ABE, LRGB combine, narrowband blending, synthetic luminance.
Masks: create luminance/zone/adaptive masks, apply/remove/close masks.
Processing tools: SCNR, gradient/background correction, NoiseXTerminator, BlurXTerminator, StarXTerminator, ABE, HDRMT, Curves, LHE, LinearFit.
Detail & stars: multi-scale LHE, shell detail enhancement, star-protected blending, star color restoration.
Stretch & tone: robust median stretch, star stretch, auto-stretch, continuous clamp.
Measurement: stars, sharpness, ringing, clipping, saturation, tonal presence, uniformity, highlight texture, subject detail.
Workspace & previews: set/inspect workspace, scan for XISF/FITS, save JPEG previews, resume bridge, list tool packs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pixinsight-mcp Open the latest image and apply a screen transfer stretch so I can see it."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pixinsight-mcp
pixinsight-mcp gives an AI agent hands inside PixInsight: a toolbox of about 80 PixInsight operations exposed over MCP, used by agent chat sessions and by the skills that guide them.
It contains no processing workflow. No pipeline, no ordering, no recommended parameters, no opinion about what makes a good image. Deciding what to do is the job of you, your chat session and your own skills, and that knowledge stays in your repositories, public or private, under your control.
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#1e40af', 'primaryTextColor': '#ffffff', 'primaryBorderColor': '#1e3a8a',
'secondaryColor': '#5b21b6', 'secondaryTextColor': '#ffffff', 'lineColor': '#64748b', 'textColor': '#f8fafc', 'clusterBkg': '#1e293b', 'clusterBorder': '#475569', 'edgeLabelBackground': '#334155'}}}%%
flowchart LR
classDef yours fill:#5b21b6,stroke:#4c1d95,stroke-width:1px,color:#ffffff
classDef harness fill:#0e7490,stroke:#155e75,stroke-width:1px,color:#ffffff
classDef repo fill:#1e40af,stroke:#1e3a8a,stroke-width:1px,color:#ffffff
classDef app fill:#334155,stroke:#1e293b,stroke-width:1px,color:#f8fafc
subgraph decides["Decides what to do — yours, not this repo"]
You("You, in a chat session"):::yours
Skills("Your skills<br/>order, tuning, gotchas"):::yours
end
subgraph agent["Any MCP agent harness"]
Harness("Claude Code · Codex · Cursor<br/>OpenCode · Windsurf · VS Code<br/>Gemini CLI · Zed"):::harness
end
subgraph conn["pixinsight-mcp — this repo: operates PixInsight, nothing more"]
Tools("~80 capability tools<br/>open · stats · run_process · pixelmath<br/>masks · stretch · blend · measure"):::repo
Bridge("Bridge<br/>starts PixInsight and its<br/>script, talks over files"):::repo
end
PI("PixInsight<br/>1.9.5+"):::app
You --> Harness
Skills -.->|guides| Harness
Harness -->|MCP tool calls| Tools
Tools --> Bridge
Bridge <-->|PJSR| PIInstall
Install once, pinned to a release: npm install -g github:mxcoppell/pixinsight-mcp#v1.2.2 (Node 22+ and git on PATH); every harness then runs the command pixinsight-mcp, which starts in under a second and needs no network. Upgrade by re-running with the new tag.
No install: npx -y github:mxcoppell/pixinsight-mcp#v1.2.2 instead, but npx asks GitHub on every start, so the server fails to start while GitHub is unreachable. Nothing to clone, no path to configure: PixInsight and its watcher start on the first tool call. Check: pixinsight-mcp doctor.
Target folder. The tools work in the folder set_workspace names, else PIXINSIGHT_MCP_WORKSPACE (~/ allowed), else the launch folder; Claude Desktop has no useful one, so set the bundle's Target folder option or call set_workspace. PixInsight cannot run a script from a path containing a comma (or a double quote), so such a target is refused: rename the folder or set PIXINSIGHT_MCP_STATE to a folder without one.
The connector writes only <target>/agentic/ (scratch, the bridge and its watcher script, logs) and <target>/output/, nothing in your home folder; PIXINSIGHT_MCP_STATE replaces agentic/ (resolved against the target; an absolute path moves it, bridge and watcher script included, outside the target: the one explicit exception); PixInsight keeps its own settings, swap and temp files where it always does (ImageSolver's star lists, for one, when run_pjsr code calls it; run_plate_solve puts them under agentic/scratch/).
Every tool call, with the PJSR it sent and PixInsight's reply, is logged as JSONL in <target>/agentic/logs/ (paths and code: check before sharing); PIXINSIGHT_MCP_LOG=0 turns this off. The log file opens in the workspace of the first call that uses one (a set_workspace is logged in the workspace it sets), so a launch folder you leave before any call uses it gets nothing; calls made before that are written into the file that opens, or nowhere if none does. workspace_info and doctor show every folder in use.
Harness | Config | Where |
Claude Code |
|
|
Codex CLI |
|
|
Cursor |
|
|
OpenCode |
|
|
Windsurf |
|
|
VS Code / Copilot |
|
|
Gemini CLI |
|
|
Zed |
|
|
Cline |
|
|
Kiro |
|
|
Claude Desktop |
|
|
Every mcpServers entry is {"pixinsight": {"command": "pixinsight-mcp"}} (npx: "command": "npx", "args": ["-y", "github:mxcoppell/pixinsight-mcp#v1.2.2"]),
plus an optional env; a harness that cannot find the command takes its full path (npm prefix -g, then bin/). Three shapes differ: Codex is TOML under mcp_servers (underscore);
OpenCode wants command as an array; VS Code names the top-level key servers.
OS | PixInsight looked for at | Status |
macOS |
| verified |
Windows |
| unverified — set |
Linux |
| unverified — set |
Related MCP server: gimp-mcp
Cross-platform
macOS, Windows and Linux are all first-class, for running this connector and for developing it. A change that works on one OS and breaks another is a bug, not a limitation.
No shell pipelines. No
ps,grep,awk,wc,dfor&&insrc/or in npm scripts. OS-specific behaviour goes behindsrc/platform.mjs(paths) orsrc/process-probe.mjs(process inspection), one implementation per OS.No POSIX path literals. Use
path.join. Use forward slashes only when handing a path to PixInsight, which accepts them everywhere.CI runs the full suite on Linux, macOS and Windows. Green on one is not green.
Degrade, never fail. If an OS cannot supply something optional — a memory reading, a process start time — carry on without it. Never report it as a crash.
Overrides always win:
PIXINSIGHT_BINfor the executable,PIXINSIGHT_DIRfor the install root.
Tests need no PixInsight and no astronomy software, so you can develop on any of the three.
Models
Needs | Why |
Vision — required |
|
Sonnet-class or better | weaker models lose tool-call reliability and error discipline first |
Long multi-step tool use | tens to a hundred sequential calls, some taking minutes, all state inside PixInsight |
Long context | skill text, ~80 tool schemas and a transcript of numeric results |
Closed: the Claude Sonnet/Opus, GPT-5 and Gemini Pro families. Open-weight: multimodal lines such as Kimi, MiniMax and Qwen's vision checkpoints. The trap: pick a family's multimodal checkpoint, not its coding one — top open coding models are often text-only.
Tools
78 tools. Generated by npm run docs:tools from the live catalog; do not edit by hand.
Tool | Group | What it does |
| Astrometry | Plate solve an open image with ImageSolver against the local Gaia DR3/SP database (offline) |
| Astrometry | Copy the astrometric solution (WCS) and observation keywords from a source image file to a target view |
| Channels | Combine 3 mono views into a single RGB color image using ChannelCombination |
| Channels | Align a target image to a reference image using StarAlignment |
| Channels | Run AutomaticBackgroundExtractor (ABE) separately on the R, G and B channels of a color view, then recombine them into the view with ChannelCombination |
| Channels | Replace the lightness of an RGB view with a grayscale L view using LRGBCombination, in place on the RGB view |
| Detail | Masked three-scale LocalHistogramEqualization on a view, in one call, with an optional HDRMultiscaleTransform pass |
| Detail | Protected high-pass detail enhancement at two scales, in place |
| Execute | Run a PJSR (JavaScript, V8 engine) snippet inside PixInsight and return its console output |
| Execute | Run an arbitrary PixelMath expression in place on a view |
| Execute | Run PixelMath to create a NEW image from expressions that reference other open views by id |
| Execute | Instantiate any PixInsight process by its PJSR constructor name, assign JSON-valued parameters onto the instance, and execute it on a view (when view_id is given) or globally (when it is omitted) |
| Execute | Run a PJSR (JavaScript, V8 engine) source file from disk inside PixInsight and return its console output |
| Images | Open an XISF/FITS image file in PixInsight |
| Images | Close an image window to free memory |
| Images | List all currently open images in PixInsight with their dimensions and color status |
| Images | Rename an image view to a different view ID |
| Images | Clone an image to a backup view, which can be restored from later with restore_from_clone |
| Images | Restore an image from a backup clone, replacing all changes since the clone was made |
| Images | Crop pixels off the edges of an image, in place |
| Images | Get dimensions, channel count, and color status for one or more views |
| Images | Get image statistics: median, MAD, min, max, per-channel medians |
| Images | Write an image to a file in the workspace's output or state folder |
| Introspect | List every PixInsight process available on this installation, by its PJSR constructor name (e.g. "SCNR", "PixelMath") |
| Introspect | Describe one PixInsight process by its PJSR constructor name: whether it can run on a view and/or globally, its current parameter values and their types, and any named numeric constants it exposes for those parameters |
| Masks | Create a luminance mask from a color view: Y = 0.2126R + 0.7152G + 0.0722B, then an optional blur and shadow clip |
| Masks | Apply a mask to a target view |
| Masks | Remove the current mask from a view |
| Masks | Close and delete a mask window to free memory |
| Masks | Create core, shell and halo masks from three fixed luminance thresholds |
| Masks | Create three masks from percentiles of the image's own luminance |
| Measure | Measure background uniformity via 4-corner median stddev |
| Measure | Measure the stars of a view by pixel sampling |
| Measure | Measure a star layer (a mostly black view holding stars) |
| Measure | Measure concentric oscillation around the brightest region |
| Measure | Measure sharpness as the mean Sobel gradient energy (gx² + gy²) of luminance over every 4th pixel of a region |
| Measure | Measure how much of the brightest region is above a level |
| Measure | Count image blocks with pixels above a level |
| Measure | Measure the texture of the bright subject zone |
| Measure | Measure HSV saturation, (max - min) / max, of subject pixels of a colour view: every 8th pixel whose luminance is above the luminance of the channel medians + 5 x (median |luminance - that| on a 32 px grid) |
| Measure | Measure subject and background tones |
| Measure | Measure chroma, (max - min) / max, of the bright pixels of a colour view: every 8th pixel whose mean of R, G and B is above brightness_threshold |
| Measure | Measure subject brightness, detail and contrast |
| Narrowband | Add Ha to the red channel of an RGB view in place, where Ha exceeds R by a given fraction |
| Narrowband | Raise the luminance of an RGB view in place where Ha exceeds it, keeping colour ratios |
| Narrowband | Create a mono view from the B channel of an RGB view minus its scaled R channel |
| Narrowband | Subtract the scaled R channel of an RGB view from an Ha view, in place |
| Narrowband | Add Ha and OIII (mono views) to an RGB view in place, through a temporary luminance mask |
| Narrowband | Create a mono view from a weighted sum of Ha and OIII |
| Preview | Save a JPEG preview of a view and return the file path |
| Preview | Alias for save_preview |
| Processes | Run SCNR (Subtractive Chromatic Noise Reduction) to remove a green colour cast from a view |
| Processes | Run GradientCorrection on a view to remove a background gradient |
| Processes | Run BackgroundNeutralization to equalize the background level across channels |
| Processes | Run NoiseXTerminator to reduce noise on a view |
| Processes | Run LinearFit to scale a linear image to match a reference view |
| Processes | Run LocalHistogramEqualization (contrast-limited local histogram equalization) on a view |
| Processes | Run BlurXTerminator on a view |
| Processes | Run StarXTerminator to separate stars from a view, replacing it in place with the starless result and producing a separate stars view |
| Processes | Run AutomaticBackgroundExtractor (ABE) on a view, replacing it in place with the corrected result |
| Processes | Run HDRMultiscaleTransform on a view |
| Processes | Apply a CurvesTransformation to a view |
| Processes | Search PixInsight's built-in filter and camera QE database by name (case-insensitive substring) |
| Processes | Run SpectrophotometricFluxCalibration: writes the flux metadata that run_mgc requires |
| Processes | Run SpectrophotometricColorCalibration (SPCC) |
| Processes | Run MultiscaleGradientCorrection using the MARS reference database |
| Session | Report the resolved PixInsight installation paths for this platform and the connector version |
| Stars | Blend a stars-only image into a starless one in place, as a screen blend that turns colour-preserving in bright star cores |
| Stars | Restore the colour ratios of a reference view in the bright areas of a target, in place, keeping the target's luminance |
| Tone | Stretch a linear view in place so its median lands on target_median |
| Tone | Stretch a linear star image in place with a pedestal subtraction and a repeated midtones transfer function |
| Tone | Stretch a view in place with PixInsight's auto-stretch (the ScreenTransferFunction Auto Stretch computation), applied as a HistogramTransformation |
| Tone | Compress bright values in place above a knee that varies per pixel |
| Workspace scan | Scan the working folder (recursively, any subfolder name) for XISF/FITS files and report each one's FILTER header value, geometry, exposure, whether it has an astrometric solution (WCS keywords CTYPE/CRVAL with a CD, CDELT or PC matrix, or PixInsight's PCL:AstrometricSolution properties), and its INSTRUME, TELESCOP, FOCALLEN, XPIXSZ, YPIXSZ and XBINNING keywords verbatim (null when absent) |
| Server | Report the workspace folder, the state directories under it (scratch, bridge, logs) and the output folder |
| Server | Set the workspace folder this session's files go under (scratch files, the bridge, call logs) |
| Server | Allow PixInsight commands again after the user pressed Pause/Abort |
| Server | List the runtime tool packs discovered at server startup, with load status, tool counts, why any pack was skipped, and which core tools packs replaced |
Packs
A pack is an ES module outside this repo that adds tools, or replaces core ones, in every session. List its
folder or .mjs file in PIXINSIGHT_MCP_PACKS; list_packs and doctor show what
loaded and why. A pack is arbitrary code running with your privileges: only packs you configure load,
and nothing is ever fetched. Writing and loading one: CONTRIBUTING.md.
Skills are where technique lives — yours or the community's
The connector ships capability only: every tool takes the values that shape the picture as inputs and reports numbers, never a verdict. Which tools, in what order, with which values, and what counts as good enough is technique, and it lives in skills: markdown (a validated order, what to ask the user first, the values and thresholds to use, what to check at each step) in repositories anyone can publish or keep private. A pack can still add your own formulas as tools. A workflow that works becomes a repository others install in one line.
Have one that works? Add it to COMMUNITY.md in a one-line PR.
Contributing
A PixInsight capability with no tool yet → CONTRIBUTING.md: one module in
src/tools/, no registry.A pack or a skill → COMMUNITY.md; no connector change needed.
Humans and agents both welcome.
npm testneeds no PixInsight.
Credit, and why this was rearchitected
This project began as aescaffre/pixinsight-mcp by Alain Escaffre, who built the file-IPC bridge, the PJSR watcher, and most of the tool catalog this connector inherits. MIT then, MIT now.
That project aimed at a fully autonomous processing pipeline: connector, LLM orchestrator and a large body of processing knowledge in one repository. For a connector that meant hard-won, personal knowledge (tuned parameters, orderings, blend formulas) shared publicly rather than on its authors' terms, no install without cloning (in practice for one harness), and a 3,000-line catalog to navigate to add one tool. So the pipeline was retired and the repository split: the connector stays generic and installable; the knowledge moved to repositories its authors control.
Troubleshooting
Symptom | Cause and fix |
The harness says the server failed to start or connect | Started with |
| Not at the default path: set |
A long call is dropped after about a minute | The harness timed out. The server sends progress keepalives only when the harness requests progress (sends a |
| A view id was mistyped or the view was closed; the error lists the views that are open |
| It needs an RA/Dec seed near the true center ( |
| PixInsight runs one script at a time: a session in another target folder (or a 1.0 session, or a long script) may hold it, so retry when it is free and restart any 1.0 session after upgrading. Or PixInsight could not open the watcher script: its Process Console says why |
| Pause/Abort was pressed in PixInsight; nothing runs until you say continue and the agent calls |
Available Tools
78 toolsalign_to_referenceA
Align a target image to a reference image using StarAlignment. The target is replaced in place with the aligned version.
Inputs: target_id (required), reference_id (required).
apply_maskA
Apply a mask to a target view. The mask protects areas where it is black (0) and allows processing where it is white (1). Use inverted=true to flip this.
Inputs: mask_id (required), target_id (required), inverted.
auto_stretchA
Stretch a view in place with PixInsight's auto-stretch (the ScreenTransferFunction Auto Stretch computation), applied as a HistogramTransformation. Per channel, sigma = 1.4826 × MAD (the median absolute deviation from the median). A channel whose median is below 0.5 gets shadows clipping c0 = median + shadows_clipping × sigma, clamped to [0,1] (0 when sigma is 0), and midtones balance m = MTF(target_bg, median − c0), where MTF(m, x) = (m − 1)·x / ((2m − 1)·x − m); a channel whose median is above 0.5 is treated as inverted: highlights clipping c1 = median − shadows_clipping × sigma (1 when sigma is 0) and m = MTF(c1 − median, target_bg). linked: one transform for R, G and B, with c0 (or c1) the mean over channels of the per-channel clipping points (a channel with sigma 0 adds 0, or 1 for c1) and the mean median in place of the median; the image is treated as inverted only when every channel median is above 0.5. The defaults of shadows_clipping, target_bg and linked are PixInsight's auto-stretch defaults. Fails, changing nothing, when the clipping point leaves no range for a midtones balance.
Inputs: view_id (required), linked, target_bg, shadows_clipping.
clone_imageA
Clone an image to a backup view, which can be restored from later with restore_from_clone.
Inputs: clone_id (required), source_id (required).
close_imageA
Close an image window to free memory.
Inputs: view_id (required).
close_maskA
Close and delete a mask window to free memory.
Inputs: mask_id (required).
combine_channelsA
Combine 3 mono views into a single RGB color image using ChannelCombination. All 3 views must have identical dimensions. Returns the view ID of the combined image.
Inputs: b_view_id (required), g_view_id (required), output_id (required), r_view_id (required).
continuous_clampA
Compress bright values in place above a knee that varies per pixel. A luminance image (Rec.709 weights for colour) is blurred with a Gaussian of sigma blur_sigma and divided by its maximum, giving L in [0,1]; the knee is min_clamp + (max_clamp − min_clamp)·(1 − L), so it equals min_clamp where L = 1 and max_clamp where L = 0. mode soft: a value above the knee becomes knee + headroom·(1 − exp(−rate·(value − knee)/headroom)); mode hard: min(value, knee). The same expression is applied to every channel and the result is truncated to [0,1].
Inputs: mode (required), view_id (required), max_clamp (required), min_clamp (required), +3 more.
continuum_subtract_haA
Subtract the scaled R channel of an RGB view from an Ha view, in place. Ha = max(0, Ha - continuum_factor * R). Runs as 64-bit PixelMath truncated to [0,1]; reports the new median and max.
Inputs: ha_id (required), rgb_id (required), continuum_factor (required).
copy_astrometric_solutionA
Copy the astrometric solution (WCS) and observation keywords from a source image file to a target view. Source and target must have the same dimensions; the target's pixels are unchanged.
Inputs: target_id (required), source_file (required).
create_adaptive_zone_masksA
Create three masks from percentiles of the image's own luminance. Subject pixels are those brighter than the background median + 5 MAD, sampled inside a circle of radius 0.35 * min(width, height) around their brightness-weighted centroid. Core = above the subject percentile 85 + 10 * core_bias; shell = a triangular ramp between the 25th percentile and the core level, peaking at their midpoint; outer = subject level up to the 25th percentile. Each is feathered over 20 px outside the circle and Gaussian-blurred with sigma 5, 10 and 20. Creates views azone_core, azone_shell and azone_outer, replacing views of those names; fewer than 50 sampled subject pixels is an error.
Inputs: view_id (required), core_bias.
create_luminance_maskB
Create a luminance mask from a color view: Y = 0.2126R + 0.7152G + 0.0722B, then an optional blur and shadow clip.
Inputs: mask_id (required), source_id (required), blur, gamma, +1 more.
create_synthetic_luminanceA
Create a mono view from a weighted sum of Ha and OIII. It is ha_weight * Ha + oiii_weight * OIII, replacing any view of that name; with max_value the result is min(…, max_value); it is then truncated to [0,1]. Reports the new view's median and max.
Inputs: ha_id (required), oiii_id (required), ha_weight (required), oiii_weight (required), +2 more.
create_zone_masksA
Create core, shell and halo masks from three fixed luminance thresholds. Luminance is the Rec.709 luma of a color view, the samples of a gray one: core = above core_clip, shell = shell_clip to core_clip, halo = halo_clip to shell_clip, each ramped linearly from 0 to 1 across its band and Gaussian-blurred with sigma 8, 12 and 20. Creates views mask_core, mask_shell and mask_halo, replacing views of those names. Requires halo_clip < shell_clip < core_clip < 1.
Inputs: view_id (required), core_clip (required), halo_clip (required), shell_clip (required).
crop_imageA
Crop pixels off the edges of an image, in place. Amounts are pixels to remove from each side.
Inputs: view_id (required), top, left, right, +1 more.
describe_processA
Describe one PixInsight process by its PJSR constructor name: whether it can run on a view and/or globally, its current parameter values and their types, and any named numeric constants it exposes for those parameters.
Inputs: name (required).
dynamic_narrowband_blendA
Add Ha and OIII (mono views) to an RGB view in place, through a temporary luminance mask. R += ha_strength * Ha; B += oiii_strength * OIII; G += f * ha_strength * g_ha_fraction * Ha + (1 - f) * g_strength * OIII, with f = (OIIIHa)^(1-OIIIHa). Each channel above max_output becomes max_output + (x - max_output) * rolloff. The mask is the Rec.709 luminance of the target, Gaussian-blurred with sigma mask_blur, then 0 below mask_clip and (x - mask_clip) / (1 - mask_clip) above it; it is removed afterwards. Runs as 64-bit PixelMath truncated to [0,1]; reports the median and the R and B maxima.
Inputs: ha_id (required), oiii_id (required), rolloff (required), mask_blur (required), +7 more.
export_imageA
Write an image to a file in the workspace's output or state folder. A relative file_path is resolved under /output; an absolute one must lie inside /output or the state folder (/agentic by default), and a path anywhere else is refused. Format comes from the extension: .tif/.tiff, .png, .jpg/.jpeg, .xisf, .fits. TIFF and PNG default to 16-bit, JPEG to 8-bit; use 32 for float. The working image is not changed. Missing parent folders are created.
Inputs: view_id (required), file_path (required), bits.
extract_pseudo_oiiiA
Create a mono view from the B channel of an RGB view minus its scaled R channel. OIII = max(0, B - continuum_factor * R); any view of that name is replaced. Reports the new view's median and max.
Inputs: rgb_id (required), continuum_factor (required), output_id.
find_filtersA
Search PixInsight's built-in filter and camera QE database by name (case-insensitive substring). A grouped name also matches each name it stands for ("Sony IMX411/455/461/533/571" matches "IMX455"); results are ordered exact name, then substring, then grouped-name matches. Use it to pick exact names for run_spfc or run_spcc. Sensor QE curves have channel Q.
Inputs: query, channel.
get_image_dimensionsA
Get dimensions, channel count, and color status for one or more views. Every channel must have identical dimensions before ChannelCombination.
Inputs: view_ids (required).
get_image_statsB
Get image statistics: median, MAD, min, max, per-channel medians.
Inputs: view_id (required).
ha_inject_luminanceA
Raise the luminance of an RGB view in place where Ha exceeds it, keeping colour ratios. With Y the Rec.709 luminance, each channel is multiplied by (Y + strength * max(Ha - Y, 0)) / Y. Runs as 64-bit PixelMath truncated to [0,1].
Inputs: ha_id (required), strength (required), target_id (required).
ha_inject_redA
Add Ha to the red channel of an RGB view in place, where Ha exceeds R by a given fraction. Where Ha > R * (1 + brightness_limit), R becomes R + strength * (Ha - R); elsewhere R, and G and B everywhere, are unchanged. With max_output and rolloff, R above max_output becomes max_output + (R - max_output) * rolloff. Runs as 64-bit PixelMath truncated to [0,1]; reports the new R maximum and the image median and max.
Inputs: ha_id (required), strength (required), target_id (required), brightness_limit (required), +2 more.
linear_fitB
Run LinearFit to scale a linear image to match a reference view. The reference is not modified.
Inputs: view_id (required), reference_id (required), reject_low, reject_high.
list_open_imagesA
List all currently open images in PixInsight with their dimensions and color status.
Inputs: no named parameters.
list_packsA
List the runtime tool packs discovered at server startup, with load status, tool counts, why any pack was skipped, and which core tools packs replaced. Read-only.
Inputs: no named parameters.
list_processesA
List every PixInsight process available on this installation, by its PJSR constructor name (e.g. "SCNR", "PixelMath"). Read-only; classifies by prototype chain and never instantiates a process to build the list.
Inputs: no named parameters.
lrgb_combineA
Replace the lightness of an RGB view with a grayscale L view using LRGBCombination, in place on the RGB view. Only the L channel is enabled, so the RGB view keeps its own color channels. lightness and saturation are LRGBCombination's transfer-function midtones balances mL and mc (0.5 leaves that component unchanged). When linear_fit_reject_high is given, the call also runs LinearFit on the L view (modified in place, ahead of the combination) against a temporary luminance image 0.2126 R + 0.7152 G + 0.0722 B of the RGB view; when it is omitted, no LinearFit runs. Chrominance noise reduction and highlight clipping are left at PixInsight's defaults.
Inputs: l_id (required), rgb_id (required), lightness (required), saturation (required), +1 more.
measure_bright_chromaA
Measure chroma, (max - min) / max, of the bright pixels of a colour view: every 8th pixel whose mean of R, G and B is above brightness_threshold. Returns JSON: median_chroma, mean_chroma, p25_chroma, p75_chroma, bright_pixel_count. A mono view is an error.
Inputs: view_id (required), brightness_threshold (required).
measure_clipped_blocksA
Count image blocks with pixels above a level. Tiles the image in block_size px blocks and samples every 3rd pixel; a sample counts when its luminance or any channel is above level, and a block counts when more than block_fraction of its samples do. Returns JSON: blocks_over, total_blocks, locations (up to 10 counted blocks in descending fraction order: x, y, fraction). luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: level (required), view_id (required), block_fraction (required), block_size.
measure_core_clippingA
Measure how much of the brightest region is above a level. Around the brightest 64 px block (mean luminance), counts pixels with any channel above level in a 128 px box (every 2nd pixel) and a 32 px box (every pixel), both centred on that block and held inside the image. Returns JSON: fraction_above_wide, fraction_above_inner, peak (largest luminance in the wide box), core_center [x, y], wide_box, inner_box. luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: level (required), view_id (required).
measure_highlight_textureA
Measure the texture of the bright subject zone. Subject pixels have luminance above median + 5 x (median |luminance - median| on a 32 px grid). The ROI is a circle around the luminance-weighted centroid of compact subject pixels (8 px grid, at least 2 of 4 neighbours 3 px away also subject), radius = their 90th-percentile distance held to [50 px, 0.45 x min(width, height)]. The shell zone is the P20..P92 band of the subject pixels in the ROI (every 4th pixel). local_stddev = median luminance stddev of 16 px blocks in the ROI whose samples are at least 40% shell; tonal_span = P90 - P10 of the shell pixels; gradient_energy = mean Sobel energy on shell pixels. With reference_id, the reference is measured over the same ROI and retention is current / reference for each value (null where the reference value is at most 0.0001, or 0.001 for tonal_span). Returns JSON: current, reference, retention, shell_zone, roi, shell_pixel_count, block_count. Fewer than 100 subject pixels in the ROI of either view is an error. luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: view_id (required), reference_id.
measure_ringingA
Measure concentric oscillation around the brightest region. The centre is the middle of the brightest 64 px block (mean luminance); the radial luminance profile is averaged over 36 angles for radii 1..150 px (held inside the image). Along the profile, derivatives within ±0.001 carry no sign; at each sign change the summed |derivative| of the run it ends is its amplitude, and it is counted when that amplitude is above min_amplitude. Returns JSON: oscillations, max_amplitude (of the counted ones), center [x, y], profile_sample (the profile at radii 1..30). luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: view_id (required), min_amplitude (required).
measure_saturationA
Measure HSV saturation, (max - min) / max, of subject pixels of a colour view: every 8th pixel whose luminance is above the luminance of the channel medians + 5 x (median |luminance - that| on a 32 px grid). Returns JSON: median, p90, p99, max, subject_pixel_count. A mono view is an error. luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: view_id (required).
measure_sharpnessA
Measure sharpness as the mean Sobel gradient energy (gx² + gy²) of luminance over every 4th pixel of a region. The region is roi_x/roi_y/roi_w/roi_h when all four are given (it must lie inside the image), else the central half of the image in each dimension. Returns JSON: sharpness, samples, roi {x, y, w, h}. luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: view_id (required), roi_h, roi_w, roi_x, +1 more.
measure_star_layerA
Measure a star layer (a mostly black view holding stars). Over every 4th pixel whose largest channel is above 0.005 (nonzero_pixel_count), reports the fraction whose largest channel is above each of the given levels, the interquartile range of their HSV saturation (color_diversity), and the median (max - min) / max of the 20 brightest by R+G+B (bright_star_chroma). Also the largest channel value (max) and the image median (the mean of the channel medians for colour). Returns JSON: max, median, fraction_above {level: fraction}, color_diversity, bright_star_chroma, nonzero_pixel_count.
Inputs: levels (required), view_id (required).
measure_starsA
Measure the stars of a view by pixel sampling. Candidates are local maxima of luminance found by a 16 px grid scan above median + 5 x MAD, refined within 5x5, de-duplicated within 20 px (at most 100 kept); the 30 brightest are measured. FWHM of a star = 2 x the mean radius, over the four axis directions (up to 10 px), where luminance drops below half its peak; colour diversity of a star = max - min of its peak RGB divided by the largest channel. Returns JSON: median_fwhm_px, color_diversity (median), stars_found, stars_measured, median_peak, p25_peak, background_median, star_background_contrast (median_peak / background_median, 0 when background_median <= 0.001), and up to 10 samples of each. luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: view_id (required).
measure_subject_detailA
Measure subject brightness, detail and contrast. The image is split into 32 px blocks; a block is subject when its luminance median is above median + 8 x 1.4826 x MAD. subject_brightness = median of subject block medians; background_median = median of the other block medians; contrast_ratio = subject_brightness / background_median (0 when that is at most 0.001); detail_score = mean Sobel energy of luminance over every 4th pixel of up to 50 subject blocks; subject_count = subject blocks; subject_threshold = median + 3 x 1.4826 x MAD. Returns JSON: subject_brightness, detail_score, contrast_ratio, subject_count, background_median, subject_threshold. luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: view_id (required).
measure_tonal_presenceA
Measure subject and background tones. Every 8th pixel is subject when its luminance is above the background (luminance of the channel medians) + 5 x (median |luminance - background| on a 32 px grid) and at least 2 of its 4 neighbours 3 px away are too; every other sample is background. separation = subject median / background median; core_brightness = mean of the brightest 5% of subject samples; core_to_disk = core_brightness / subject median; faint_structure_visibility = (subject P10 - background P90) / background P90; subject_fraction = subject samples / all samples; roi_mode is compound_roi when a second luminance-weighted cluster, outside 0.15 x width of the centroid and holding over 15% of the weight, lies more than 0.25 x width away, else single. Denominators are held to at least 0.001. Returns JSON: separation, subject_median, background_median, core_brightness, faint_structure_visibility, core_to_disk, subject_fraction, roi_mode, subject_pixel_count. luminance is 0.2126R + 0.7152G + 0.0722B.
Inputs: view_id (required).
measure_uniformityA
Measure background uniformity via 4-corner median stddev. Lower score means more uniform.
Inputs: view_id (required), sample_size.
multi_scale_enhanceA
Masked three-scale LocalHistogramEqualization on a view, in one call, with an optional HDRMultiscaleTransform pass. The mask is the image lightness (CIE L* for colour, the image itself for mono) mapped as max((L - mask_clip_low) / (1 - mask_clip_low), 0), raised to the power 1/mask_gamma and blurred with a Gaussian of sigma mask_blur (0 = no blur). LHE then runs at the large, mid and fine radius in that order through the mask; the large and mid scales use lhe_slope_limit, the fine scale lhe_fine_slope_limit; other LHE parameters are PixInsight's defaults. Giving hdrmt_layers adds an HDRMultiscaleTransform pass through the same mask. The mask is closed afterwards. Reports a detail score before and after: the mean squared Sobel gradient of luminance (Rec.709 weights) over pixels brighter than median + 8 x 1.4826 x MAD, sampled every 8 pixels.
Inputs: view_id (required), mask_blur (required), mask_gamma (required), mask_clip_low (required), +13 more.
open_imageA
Open an XISF/FITS image file in PixInsight. Returns the view ID assigned by PixInsight. Automatically closes any crop_mask windows that come with XISF files.
Inputs: file_path (required).
pixelmath_new_imageA
Run PixelMath to create a NEW image from expressions that reference other open views by id. Color "rgb" takes red/green/blue expressions; color "gray" takes a single expression. View ids used inside expressions must be simple identifiers (rename_view renames a view). No pow() — use exp(exponent*ln(base)) or the ^ operator.
Inputs: color (required), output_id (required), size_from (required), red, +4 more.
pixinsight_infoA
Report the resolved PixInsight installation paths for this platform and the connector version. Read-only. For live process status, use the doctor command.
Inputs: no named parameters.
remove_maskB
Remove the current mask from a view.
Inputs: target_id (required).
rename_viewA
Rename an image view to a different view ID. Long XISF names can cause some PixInsight processes to fail.
Inputs: new_id (required), old_id (required).
restore_from_cloneA
Restore an image from a backup clone, replacing all changes since the clone was made.
Inputs: clone_id (required), target_id (required).
restore_star_colorA
Restore the colour ratios of a reference view in the bright areas of a target, in place, keeping the target's luminance. Per channel: restored = min(reference[c] * Lt / max(Lr, 0.001), max_value), where Lt and Lr are the target's and the reference's channel means; it is weighted in linearly from 0 at reference luminance restore_start to 1 at restore_end. Runs as 64-bit PixelMath truncated to [0,1]; reports the target's median and max before and after.
Inputs: max_value (required), target_id (required), pre_star_id (required), restore_end (required), +1 more.
resume_bridgeA
Allow PixInsight commands again after the user pressed Pause/Abort. Call ONLY when the user explicitly tells you to continue.
Inputs: no named parameters.
robust_median_stretchA
Stretch a linear view in place so its median lands on target_median. Per pass: from the median M and the unnormalized median absolute deviation D of the image (range clipping off, alpha excluded), sigma = 1.4826·D and the black point c0 = max(0, M − black_point_sigma·sigma); samples are rescaled to u = clamp((x − c0)/(1 − c0), 0, 1), and the midtones transfer function MTF(m, u) = (m − 1)·u / ((2m − 1)·u − m) is applied with the balance m solved so that MTF(m, u(M)) = target_median exactly. linked true takes one set of statistics over all channels jointly; false takes them per channel. Each further pass repeats this on the previous output, re-measuring the statistics; passes before the last run on a scratch copy, so the view is written once and is left unmodified when any pass cannot be solved (a median on the black point, e.g. D = 0). With highlight_knee h and highlight_midtones mh, values y above h become h + (1 − h)·MTF(mh, (y − h)/(1 − h)) after the last pass. The result is JSON: per pass and per statistics group M, D, sigma, c0, the rescaled median xbar and m.
Inputs: view_id (required), target_median (required), black_point_sigma (required), linked, +3 more.
run_abeB
Run AutomaticBackgroundExtractor (ABE) on a view, replacing it in place with the corrected result.
Inputs: view_id (required), tolerance, poly_degree.
run_background_neutralizationB
Run BackgroundNeutralization to equalize the background level across channels.
Inputs: view_id (required).
run_bxtA
Run BlurXTerminator on a view. correct_only applies PSF correction without sharpening; otherwise sharpen_nonstellar and sharpen_stellar control sharpening strength.
Inputs: view_id (required), correct_only, sharpen_stellar, adjust_star_halos, +1 more.
run_curvesA
Apply a CurvesTransformation to a view. Provide control points as [[x,y], ...] for the desired channel: "RGB" (all), "L" (lightness), "S" (saturation), "R", "G", "B".
Inputs: points (required), channel (required), view_id (required).
run_gradient_correctionB
Run GradientCorrection on a view to remove a background gradient.
Inputs: view_id (required).
run_hdrmtA
Run HDRMultiscaleTransform on a view. Inverted mode enhances detail; normal mode compresses dynamic range.
Inputs: layers (required), view_id (required), inverted, iterations, +2 more.
run_lheA
Run LocalHistogramEqualization (contrast-limited local histogram equalization) on a view. Omitted parameters keep PixInsight's defaults.
Inputs: view_id (required), amount, radius, slope_limit, +2 more.
run_mgcA
Run MultiscaleGradientCorrection using the MARS reference database. The image must be plate-solved and linear; a mono image also needs the flux metadata run_spfc writes. For a mono image pass filter (L, R, G, B, Ha, OIII, SII); for a color image leave it out (R, G, B bands are used). MARS files default to the ones configured in PixInsight.
Inputs: view_id (required), filter, mars_files, show_model, +3 more.
run_nxtC
Run NoiseXTerminator to reduce noise on a view.
Inputs: denoise (required), view_id (required), detail.
run_per_channel_abeA
Run AutomaticBackgroundExtractor (ABE) separately on the R, G and B channels of a color view, then recombine them into the view with ChannelCombination. ChannelExtraction writes the channels to the temporary views __pca_R, __pca_G and __pca_B; ABE subtracts its model from each in place and discards the model; the temporary views and any other view the call opened are closed afterwards. An ABE parameter that is not given is left at PixInsight's default, as run_abe does.
Inputs: view_id (required), tolerance, poly_degree.
run_pixelmathA
Run an arbitrary PixelMath expression in place on a view. RULES: (1) NO pow() — use exp(exponent*ln(base)). (2) Channel access is $T[0] for R, $T[1] for G, $T[2] for B — NOT $T.R or $T.B. (3) For other images use viewId[0], viewId[1], viewId[2].
Inputs: view_id (required), expression (required), symbols, single_expression.
run_pjsrA
Run a PJSR (JavaScript, V8 engine) snippet inside PixInsight and return its console output. Last resort for things the other tools do not cover. Call processEvents() before each long process (BXT, NXT, SXT) so Pause/Abort works. No ES6 module syntax; the snippet is eval-ed as a script, so #include does not work and a top-level return is a syntax error; include prepends files instead. Code that does not parse is refused with its line number before anything reaches PixInsight.
Inputs: code (required), include.
run_pjsr_fileA
Run a PJSR (JavaScript, V8 engine) source file from disk inside PixInsight and return its console output. Same execution model as run_pjsr, with the code read from a file instead of passed inline. No ES6 module syntax; the file content is eval-ed, so #include does not work. Code that does not parse is refused with its line number before anything reaches PixInsight.
Inputs: path (required).
run_plate_solveA
Plate solve an open image with ImageSolver against the local Gaia DR3/SP database (offline). Adds the astrometric solution needed by run_spfc, run_mgc and run_spcc. Needs an approximate position (ra_deg, dec_deg; within a fraction of the field is enough) and scale (pixel_scale in arcsec/px, or focal_length_mm + pixel_size_um) unless the image keywords already carry RA, DEC and FOCALLEN/XPIXSZ. The scale seed may be off by about 2x. Observation time is read from DATE-OBS/DATE, else today.
Inputs: view_id (required), ra_deg, dec_deg, pixel_scale, +3 more.
run_processA
Instantiate any PixInsight process by its PJSR constructor name, assign JSON-valued parameters onto the instance, and execute it on a view (when view_id is given) or globally (when it is omitted). Generic fallback for processes with no dedicated tool.
Inputs: name (required), params, view_id.
run_scnrB
Run SCNR (Subtractive Chromatic Noise Reduction) to remove a green colour cast from a view.
Inputs: view_id (required), amount, protection.
run_spccA
Run SpectrophotometricColorCalibration (SPCC). Requires the image to have an astrometric solution (run_plate_solve adds one) and to be linear (not stretched).
Inputs: view_id (required), qe_name, narrowband_mode, red_filter_name, +4 more.
run_spfcA
Run SpectrophotometricFluxCalibration: writes the flux metadata that run_mgc requires. The image must be plate-solved and linear. Needs the camera QE curve (default "Ideal QE curve"; pass qe_name for the real sensor, see find_filters) and the filter curve. MONO image: pass filter (L, R, G, B, Ha, OIII, SII) and optionally filter_name (a measured curve from the database; otherwise a flat passband from wavelength_nm/bandwidth_nm is used). COLOR image: omit filter and pass red_filter_name, green_filter_name, blue_filter_name (otherwise flat R/G/B passbands).
Inputs: view_id (required), filter, qe_name, filter_name, +5 more.
run_sxtA
Run StarXTerminator to separate stars from a view, replacing it in place with the starless result and producing a separate stars view. is_linear selects the unscreen mode: off for linear (pre-stretch) data, on for non-linear (stretched) data.
Inputs: view_id (required), is_linear (required), overlap.
save_and_show_previewA
Alias for save_preview. Save a JPEG preview of a view and return the file path.
Inputs: label (required), view_id (required).
save_previewB
Save a JPEG preview of a view and return the file path.
Inputs: label (required), view_id (required).
scan_workspaceA
Scan the working folder (recursively, any subfolder name) for XISF/FITS files and report each one's FILTER header value, geometry, exposure, whether it has an astrometric solution (WCS keywords CTYPE/CRVAL with a CD, CDELT or PC matrix, or PixInsight's PCL:AstrometricSolution properties), and its INSTRUME, TELESCOP, FOCALLEN, XPIXSZ, YPIXSZ and XBINNING keywords verbatim (null when absent). The connector's own state and output folders are not scanned. Read-only.
Inputs: no named parameters.
set_workspaceA
Set the workspace folder this session's files go under (scratch files, the bridge, call logs). path must name an existing, writable folder, absolute or starting with ~/, other than the filesystem root or the home directory itself. Returns the new workspace_info.
Inputs: path (required).
shell_detail_enhanceA
Protected high-pass detail enhancement at two scales, in place. For each scale, detail = image - Gaussian blur of sigma _sigma (locally zero-mean), and result = image + _amount x detail x protection, where protection = exp(-protect_softness x max(0, L - protect_knee) / max(1 - protect_knee, 0.01)) and L is Rec.709 luminance, so the boost attenuates above protect_knee. A scale with amount 0 is skipped. Output is truncated to [0, 1]. It does not hold the peak fixed: the added detail can raise the image maximum (the result reports the image maximum before and after, from full image statistics). With mask_id the enhancement runs through that mask; with auto_zone and no mask_id it builds the adaptive shell zone mask (as create_adaptive_zone_masks with its default core_bias), uses it and closes it, and fails without changing the view if that mask cannot be built; with neither it runs unmasked. Reports before/after texture metrics over pixels between median + 5 x 1.4826 x MAD and 0.98, sampled every 8 pixels: mean squared Sobel gradient, median local standard deviation of 16-pixel blocks that are at least 30% such pixels, and the share of them where protection is below 0.5.
Inputs: view_id (required), large_sigma (required), large_amount (required), medium_sigma (required), +5 more.
star_protected_blendA
Blend a stars-only image into a starless one in place, as a screen blend that turns colour-preserving in bright star cores. The mode follows, per pixel, the star layer's own luminance SL (the mean of its three channels). Below core_threshold_low: per-channel screen blend 1 - (1 - target) * (1 - stars * k). Above core_threshold_high: luminance-only screen blend, the target's colour scaled by the new over the old luminance and capped at max_value. Between them the two blend linearly. k = strength * prot, where prot falls linearly from 1 at core_threshold_low to min_strength_fraction at core_threshold_high. With pre_star_id, the bright-area colour ratios of that view are then restored over the same luminance ramp (see restore_star_color). Runs as 64-bit PixelMath truncated to [0,1]; reports the target's median and max before and after.
Inputs: stars_id (required), strength (required), max_value (required), target_id (required), +4 more.
stretch_starsA
Stretch a linear star image in place with a pedestal subtraction and a repeated midtones transfer function. When the image median is above 1e-5 it is subtracted as a pedestal and the rest rescaled, max(0, (x − median)/(1 − median)); then the midtones transfer function MTF(m, x) = (1 − m)·x / ((1 − 2m)·x + m) is applied iterations times with m = midtone. Results are truncated to [0,1]. The result reports the pedestal, the final median and maximum, and high_fraction: among pixels sampled every 16 pixels whose value (the channel maximum) exceeds 0.005 before the stretch, the fraction above 0.5.
Inputs: midtone (required), view_id (required), iterations (required).
workspace_infoA
Report the workspace folder, the state directories under it (scratch, bridge, logs) and the output folder. Also reports where the folder came from (set_workspace, PIXINSIGHT_MCP_WORKSPACE or the launch folder) and, when it cannot be used, why. Read-only.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 78 tools
Several tools are near-duplicates or aliases, such as save_preview/save_and_show_preview, run_pjsr/run_pjsr_file, and run_abe/run_per_channel_abe. The many enhancement, stretch, and measurement tools (e.g. measure_sharpness, measure_subject_detail, measure_highlight_texture) have overlapping concepts that an agent would need to read carefully to distinguish.
The set overwhelmingly uses snake_case with action-first verbs, and the run_*, measure_*, create_*, and get_* groups form predictable patterns. Minor exceptions like pixinsight_info, workspace_info, and multi_scale_enhance deviate slightly but do not break the overall convention.
78 tools is an extreme count, especially since many are thin wrappers around specific PixInsight processes that the generic run_process and run_pjsr fallbacks could already handle. The inclusion of an explicit alias (save_and_show_preview) further inflates the surface without adding capability.
The server covers most of the core PixInsight workflow: image I/O, astrometry, calibration, stretching, enhancement, star separation, narrowband blending, masking, measurements, and workspace management. A dedicated stacking/integration tool is missing, but run_process and run_pjsr provide a working fallback for any uncovered process.
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with PixInsight's image processing capabilities through a local HTTP/SSE server, allowing listing processes, invoking them, viewing images, and more.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform GIMP-style image operations such as open, resize, crop, flip, rotate, blur, desaturate, text overlay, export, and batch processing via MCP tools, supporting both mock (Pillow) and live GIMP backends.2MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets AI assistants drive Adobe Photoshop on Windows through ExtendScript and COM automation, offering ~122 tools for documents, layers, text, filters, color, selections, masks, layout QA, and design systems.3MIT
- AlicenseBqualityBmaintenanceEnables AI agents to operate GIMP 3 end-to-end: open and inspect images, call every PDB procedure, apply GEGL filters destructively or as layer effects, measure pixels, render before/after/diff comparisons, cut out subjects with AI segmentation, and run multi-step recipes across folders.3254 PyPI5Apache 2.0