PhotoSweat MCP server
Summary: This server currently exposes one tool for removing image backgrounds from local files and saving the cutout to disk.
Call
photo_image_cutoutwith an absolutepathto a JPG/PNG/WebP image up to 10 MB.Save the result to a chosen
outpath, or let it default to<input>-<capability>.<ext>.Choose a
backgroundoftransparent(default),white, orcolor, with a#rrggbbvalue when usingcolor.Choose output
formataspng(default) orjpeg; JPEG only works on opaque backgrounds.The schema does not expose upscaling, despite the README describing a beta
upscaletool.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PhotoSweat MCP server remove the background from /Users/me/photo.jpg"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PhotoSweat MCP server
An MCP server for background removal and upscaling. An agent hands it the absolute path to a photo; it calls the hosted PhotoSweat API, writes the result next to the original, and returns that path.
One server, several tools — today the live remove_background and the beta upscale, both named
after their REST slugs. The list grows as capabilities open, and nothing is hand-written twice.
No GPU, no API client to write, no key required to start — the free tier is 10 images a day per IP.
remove_background({ path: "/Users/me/photo.jpg" })
→ Saved image/png to /Users/me/photo-cutout.png (1437218 bytes). jobId: 5f0c…Why this one
The tool list is generated, not hand-written. On startup the server reads
GET /api/capabilitiesand registers one tool per open capability, deriving each parameter schema (type, range, default, enum) from that document. There is no second copy of the API to drift out of date.Only capabilities that actually answer are registered. Tools marked
pausedin the capability document are skipped, so an agent never picks a tool that would return404 tool_paused. A short tool list beats a wasted call.Hosted on real GPUs. Edges are hair-level, output is a real alpha channel.
Related MCP server: Remover Fundo
Install
git clone <this-repo> photosweat-mcp
cd photosweat-mcp
npm installNode 18 or newer.
Connect it
Gemini CLI — the extension points at the hosted endpoint, so there is nothing to clone or build:
gemini extensions install https://github.com/photo-sweat-shop/photosweat-mcpAgent Plugins hosts (Cursor, VS Code, Copilot, ChatGPT, Codex, Kiro) — this repository is also an
Agent Plugins 1.0 package: plugin.json plus a root mcp.json that
declares the hosted server as streamable-http, so those hosts pick up the same endpoint with no
local process.
Claude Code:
claude mcp add photo-workshop -- node /absolute/path/to/photosweat-mcp/server.mjsClaude Desktop / Cursor / any client that reads an MCP config file:
{
"mcpServers": {
"photo-workshop": {
"command": "node",
"args": ["/absolute/path/to/photosweat-mcp/server.mjs"],
"env": {
"PHOTO_API": "https://photosweat.shop"
}
}
}
}env can be omitted entirely — the defaults below are the public API.
Variable | Default | Meaning |
|
| Base URL of the API |
| (unset) | API key. Raises the daily allowance to 30 and gives you a stable identity |
| (unset) |
|
Or skip the install
The same capability is served remotely over Streamable HTTP — no clone, no npm install, no key:
{ "mcpServers": { "photosweat": { "url": "https://photosweat.shop/mcp" } } }Claude Code:
claude mcp add --transport http photosweat https://photosweat.shop/mcpThat endpoint exposes the same two tools the local server registers — remove_background and the
beta upscale — taking image_url or image_base64 and returning the result as an image content
block. Names are derived from the REST slugs, so they match POST /api/remove-background and
POST /api/upscale. The anonymous quota is 10 images/day per IP.
Per-client instructions: https://photosweat.shop/remove-background-mcp
Registered in the official MCP Registry as shop.photosweat/remove-background.
The only difference between the two transports is where the image lives: the local server in this
repo takes a file path, the remote endpoint takes image bytes. Same pipeline, same
allowance. An upscale takes 30–60 s, longer than a tool call should block, so on the hosted
endpoint it usually returns text carrying a status_url — poll that and fetch result_url rather
than resending the image.
Tools
Two tools are registered today: the live cutout and the beta upscale. Both are generated from
/api/capabilities at startup, so a parameter's default is whatever that document says, and the
names are the same ones the hosted endpoint uses.
Tool | Arguments |
|
|
|
|
path— absolute path to a JPG / PNG / WebP file, 10 MB max.out— where to write the result; defaults to<input>-<capability>.<ext>.background—transparent(default),white, orcolor.color—#rrggbb, only used whenbackgroundiscolor.format—png(default) orjpeg. JPEG only works on opaque backgrounds; transparency requires PNG.fillRatio— marketplace framing,0(default) keeps the canvas at the input size.1–100crops to the subject and centres it on a square canvas, the subject's longest side taking that share of the canvas side — the measure marketplaces use for "subject fill".longEdge— side of that square canvas in px,0–4096, default0(derive it fromfillRatiowithout resampling the subject).verifyText— off by default. Turn it on to OCR the source and the result and receive a list of missing or changed characters; it adds roughly 4–30 s, because it runs on CPU. On the small backup GPU it may come back asunavailableinstead of a verdict; the image is unaffected either way.scale—2or4(default4); prefer2for packaging, labels and other dense text.engine—ultrasharp(default) orx4plus;x4pluskeeps text edges cleaner.verifyText— off by default. Turn it on to OCR the source and the result and receive a list of missing or changed characters; it adds roughly 5 s on sparse text and up to 30 s on dense layouts, because it runs on CPU.
Other capabilities in the document (restore, colorize, white-background, erase, extend) are
paused and will be registered automatically if they reopen.
Under the hood
Each call is the same three-step flow the website uses: POST /api/presign → PUT the bytes
to the returned presigned URL → POST /api/jobs → poll GET /api/jobs/{id} → download the
result. PHOTO_KEY, when set, is sent as Authorization: Bearer … on the API calls only —
never on the presigned URL, whose signature does not cover that header.
Using the HTTP API directly instead
If you are not driving an agent, the single-request endpoint is simpler:
curl -sS https://photosweat.shop/api/remove-background \
-H "Authorization: Bearer $PHOTO_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
--data-binary @photo.jpg \
-o photo-cutout.pngIt returns the image bytes with 200, or 202 with a JSON body containing status_url if
the synchronous wait (20 s by default, ?wait=N to change it) runs out — poll that URL rather
than resending the image. Add ?format=json to always get JSON with a result_url instead of
bytes, and ?params={"background":"white"} to change the options.
GET /api/capabilities— every capability, its parameters, status and price.GET /openapi.json— the full OpenAPI description.https://photosweat.shop/apikey— keys, quickstart, batch endpoint, SDK.
Limits
10 MB per image; JPG, PNG or WebP.
10 images/day anonymously (per IP), 30/day with a key, 200/day signed in on the website.
Past the free allowance: prepaid credits at $0.01/image ($10 = 1,000 images).
Anonymous requests are rate-limited to 30/minute.
Results are deleted after 24 hours. Save them yourself.
Development
server.mjs and client.mjs in this repository are generated from the private worker
source and carry a header saying so. Change them upstream and re-sync; edits here are
overwritten. Behaviour is versioned together with the API, which is why the server reports its
own version rather than tracking the npm package independently.
License
MIT. See LICENSE.
Available Tools
1 toolphoto_image_cutoutRemove backgroundBInspect
Remove background — Cut out the subject onto transparency, white, or any solid color Returns image/png, about 10s. Writes the result to disk and returns its path.
Inputs: path (required), out, color, format, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of confusion with another operation. An agent can unambiguously identify this as the background-removal action.
The single name photo_image_cutout is clear, snake_case, and prefixed to indicate its domain. With only one tool there is no cross-tool pattern to break, though the verb-last phrasing (cutout) is slightly unconventional.
A one-tool server is thin even for a narrow image utility; core supporting operations like status, variant selection, or batch handling are absent. The count is a mismatch with what a usable MCP image server typically exposes.
The single operation is self-contained (writes output to disk, returns a path, supports transparent/white/solid backgrounds). However, the surface offers no supporting operations such as output options, listing prior results, or fallback handling, leaving obvious extension gaps.
Maintenance
Related MCP Connectors
Removes the background from an image by URL, cutting out the foreground person or object with AI and
Remove the background from any image: upload or link a photo, get a transparent PNG back.
Remove backgrounds from images, videos and animated GIFs: transparent cutouts, mattes, GIF stickers.
Remove image backgrounds with U2NetP and return transparent PNG pixels without identifying metadata
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to process images locally via file paths—converting, resizing, removing backgrounds, smart cropping, upscaling, reading or stripping metadata, and batch processing—without files ever leaving the device.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered removal of image backgrounds from URLs, returning transparent PNGs with optional solid color replacement or resizing.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to remove image backgrounds from individual files, folders, or URLs and save processed results with options for preview or full-size output, background color, format, and cropping while handling account sign-in and credit checks.60 npmMIT
- AlicenseAqualityBmaintenanceEnables agents to compress JPEG, PNG, and WebP images to a target byte size, split PDFs by page or ranges, and remove image metadata while processing local files without sending file bytes over the network.73MIT