MCP Server
Connect bgbuster to Claude, Cursor, and any other MCP-compatible AI tool to remove image backgrounds directly from an agent.
bgbuster exposes a Model Context Protocol server so an AI agent (Claude Code, Claude Desktop, Cursor, or any other MCP client) can remove backgrounds and apply edits directly, without you writing any integration code.
Endpoint
https://api.bgbuster.com/mcpAuthenticate the same way as the REST API: an X-Api-Key header (or an Authorization: Bearer header), using a key from your dashboard.
Configuration
Run this in your project:
claude mcp add --transport http bgbuster https://api.bgbuster.com/mcp --header "X-Api-Key: your-api-key"Or add it directly to .mcp.json:
{
"mcpServers": {
"bgbuster": {
"type": "http",
"url": "https://api.bgbuster.com/mcp",
"headers": { "X-Api-Key": "your-api-key" }
}
}
}Once connected, your agent can call the tools below directly - for example, "remove the background from this image" with an attached file, or "process https://example.com/photo.jpg and give me a transparent PNG".
Tools
create-image-upload
Stages a raw local file so it can be used as input on remove-background/edit. Tool arguments are JSON and can't carry a real file, so this returns a presigned URL: PUT the file's bytes there with a Content-Type header matching mimeType, then pass the returned inputUrl straight through as input to remove-background or edit.
| Argument | Type | Description |
|---|---|---|
mimeType | string | One of image/jpeg, image/png, image/webp, image/gif, image/svg+xml, image/avif |
Returns uploadUrl (PUT the file here), inputUrl (pass this as input), and expiresInSeconds (both URLs and the staged file expire after this - 600 seconds).
remove-background
Removes the background from an image and returns a temporary URL for the result. Consumes one credit.
| Argument | Type | Description |
|---|---|---|
input | string | A publicly reachable image URL, an inputUrl from create-image-upload, or (for very small images) an inlined data:<mime>;base64,<data> URI |
format | "png" | "webp" | Output format, defaults to png |
trim | boolean | Trim empty space around the image |
edit
Applies one or more image editing operations, with optional background removal, and returns a temporary URL for the result. Consumes one credit. Takes the same operations array as the REST /images/edit endpoint - resize, rotate, flip, blur, brightness/contrast/saturation, background fill, background removal, and trim, executed in array order.
Both tools return a URL valid for 1 day.
Why create-image-upload exists
MCP tool arguments are plain JSON - there's no way to attach a raw file the way the REST API's multipart form can. If your agent already has a public URL for the image, just pass it as input directly. create-image-upload only matters when the agent has raw local bytes (a file on disk, a screenshot) with no URL: it stages the bytes in storage and hands back a URL your agent can use for that same call.