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.

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_BROWSERor--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
| Agent | Install command |
|---|---|
| Hermes Agent | hermes plugins install photofresco/photofresco-agent --no-enable, then hermes plugins enable photofresco |
| OpenClaw | openclaw plugins install photofresco --marketplace photofresco/photofresco-agent |
| Antigravity | agy plugin install https://github.com/photofresco/photofresco-agent |
| Devin | devin plugins install photofresco/photofresco-agent |
| Kiro | Powers → 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"]
}
}
}
| Option | Description |
|---|---|
--read <folder> | Allow opening images from this folder (repeatable). |
--write <folder> | Allow exporting files into this folder and new subfolders (repeatable). |
--overwrite | Permit 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
- Ask your agent to edit an image in PhotoFresco. The connector launches an isolated browser window (your everyday browser profile is never accessed).
- Compare the connection code printed by the agent (for example,
4913-7799) with the code in the Connect agent dialog. - Click Allow if the codes match and you initiated the request, or click Deny to reject it.

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).

| Permission | Scope |
|---|---|
| Read | Inspect document metadata, pixels, rendered previews, and saved lists. |
| Edit | Modify open documents, open or create tabs, and change tool settings, actions, and presets. |
| Export | Export or save files out of the editor. |
| Send | Transmit document data to PhotoFresco services (AI, Cloud drive, feedback). |
| Spend | Invoke 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.

- 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
12hours. 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 right side shows active permissions, credit usage (when Spend is enabled), and Permissions, Pause, and Stop controls:

| Status | Meaning |
|---|---|
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 reconnect | Connection 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.


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,048px per side). Previews sent to the agent are subject to your AI provider's policy. - File opens: Restricted to
--readfolders, max32 MiB, in PNG, JPEG, WebP, GIF, BMP, AVIF, PSD, or.pfdformat. Opens in a new tab. - Exports: With Read and Export, agents can export PNG, PSD, or
.pfdfiles only inside--writefolders. The connector verifies a SHA-256 checksum before writing and refuses overwrites unless both--overwriteand 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(orpf_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.128of132automated 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
| Symptom | Fix |
|---|---|
| "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 expired | Pairing prompts expire after 3 minutes. Re-initiate the connection and verify the new code. |
| Agent reports paused | You edited its document. Click Resume in the agent bar. |
| Agent reports document not active | Switch back to the tab marked Agent. |
| Agent reports missing permission | Click Review… or Permissions to grant the required scope. |
| Spend cannot be granted | Sign in to PhotoFresco inside the agent's browser window first. |
| Agent cannot open or save files | Plugin installs lack folder grants. Configure via a clone with --read and --write. |
| File open fails with size or corruption error | File exceeds limits or is damaged; see Opening files & limits. |
Uninstall
- Claude Code:
claude plugin uninstall photofresco@photofresco(orclaude mcp remove -s user photofrescofor 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, ordevin 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