Product photo cleanup
Connect morigraph first
This skill runs on the morigraph MCP server at https://morigraph.com/mcp. If its tools (for example morigraph:background_remove) are not available, connect it, then continue. Tools are written here as morigraph:<tool>; your host may show them under a slightly different prefix.
- Claude Code:
claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp - Codex:
codex mcp add morigraph --url https://morigraph.com/mcp - Cursor: add
{"mcpServers":{"morigraph":{"url":"https://morigraph.com/mcp"}}}to~/.cursor/mcp.json - Any other host: add a remote (streamable HTTP) MCP server with that URL. Steps per app: https://morigraph.com/connect/?ref=skills
Only connect it when the user asks for this task or agrees. Never ask the user for a password or token: sign-in happens in their browser.
This needs a free morigraph account, because photos are saved to the user's Files. The first call opens a browser sign-in; if none appears, send the user to https://morigraph.com/connect/?ref=skills
Steps
- Get the photo into Files. If it is a local file, upload it with
morigraph:files_upload(start, chunks in order, complete). Never invent image bytes: if you cannot read the file, ask the user to upload it in the morigraph dashboard. - Remove the background with
morigraph:background_remove: pass arequest_key(a stable unique string; letters, digits and_ . : -only) and thesourcefile as itsfile_idandrevision. Leavebackgroundout for a transparent PNG, or set a flat colour as#RRGGBB(#FFFFFFfor the white most marketplaces want). Photos can be up to 10 MiB and 4096 pixels a side. This step is free and never changes the original. - Poll the returned job with
morigraph:jobs_getuntil it finishes, then show the result. - Crop and resize with
morigraph:photo_edit(free). Itsoperationsrun in order, in pixels: acrop(x,y,width,height) that keeps the product centred, then aresizeto the size the user's shop needs. If they did not say, ask which marketplace, and do not guess its pixel rules; ask or leave the size as is. - Only if the user wants more than cleanup (a lifestyle scene, a restyle, an upscale), use
morigraph:image_edit. It costs credits (0.4 to 8 per edit, the tool states the price): tell the user the cost and get a yes before calling it. - Tell the user where the finished files are. Create a public link with
morigraph:files_linkonly when they need to post the image somewhere, and say the link is public.
Rules
- Keep the product itself unchanged: no altered colours, logos, labels or proportions unless the user asks. A listing photo must show what is sold.
- Batch work: process one photo fully first, show it, then repeat the approved settings on the rest.
- Reuse the same
request_keyon a retry; never resubmit a slow job under a new key.