Open editor
For developers

PhotoCraft MCP: an image editor your agent can drive

Every menu item, tool and dialog in PhotoCraft runs a command from one registry of 500+ commands. The command-line tool exposes that registry as an MCP server, so an AI agent can open a PSD, add an adjustment layer, change text and save, the same way you would with the mouse.

MCP needs the desktop app or CLI. The browser editor on this site can’t be driven by an agent; for prompt-based edits in the browser, use the AI panel.

Two ways to run it

ModeWhat the agent drivesUse it for
HeadlessAn in-process engine, no windowBatch jobs, pipelines, servers
BridgeThe running desktop app, over a local control channelWorking alongside the agent and watching each step

Set up with Claude Code (headless)

Get photocraft-cli (the macOS release ships it as photocraft-cli-0.7.0-macos-universal.zip; on other systems build it with cargo build --release -p photocraft-cli), make a working folder, then register the server:

mkdir -p "$PWD/photocraft-work"
claude mcp add photocraft -- /path/to/photocraft-cli mcp \
  --automation-read-root "$PWD/photocraft-work" \
  --automation-write-root "$PWD/photocraft-work"

Or add it to .mcp.json in your project:

{
  "mcpServers": {
    "photocraft": {
      "command": "/path/to/photocraft-cli",
      "args": ["mcp",
        "--automation-read-root", "/absolute/path/to/workspace",
        "--automation-write-root", "/absolute/path/to/workspace"]
    }
  }
}

The two root flags are the agent’s only file access. Leave one out and that direction is denied.

Drive the live desktop app (bridge)

Start the app with its control channel and the folders it may use, then point the CLI at it:

photocraft --control 7878 --control-token-file ~/.photocraft-token \
  --automation-read-root ~/photocraft-work --automation-write-root ~/photocraft-work

photocraft-cli mcp --bridge 127.0.0.1:7878 --control-token-file ~/.photocraft-token

Bridge mode adds tools that see and use the interface: ui_inspect, ui_screenshot, ui_pointer, ui_menu_invoke and ui_set.

What the agent gets

A good habit from the project’s own docs: have the agent run image.duplicate first and experiment on the copy, and use doc_inspect after a failed batch, since batches are not rolled back.

Prompts to try

Without MCP: the CLI on its own

# Open, edit and save in one command
photocraft-cli run wave.psd \
  --cmd filter.sharpen.smartSharpen --params '{"amount":80}' \
  --out wave-final.png

# One action list over a folder
photocraft-cli batch --actions grade.json --in ./raw --out ./graded

FAQ

Can an AI agent control the browser version on this site?

No. The MCP server is part of photocraft-cli and talks to a headless engine or to the desktop app. The web build has no control channel. Use the AI panel here for prompt-based image edits, and the desktop app or CLI for agent automation.

Which agents work with it?

Any MCP client that can launch a local stdio server: Claude Code, Claude Desktop, Cursor, VS Code agents and others. The project documents a Claude Code setup; other clients take the same command and arguments.

Can the agent read or delete files anywhere on my disk?

Only inside the folders you pass with --automation-read-root and --automation-write-root. Without those flags the server has no file access at all. Point them at a dedicated working folder.

Source: PhotoCraft’s MCP conventions and development notes. Flags can change between releases; check photocraft-cli mcp --help.