Use PhotoFresco with AI agents

Connect Claude Code, Codex, Gemini CLI, or other MCP clients to edit images in a live browser window with explicit permissions.

Connect local AI coding agents—such as Claude Code, Codex, or Gemini CLI—to a live PhotoFresco window over MCP to automate layers, masks, selections, adjustments, previews, and exports. Every edit appears in History as a normal undoable step.

Connections require verifying a connection code and clicking Allow. Each agent session begins with zero permissions, and you can revoke access, pause, or stop the agent at any time.

A PhotoFresco window with Claude Code connected: the Agent badge on the red-shoes tab and the agent bar with Permissions, Pause, and Stop above the canvas
A PhotoFresco window with Claude Code connected: the Agent badge on the red-shoes tab and the agent bar with Permissions, Pause, and Stop above the canvas

How it works

Your agent communicates with the open-source local connector via an MCP server or the photofresco CLI. The connector launches photofresco.com in an isolated browser window and relays requests; the editor enforces your active permissions before executing any operation.

The connector, MCP server, CLI, and agent skill are MIT-licensed at github.com/photofresco/photofresco-agent. The editor itself runs at photofresco.com.

What you need

  • Node.js 22 or newer.
  • Google Chrome, Microsoft Edge, or Chromium 120+, installed locally (the connector does not bundle a browser). Override browser detection with PHOTOFRESCO_BROWSER or --browser.
  • An MCP-compatible agent: Claude Code, Codex, Gemini CLI, or any stdio MCP client.
  • Operating system: Tested daily on macOS; limited Linux verification; Windows untested (see Windows and Linux).

No PhotoFresco account is required unless the agent invokes paid AI features (see Spend and credit budgets).

Install

Install from GitHub using your agent's plugin manager or a local clone.

Claude Code plugin

Installs both the MCP server and the PhotoFresco agent skill:

claude plugin marketplace add photofresco/photofresco-agent
claude plugin install photofresco@photofresco

Or run /plugin marketplace add photofresco/photofresco-agent followed by /plugin install photofresco@photofresco inside Claude Code. Verify with claude mcp list (plugin:photofresco:photofresco shows Connected). No browser window opens until the agent connects.

Codex plugin

codex plugin marketplace add photofresco/photofresco-agent
codex plugin add photofresco@photofresco

Verify with codex mcp list.

Gemini CLI extension

gemini extensions install https://github.com/photofresco/photofresco-agent

Verify with gemini extensions list.

Other agents

AgentInstall command
Hermes Agenthermes plugins install photofresco/photofresco-agent --no-enable, then hermes plugins enable photofresco
OpenClawopenclaw plugins install photofresco --marketplace photofresco/photofresco-agent
Antigravityagy plugin install https://github.com/photofresco/photofresco-agent
Devindevin plugins install photofresco/photofresco-agent
KiroPowers → Add Custom Power → Import power from GitHub with https://github.com/photofresco/photofresco-agent

See the README for OpenCode and other MCP client configs.

Plugin installs grant no local folder access: the agent can only edit documents you open manually in the window. To allow direct file opens and exports, configure from a clone below.

From a clone, with folder access

The repository bundles the MCP SDK, so no npm install is required:

git clone https://github.com/photofresco/photofresco-agent.git ~/photofresco-agent
claude mcp add -s user photofresco -- node ~/photofresco-agent/src/bin/photofresco.js mcp --read ~/Pictures --write ~/Pictures/PhotoFresco

Run claude mcp add outside the clone directory so Claude Code does not load a duplicate entry from the repository's .mcp.json.

For other MCP clients:

{
  "mcpServers": {
    "photofresco": {
      "command": "node",
      "args": ["/Users/you/photofresco-agent/src/bin/photofresco.js", "mcp", "--read", "/Users/you/Pictures", "--write", "/Users/you/Pictures/PhotoFresco"]
    }
  }
}
OptionDescription
--read <folder>Allow opening images from this folder (repeatable).
--write <folder>Allow exporting files into this folder and new subfolders (repeatable).
--overwritePermit overwriting existing files in --write folders when the agent explicitly requests overwrite.
--tools <groups>Tool exposure scope: essentials (default), all, or comma-separated group names.
--profile <folder>Persistent browser profile directory, or ephemeral for a temporary profile.
--browser <path>Path to a Chromium-based browser executable (same as PHOTOFRESCO_BROWSER).

Install the agent skill alone

If you configured the MCP server manually, add the PhotoFresco skill separately:

npx skills add photofresco/photofresco-agent

Remove it with npx skills remove photofresco. Plugin installs already include this skill.

Connect and check the code

  1. Ask your agent to edit an image in PhotoFresco. The connector launches an isolated browser window (your everyday browser profile is never accessed).
  2. Compare the connection code printed by the agent (for example, 4913-7799) with the code in the Connect agent dialog.
  3. Click Allow if the codes match and you initiated the request, or click Deny to reject it.
The Connect agent dialog for Claude Code via MCP showing the connection code, what the agent will ask for, and Deny, Later, and Allow buttons
The Connect agent dialog for Claude Code via MCP showing the connection code, what the agent will ask for, and Deny, Later, and Allow buttons

Clicking Later dismisses the modal and leaves a Review… button in the top bar for 3 minutes before the request expires.

Choose what the agent may do

Immediately after pairing, the Agent permissions dialog opens with the agent's requested permissions pre-checked. Uncheck any permission you do not want to grant, then click Allow (or Deny to grant none).

The Agent permissions dialog with Read, Edit, and Export checked and Send and Spend unchecked
The Agent permissions dialog with Read, Edit, and Export checked and Send and Spend unchecked
PermissionScope
ReadInspect document metadata, pixels, rendered previews, and saved lists.
EditModify open documents, open or create tabs, and change tool settings, actions, and presets.
ExportExport or save files out of the editor.
SendTransmit document data to PhotoFresco services (AI, Cloud drive, feedback).
SpendInvoke paid AI features up to your configured credit budget.

Operations require every applicable permission—for example, paid AI requires Read, Edit, Send, and Spend.

Click Permissions in the agent bar at any time to revoke capabilities (active requests using a revoked permission stop immediately). Additional permission requests from the agent appear next to a Review… button in the bar.

Spend and credit budgets

Paid AI features—including image generation, AI background removal, and AI Layer Split—require Spend plus a credit budget you set in the dialog.

The Agent permissions dialog for a request with all five permissions checked and a credit budget of 20 credits
The Agent permissions dialog for a request with all five permissions checked and a credit budget of 20 credits
  • Credit pricing is enforced by PhotoFresco, never the agent. The agent bar displays spent vs. remaining budget.
  • Sign in to PhotoFresco inside the agent's isolated browser window before granting Spend.
  • Budgets expire after 12 hours. Revoking Spend or clicking Stop blocks new paid requests immediately; jobs already sent to an AI provider still bill, though their results are discarded.

The agent bar

Connected sessions display a status bar above the canvas and an Agent badge on the controlled document tab.

The red-shoes tab with its Agent badge and the left side of the agent bar: Claude Code via MCP, Connected to red-shoes
The red-shoes tab with its Agent badge and the left side of the agent bar: Claude Code via MCP, Connected to red-shoes

The right side shows active permissions, credit usage (when Spend is enabled), and Permissions, Pause, and Stop controls:

The right side of the agent bar showing Read, Edit, and Export next to the Permissions, Pause, and Stop buttons
The right side of the agent bar showing Read, Edit, and Export next to the Permissions, Pause, and Stop buttons
StatusMeaning
Connected to "name"Idle and ready for requests.
Working on "name"Actively executing an operation.
Paused — you edited "name"Paused automatically after your edit; click Resume to continue.
Paused — you're working on "name"Paused while you paint or drag on the canvas.
Waiting — switch to "name"Agent requests wait until you switch back to its tab.
Disconnected — waiting to reconnectConnection dropped; the agent has 5 minutes to reconnect.

Your manual edits always take precedence: modifying the agent's document automatically pauses write access until you click Resume. Agents only modify their bound tab while it is active.

The agent bar showing Paused — you edited red-shoes, with the tab's Agent badge in amber
The agent bar showing Paused — you edited red-shoes, with the tab's Agent badge in amber
The right side of a paused agent bar showing Read, Edit, and Export, with Permissions, a highlighted Resume button, and Stop
The right side of a paused agent bar showing Read, Edit, and Export, with Permissions, a highlighted Resume button, and Stop

Every agent change records in History and undoes with Cmd+Z / Ctrl+Z. Clicking Stop, closing the window or tab, or reloading terminates the session, clears permissions and budgets, and requires fresh pairing to reconnect.

Previews, files, and exports

  • Previews: With Read, agents can request PNG previews of the full canvas, cropped regions, individual layers, or grayscale masks/selections (up to 2,048 px per side). Previews sent to the agent are subject to your AI provider's policy.
  • File opens: Restricted to --read folders, max 32 MiB, in PNG, JPEG, WebP, GIF, BMP, AVIF, PSD, or .pfd format. Opens in a new tab.
  • Exports: With Read and Export, agents can export PNG, PSD, or .pfd files only inside --write folders. The connector verifies a SHA-256 checksum before writing and refuses overwrites unless both --overwrite and an explicit overwrite request are present.

Privacy: what is sent where

  • Session recording off: Connector-launched windows disable session recording, diagnostics, opened-file uploads, and acquisition tracking. AI tools and Cloud drive remain governed by your permissions.
  • No network listener: The connector opens https://photofresco.com/app/?pf_ref=mcp (or pf_ref=cli) and communicates with the browser over a private local channel—no network ports open.
  • Profile location: Isolated browser profiles (including sign-ins and autosaves) live in ~/Library/Application Support/PhotoFresco Connector (macOS), %LOCALAPPDATA%\PhotoFresco Connector (Windows), or ~/.local/share/photofresco-connector (Linux).
  • Provider scope: Data read by the agent passes to your agent's AI provider; data sent under Send goes to PhotoFresco services.

See DISCLOSURE.md for the complete connector disclosure and Privacy for editor privacy policy.

Windows and Linux

  • macOS: Tested in daily use.
  • Linux: Verified on 7 November 2026 on Ubuntu 24.04 (arm64) with Node.js 24 and Chromium 156 in a headless container—browser discovery (PHOTOFRESCO_BROWSER), editor launch, and the pairing code dialog worked, though end-to-end editing after Allow was not run. 128 of 132 automated tests passed (three failed due to container read-only/no-Git setup; one idle CLI socket timing check remains open).
  • Windows: Untested. Windows Chrome/Edge paths, %LOCALAPPDATA%\PhotoFresco Connector, and named-pipe CLI transport are implemented but unverified. Report results via Get help.

On any OS, set PHOTOFRESCO_BROWSER or pass --browser if Chrome, Edge, or Chromium 120+ is not detected automatically.

Troubleshooting

SymptomFix
"No Google Chrome, Microsoft Edge or Chromium installation was found"Install Chrome, Edge, or Chromium 120+, or set PHOTOFRESCO_BROWSER to the executable path.
Connection request expiredPairing prompts expire after 3 minutes. Re-initiate the connection and verify the new code.
Agent reports pausedYou edited its document. Click Resume in the agent bar.
Agent reports document not activeSwitch back to the tab marked Agent.
Agent reports missing permissionClick Review… or Permissions to grant the required scope.
Spend cannot be grantedSign in to PhotoFresco inside the agent's browser window first.
Agent cannot open or save filesPlugin installs lack folder grants. Configure via a clone with --read and --write.
File open fails with size or corruption errorFile exceeds limits or is damaged; see Opening files & limits.

Uninstall

  • Claude Code: claude plugin uninstall photofresco@photofresco (or claude mcp remove -s user photofresco for clone installs).
  • Codex: codex plugin remove photofresco@photofresco.
  • Gemini CLI: gemini extensions uninstall photofresco.
  • Other agents: hermes plugins remove photofresco, openclaw plugins uninstall photofresco, agy plugin uninstall photofresco, or devin plugins remove photofresco.
  • Skill: npx skills remove photofresco.

Delete the connector data folder listed above (and the clone directory if used). No background services, login items, or browser extensions remain.

Get help

Report bugs or ask questions in GitHub issues or email [email protected]. The connector, MCP server, CLI, and skill are MIT-licensed; photofresco.com follows our Privacy policy and Terms of service.

Last updated