
Compositor
io.github.Josusanz由 GitHub 账号 Josusanz 发布v0.1.4更新于 Oct 24, 2026
Read and edit Compositor .comp projects: layers, folders, masks, transforms, previews and exports
概览
让助手读取和编辑 Compositor 的 .comp 图像编辑项目:图层、文件夹、蒙版、变换、预览以及 PNG/JPEG 导出。
- 可以做什么
- 直接处理有文档说明的 .comp 包格式(一个 manifest.json 加每层一个 PNG),因此无需改动 Compositor。工具包括 inspect_project、list_layers、render_preview、export_flattened、export_layer、create_project、add_image_layer、add_folder、set_layer、move_layer、remove_layer、replace_layer_image、set_layer_mask、resize_canvas 和 open_in_compositor。它还提供描述文件格式的 compositor://format 资源。图层像素以 8 位 sRGB PNG 原样保存,位置、缩放、旋转和翻转保存在图层变换中。
- 适用场景
- 当你希望助手从命令行构建或修饰 Compositor 项目时适用:新建文档、把图片导入为图层、整理文件夹、不透明度、混合模式和蒙版,然后渲染预览或导出扁平化 PNG/JPEG。也适合在进一步编辑前检查已在 Compositor 中保存的项目。它不是与运行中应用的实时连接,因此选区、撤销历史和视口无法访问。
- 运行要求
- 需要 Node.js 20 或更高版本,通过 npx compositor-mcp 以 stdio 在本地运行。未声明任何身份验证、环境变量或请求头。Compositor 本身仅在查看或继续编辑结果时需要,且该服务器仅支持桌面端。
安装
在 SourceWeft 中
- 打开 控制台中的 Compositor,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
compositor-mcp
An MCP server that lets Claude and other AI agents read and edit Compositor projects, the open-source Photoshop alternative for Mac.
It works on the documented .comp package format (a manifest.json plus one PNG per layer), so it
needs no changes to Compositor itself. Edit a project with an agent, then open it in Compositor.
Or the other way round: save in Compositor and let the agent inspect, retouch or render it.
What the agent can do
The server also exposes a compositor://format resource describing the file format.
Related
marcushorndt/compositor-mcp takes a different route: it drives
Compositor's own document model and renderer headlessly (Swift), so previews match the app exactly. This package is a
plain Node server that works on the documented file format, needs no build of the app, and runs wherever Node runs.
Pick whichever fits your setup; both open the same .comp files.
Install
Requires Node.js 20 or later. Compositor itself is only needed to look at the result.
Claude Code
Claude Desktop
Add to claude_desktop_config.json:
From source
Example session
Create a 1920×1080 project at
~/Desktop/poster.compwith a white background, addphoto.jpgscaled to fill, putlogo.pngin the bottom right corner at 80 % opacity with Multiply, then show me a preview and open it in Compositor.
The agent calls create_project, add_image_layer twice, set_layer, render_preview and
open_in_compositor. Compositor opens the document with the layers ready to keep editing.
How it maps to the Compositor format
- Layer pixels are stored untouched as 8-bit sRGB PNGs; placement, scale, rotation and flips live in the layer transform, so edits stay non-destructive.
- Masks are written as 8-bit grayscale PNGs without alpha, as Compositor requires.
- Manifests are validated against the same rules as
ProjectStore.swiftbefore writing, written with sorted keys and replaced atomically. - Fields this tool does not understand (adjustments, effects, text, shapes, guides, anything newer) are preserved on round trip.
- Projects are saved as format version 9 (what Compositor 1.2.6 writes); a project declaring a newer version keeps its own number and its unknown fields on round trip. Older Compositor builds reject newer versions; update the app if a file will not open.
Limitations
- The preview renderer covers order, folders, visibility, opacity, transforms, raster masks and the blend modes sharp supports. Clipping masks, adjustment layers and layer effects are not rendered yet; the tool reports what it skipped. Compositor's own export is the reference.
- Compositor does not watch files for changes. After the agent edits a project that is already
open, close and reopen the document (or call
open_in_compositor). - There is no live connection to the running app: selection, undo history and the viewport are session-only in Compositor and out of reach here.
Development
License
MIT. Compositor is © Robbie Tilton, also MIT.
来源:README.md,提交 e3d7f54
工具
0版本历史
2- v0.1.4最新Sep 25, 2026
- v0.1.2Sep 22, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分