siril-mcp
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., "@siril-mcp show me an autostretched preview of the current image and its stats"
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.
Siril MCP
LLM control of a live Siril GUI session via an in-app Python bridge.
Works on macOS, Linux and Windows, with Cursor, opencode and any MCP client.
Architecture
Bridge (
bridge/bridge.py) — started inside Siril withpyscript -async. Talks to Siril throughsirilpyand listens for MCP requests.MCP server (
siril-mcp) — stdio MCP process; forwards tools to the bridge.
MCP client → siril-mcp (stdio) → bridge → SirilTransport between server and bridge:
Transport | When | Endpoint |
Unix socket | macOS / Linux (has |
|
TCP | Windows, or when |
|
Select explicitly with SIRIL_MCP_TRANSPORT=unix|tcp. Default is unix where supported, otherwise tcp. Set the same variables on both sides (MCP server env + Siril launcher).
Related MCP server: krita6-mcp
Setup
1. Install the MCP package
cd /path/to/siril-mcp
uv syncor with pip:
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .2. Install the Siril launcher
macOS / Linux:
./scripts/install_bridge_to_siril_scripts.shWindows (manual): the script above only knows macOS paths. Copy the launcher by hand:
Create the folder
C:\Users\<you>\AppData\Roaming\siril\scriptsif missing (check Siril's script path inconfig.1.4.ini, keyscript_path).Create
Start_MCP_Bridge.pyinside it with this content (adjust the bridge path):
#version = 1.3.0
import os
import runpy
os.environ.setdefault("SIRIL_MCP_TRANSPORT", "tcp")
os.environ.setdefault("SIRIL_MCP_HOST", "127.0.0.1")
os.environ.setdefault("SIRIL_MCP_PORT", "27777")
runpy.run_path(r"E:\siril-mcp\bridge\bridge.py", run_name="__main__")3. Start the bridge in Siril
Open Siril, wait until the log shows Python module is up-to-date and Caricamento dello script: Start_MCP_Bridge.py, then:
Scripts menu → Start_MCP_Bridge (prefer async), or
Siril command line:
pyscript -async /path/to/siril-mcp/bridge/bridge.py
You should see in the Siril log:
[siril-mcp] connected to Siril
[siril-mcp] listening on tcp 127.0.0.1:27777(on macOS/Linux: listening on .../bridge.sock). Keep Siril open while using the MCP.
4. Register the MCP server
opencode (C:\Users\<you>\.config\opencode\opencode.json or ~/.config/opencode/opencode.json):
{
"mcp": {
"siril": {
"type": "local",
"command": ["uv", "--directory", "E:\\siril-mcp", "run", "siril-mcp"],
"enabled": true,
"environment": {
"SIRIL_MCP_TRANSPORT": "tcp",
"SIRIL_MCP_HOST": "127.0.0.1",
"SIRIL_MCP_PORT": "27777"
}
}
}
}On macOS/Linux the environment block can be omitted (Unix socket is the default).
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"siril": {
"command": "/path/to/siril-mcp/.venv/bin/siril-mcp",
"args": [],
"env": {
"SIRIL_MCP_TRANSPORT": "tcp",
"SIRIL_MCP_HOST": "127.0.0.1",
"SIRIL_MCP_PORT": "27777"
}
}
}
}Restart the MCP client after editing. Verify with opencode mcp list (expect siril ✓ connected) or by calling siril_ping.
Optional: StarNet
If you plan to use StarNet for star removal, install it via Siril's usual StarNet setup. This stack does not install or configure StarNet; once it is available to Siril, scriptable StarNet commands work like any other command through the bridge.
Tools
Tool | Purpose |
| Bridge health |
| Loaded image, size, selection, cwd, keywords |
| Filterable scriptable command catalog |
| Run one Siril command |
| Run multi-line |
| Autostretched PNG (optional ROI, max edge) |
| Set selection rectangle |
| Per-channel stats |
| Undo last op |
If the bridge is down, tools fail with an explicit start hint (they do not fall back to browsing the filesystem).
Batch stacking without the bridge
The bridge is for interactive work on the live GUI session. For heavy batch jobs (calibrate / register / stack of many frames) prefer siril-cli with an .ssf script — same engine, headless, reproducible:
siril-cli -d /path/to/work -s stack_lights_darks.ssfExample (lights + darks only, OSC camera, Siril 1.4):
requires 1.3.0
cd darks
convert dark -out=../process
cd ../process
stack dark rej 3 3 -nonorm -out=../masters/dark_stacked
cd ..
cd lights
convert light -out=../process
cd ../process
calibrate light -dark=../masters/dark_stacked -cfa -equalize_cfa -debayer -cc=dark
register pp_light
stack r_pp_light rej 3 3 -norm=addscale -output_norm -rgb_equal -32b -out=resultThis is the reference OSC_Preprocessing.ssf workflow minus flats/biases; see the full script in Siril's script collection for the 4-frame variant.
Bridge limitations (what you don't get yet)
This stack only reaches what scripts / sirilpy already expose. GUI-only or poorly scripted Siril features are out of scope for the bridge approach, including:
Display / STF /
visustate matching exactly what the user sees in the viewportInspector-style diagnostics
Curves, remixer, and compositing UI hooks (unless a documented command equivalent exists)
Reliable sequence /
load_seqcontext and Python-style metadata that today only exists on GUI-only pathsTrue canvas screenshots (overlays, zoom, annotations) vs an autostretched
gfitpreviewAttaching to Siril without manually starting the bridge (
pyscript -async)Headless
siril-cli -pas the primary control path (optional later; not what this bridge is)
Canonical test queries
Ping Siril and tell me if an image is loaded, its size, filename, and selection.
Show a preview of the current image (max 1024px) and describe it.
List stretch-related Siril commands.
Troubleshooting
Bridge not running: start
pyscript -asyncagain; checkbridge.status.jsonunder the support dir.Windows
AF_UNIXerror: fixed by the TCP fallback — make sure both the launcher and the MCP server env useSIRIL_MCP_TRANSPORT=tcpand the Siril log showslistening on tcp ....Port already in use: another bridge is running, or set another port via
SIRIL_MCP_PORTon both sides.Launcher missing from Scripts menu: check Siril's
script_pathin the config and restart Siril after copyingStart_MCP_Bridge.py.Socket permissions (Unix): socket is created mode
0600under Application Support.First Siril run: wait until Siril finishes Python venv setup before starting the bridge.
Nested
pyscript:siril_run_scriptwithkind=pyruns syncpyscript; prefersiril_run_commandfor simple ops.
License
GPL-3.0-or-later — same as Siril.
Available Tools
9 toolssiril_get_previewA
Return an 8-bit autostretched preview of the current Siril image (or a ROI).
Args: max_edge: Maximum width or height of the returned PNG. x, y, w, h: Optional ROI in image pixel coordinates (omit all for full image). linked: Use linked autostretch when True. save_debug_copy: Also write a PNG under Application Support for debugging.
Inputs: h, w, x, y, +3 more.
siril_get_stateA
Get live Siril state: loaded image, size, filename, selection, working directory.
Inputs: no named parameters. Returns: result
siril_get_statsA
Get per-channel statistics for the currently loaded image.
Inputs: no named parameters. Returns: result
siril_list_commandsA
List Siril commands available for scripting.
Args: query: Optional substring filter on command name or usage. scriptable_only: If true, only return scriptable commands.
Inputs: query, scriptable_only. Returns: result
siril_pingA
Check that the Siril MCP bridge is running inside Siril.
Inputs: no named parameters. Returns: result
siril_run_commandC
Run a single Siril command in the live GUI session.
Args: command: Command name (e.g. "autostretch", "load", "cd"). args: Optional list of argument strings.
Inputs: command (required), args. Returns: result
siril_run_scriptA
Run a multi-line Siril script (.ssf command script or .py via pyscript).
Args: script_body: Full script contents. kind: "ssf" for command scripts, "py" for Python (executed with pyscript).
Inputs: script_body (required), kind. Returns: result
siril_set_selectionB
Set the Siril image selection rectangle (x, y, width, height).
Inputs: h (required), w (required), x (required), y (required). Returns: result
siril_undoA
Undo the last Siril operation (if undo history is available).
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools target a clearly distinct purpose (ping, get_state, get_preview, set_selection, get_stats, undo, list_commands). The only mild overlap is siril_run_script vs siril_run_command, but their descriptions clearly distinguish multi-line scripts from single live commands.
Every tool uses the same siril_ prefix with snake_case and a consistent verb_noun or verb form (run_script, get_state, list_commands, set_selection, get_stats). The pattern is predictable throughout.
Nine tools is well-scoped for a live-session control bridge, with each tool covering a distinct capability (scripting, state, preview, selection, stats, undo). No redundant or filler tools.
The surface covers execution (script/command), inspection (state, stats, preview), selection, undo, and command discovery. Explicit image load/save/export operations are absent, but the generic run_command escape hatch largely compensates, leaving only minor gaps.
Maintenance
Related MCP Connectors
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
Image and video AI tools and your own pipelines, run from any AI assistant.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- 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.3276 PyPI5Apache 2.0
- AlicenseAqualityBmaintenanceEnables an AI assistant to inspect and edit a live Krita 6 desktop session, create and modify documents and layers, paint with native brushes, and receive inline PNG previews.561MIT
- AlicenseCqualityBmaintenanceEnables AI agents to perform structured, semantic artwork editing in GIMP 3 through session-based tools for layers, selections, text, transforms, non-destructive filters, previews, and image export, backed by snapshot undo/redo and XCF-persisted sessions. It also offers a live control center and operation event timeline for observing and managing edits, plus PDB search for expert discovery.61MIT
- AlicenseAqualityCmaintenanceEnables LLMs to control a live Siril GUI session through a bridge, allowing them to run Siril commands and scripts, inspect image state, get previews and statistics, and perform edits such as selections and undo.92GPL 3.0