PhotoCraft Rebuilds Photoshop in Pure Rust with Native Model Context Protocol Support
PhotoCraft is an open-source, clean-room reimplementation of Adobe Photoshop built in pure Rust on wgpu. It processes layered PSD files without Electron and exposes an engine controllable via CLI, JSON, and Model Context Protocol servers.

Why it matters
Developers can now automate deterministic, layer-aware image generation and manipulation directly from coding agents without Adobe cloud lock-in.
TL;DR
- 01PhotoCraft exposes an MCP server and JSON control channel for headless, agentic image manipulation.
- 02Passes 307 of 309 test files in the standard psd-tools corpus with layer and style fidelity.
- 03Runs on pure Rust and wgpu without Electron, web views, or Adobe licensing requirements.
Key facts
- PSD test suite compatibility
- 307 of 309 files matching in psd-tools corpus
- Vector shape compatibility
- 116 of 116 shape layers match Photoshop pixels
- Live adjustment layers
- 16 types supported (Curves, Levels, Hue/Saturation, etc.)
- Rendering backend
- wgpu (Metal, Vulkan, DX12, WebGPU)
Headless Image Manipulation for Coding Agents
AI coding agents frequently struggle with visual asset manipulation because existing open-source tools like ImageMagick flatten layer hierarchies or distort typography and blend modes. PhotoCraft provides a clean-room Rust implementation of the full Photoshop toolset, designed from the ground up to expose an offscreen control channel via JSON and a native Model Context Protocol (MCP) server.
Because every editing operation is serialized as an internal command, an agent running in Claude Code or Cursor can inspect PSD layer hierarchies, modify adjustment layers (such as Curves or Hue/Saturation), adjust live type, and render previews without launching a graphical environment.
High-Fidelity PSD Engine and wgpu Compositor
The engine is built on wgpu, supporting Metal, Vulkan, DirectX 12, and WebGPU. It replaces slow single-threaded render loops with copy-on-write tiles and multithreaded algorithms. For example, a radius-180 Gaussian blur on a 3.6 MP canvas executes in under one second across available CPU cores.
Round-trip compatibility is validated against standard corpora:
- Opening and re-saving preserves rendering for 307 of 309 documents in the
psd-toolstest suite. - 169 of 170 files match in the mixed
ag-psd/psd-toolscorpus. - 116 of 116 shape layers match Photoshop pixel outputs identically.
- The standalone
photocraft-psdcrate provides byte-level parsing without requiring the full application runtime.
Native Color Pipelines
The runtime supports RGB, Grayscale, CMYK, and Lab color spaces at 8, 16, and 32 bits per channel. Real ICC color profiles, soft proofing (Cmd+Y), and gamut warnings (Shift+Cmd+Y) run on the GPU. Developers building multimodal agents can now output production-ready print and screen assets without Adobe Creative Cloud subscriptions.
Try it in 2 minutes
git clone https://github.com/storytold/photocraft.git
cd photocraft
cargo xtask corpus --psd-tools
cargo build --releasebash
✓ When to use
- Use when an agentic workflow needs to programmatically inspect, modify, or export layered PSD files.
- Use as a high-performance offline graphics engine running on local GPU compute without licensing fees.
✕ When NOT to use
- Do not use if your pipeline requires proprietary Adobe Cloud libraries or proprietary Adobe-only smart neural filters.
- Avoid if you require 100% byte-identical file binary rewrites rather than visual and layer composite parity.
What to do today
- Clone the photocraft repository and inspect crates/psd for standalone PSD parsing in Rust.
- Run cargo xtask corpus --psd-tools to verify layer round-trip rendering on your machine.
- Test integration of the headless JSON control interface with your agent MCP configuration.