🌠
PixInsight MCP
AI-driven automated deep sky astrophotography processing
Claude Code + PixInsight
LRGB · HaRGB · HaLRGB
Open Source · MIT
The Problem
Processing deep sky images
is painfully complex
01
Dozens of steps
Gradient removal, calibration, deconvolution, noise reduction, stretching, star handling, narrowband blending, curves, local contrast...
02
Parameter overload
Each process has 10-50 parameters. A single wrong value ruins the result. Tuning requires deep expertise and endless trial-and-error.
03
Hours of manual work
A full processing session takes 2-6 hours. Re-doing it with different parameters means starting from scratch.
04
Steep learning curve
PixInsight is the gold standard but intimidates newcomers. Knowledge lives in scattered tutorials and forum posts.
The Vision
Tell the AI what you want,
not how to get there
You
Process NGC 891 LRGB — edge-on galaxy, 180s subs, Astronomik Deep Sky filters. I want natural colors, visible dust lane, tight stars.
AI
Created a pipeline config with 28 processing steps across 4 branches. Comparing ABE vs GradientCorrection... ABE (degree 2) wins with the most uniform background. Running SPCC calibration, BXT sharpening, SXT star separation, Seti star stretch, LRGB combine with lightness=0.35, saturation=0.70...
You
The dust lane could use more contrast. Stars look great.
AI
Increasing LHE amount to 0.25 with slopeLimit=1.3, adding masked HDRMT. Resuming from --restart-from curves_main... Done in 90 seconds.
Architecture
Model-agnostic, agent-driven
Any reasoning model or agentic framework can drive the pipeline through a file-based bridge. No plugins, no modifications to PixInsight required.
AI Agent
Any LLM Agent
Claude Code, Codex,
Cursor, custom agents...
→
Orchestrator
Pipeline
Node.js · 2000 lines
→
IPC
File Bridge
JSON commands/results
→
Engine
PixInsight
PJSR watcher script
The pipeline is a plain Node.js script
Any agent that can run shell commands can use it
The Pipeline
Config-driven, branching pipeline
One JSON config describes the full workflow. Branches fork and merge for parallel processing of stars, H-alpha, and luminance data.
●
Main (RGB)
Channel combine → Gradient removal → BXT → SPCC calibration → SCNR → NXT denoise → SXT star separation → Stretch (HT+GHS) → Curves → LHE → HDRMT
●
Stars
Forks after SXT → Seti linear stretch (MTF iterations) → Saturation boost → Screen-blend recombination at the end. Tight, colorful, halo-free stars.
●
H-alpha
SXT on linear Ha → Stretch → GHS → Three-part injection: R-channel conditional, luminance boost, detail layer with nebula mask.
●
Luminance
Separate L stretch → NXT denoise → BXT sharpening → LRGB Combination with configurable lightness/saturation weighting.
Key Features
Built for real-world processing
-
⚡
Checkpoint & Resume
Auto-saves at key stages. Resume from any checkpoint after a crash or parameter change — skip hours of reprocessing.
-
🔍
Intelligent Gradient Removal
Automatically compares ABE vs GradientCorrection across multiple polynomial degrees, measures background uniformity, picks the winner.
-
📷
Preview at Every Step
Exports JPEG previews (with auto-stretch for linear data) so you can review without opening PixInsight. Visual feedback drives the next iteration.
-
🛠
Web Pipeline Editor
Visual config editor with sliders, curve widgets, GHS pass management, branch visualization, and real-time preview thumbnails.
-
🧠
Iterative Tuning
Each run generates a detailed markdown report. Review results, give natural-language feedback, and the AI adjusts parameters for the next pass.
Continuous Learning
The system learns as you use it
Skills and memory files are enriched after every session. The AI builds a growing knowledge base of techniques, gotchas, and your personal processing style.
📚
Skills
Structured markdown files documenting every PJSR process, parameter range, technique, and gotcha. Updated automatically when new knowledge is validated.
🧠
Memory
Persistent cross-session memory captures your preferences, lessons learned, and target-specific tuning. The AI starts every new session with full context.
🎯
Your Style
Tight stars or fluffy halos? Aggressive LHE or gentle curves? The more you iterate, the more the system adapts to your aesthetic preferences.
🔄
Feedback loop
Bug found? Documented in pjsr-gotchas.md.
New technique validated? Added to SKILL.md.
Galaxy processing tuned over 8 iterations? Captured in processing-knowledge.md.
Next session starts where this one ended.
Workflow
The iteration loop
Processing is not a one-shot task. It's a conversation between you and the AI, converging toward the image you envision.
1
Run
Full pipeline or resume from a checkpoint. All 28 steps execute automatically with JPEG exports at each stage.
2
Review
Browse step previews in the web editor or the conversation. Identify what needs adjusting — too much contrast? Noisy background? Weak Ha?
3
Refine
Give feedback in plain language. The AI updates the config, resumes from the right checkpoint, and delivers a new iteration in minutes.
NGC 891: 8 iterations → from raw masters to publication quality
Let's See It In Action
Time for a demo
What you'll see: loading integrated masters, running the full pipeline,
reviewing previews, giving feedback, and iterating — all from a single conversation.
github.com
pixinsight-mcp
Open source · MIT License · Node.js + PJSR
Claude Code as the AI agent
PixInsight as the processing engine
Works with any PJSR-compatible process