MCP · Agents

PhotoCraft MCP setup for Claude, Cursor, and local agents

PhotoCraft can expose a command registry over an MCP server so coding agents drive document open/save, inspection, and batch commands on your machine. ChatGPT in the cloud cannot replace this local bridge.

What problem MCP solves

Manual clicking is fine for exploration. Automation matters when you want an agent to open a PSD, inspect layers, run allowlisted commands, export a preview, and save — repeatedly. PhotoCraft’s open-source tree documents an MCP path via photocraft-cli. Treat flags and tool names as moving targets in alpha; confirm against the README for your commit or Release.

Prerequisites

  • A working PhotoCraft / CLI install from official sources (not a random mirror).
  • An MCP-capable client (Claude Desktop, Cursor, or similar) that can launch a local stdio server.
  • Clear folders for read/write roots — never point automation at your only copy of production archives.
  • Time to read upstream docs when commands fail; this page is orientation, not a substitute for the repo.

In one line

After installing the official CLI, run photocraft-cli mcp. Agents typicallydoc_open → command_run / command_batch → doc_save /doc_export.

Mode A — Headless (in-process engine)

Use headless when you want the engine without a visible UI — useful for batch jobs and CI-like experiments. Restrict filesystem access with automation roots:

photocraft-cli mcp --automation-read-root /work --automation-write-root /work

Start with a dedicated /work (or equivalent) directory containing only copies. If a command can write files, assume it will.

Mode B — Bridge a running desktop app

Use the bridge when you need the live desktop UI (inspection screenshots, interactive verification) while an agent issues control commands:

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

Keep the token file private. Binding control ports on non-loopback interfaces is a security decision — prefer localhost for experiments.

Common MCP tools (names may evolve)

  • doc_open / doc_new / doc_save / doc_export
  • doc_inspect (layer tree) / doc_render_preview (PNG)
  • command_run / command_batch / command_list
  • Bridge extras such as ui_inspect / ui_screenshot

When an agent hallucinates a tool name, ask it to call command_list (or the equivalent discovery tool in your build) instead of inventing Photoshop Action names.

A sane first agent workflow

  1. Copy one simple PSD into the automation read/write root.
  2. Start MCP (headless or bridge) and connect your client.
  3. Prompt the agent: open the file, list layers, export a PNG preview, save as a new filename.
  4. Manually open the outputs. If layer data looks wrong, stop — do not scale to a folder of client files.
  5. Only then try batch patterns on more copies.

Troubleshooting

  • Client connects but tools fail: confirm the CLI version matches the docs you are reading; alpha CLIs change.
  • Permission / path errors: check --automation-read-root / write root; agents cannot see files outside those roots.
  • Bridge cannot attach: verify the desktop process is running with matching host/port/token.
  • Agent invents Photoshop scripts: remind it to use PhotoCraft command IDs from command_list.
  • ChatGPT-only users: cloud ChatGPT cannot drive local MCP by itself — see ChatGPT workflow.

Safety and expectations

  • Alpha software: automation can corrupt documents. Prefer copies.
  • Do not paste secrets into prompts that get logged by your agent host.
  • This site is unofficial; authoritative flags live on GitHub.

Related guides

Note: Unofficial site. Command names and CLI flags follow upstream documentation and may change without notice. Framing checked 2026-10-16.