MCP server
Remove backgrounds from Claude Desktop, Claude Code, Codex CLI, Gemini CLI or Cursor with a local MCP server that runs on your machine. Nothing is uploaded.
toolz-mcp is a local Model Context Protocol server that gives AI assistants a remove_background tool. Ask Claude, Codex, Gemini CLI or Cursor to "remove the background from ~/Desktop/chair.jpg" and the assistant calls the tool, which runs a segmentation model on your own machine and writes a transparent PNG next to the original. Nothing is uploaded, and there is no API key.
Not published yet. The
toolz-mcppackage is being built and is not on npm yet, so the commands on this page will fail with a "not found" error until it is released. This page documents the interface it will ship with. Until then, use the AI Background Remover in the browser.
Is there a background remover API?
Not a hosted HTTP API. Toolz.dev processes images client-side and has no server that receives photos, so there is nothing to call over the internet. The MCP server is the programmatic way in: it runs locally, speaks MCP over stdio, and any MCP client can use it. The same approach keeps it free and private.
What do I need?
Node.js with npx on your PATH, and an MCP client. Your client starts the server itself, with the command in its config below. To check the package runs on your machine, start it by hand with your package manager of choice:
npx -y toolz-mcpIt should sit silently waiting for a client; press Ctrl C to stop it. Expect the first remove_background call of a session to take longer than the rest while the model loads.
How do I add it to Claude Desktop?
Open Settings → Developer → Edit Config, which opens claude_desktop_config.json (on macOS in ~/Library/Application Support/Claude/, on Windows in %APPDATA%\Claude\). Add a toolz entry under mcpServers:
{
"mcpServers": {
"toolz": {
"command": "npx",
"args": ["-y", "toolz-mcp"]
}
}
}Quit and reopen Claude Desktop. The tool shows up in the tools menu of a new chat.
How do I add it to Claude Code?
One command:
claude mcp add toolz -- npx -y toolz-mcpAdd --scope user before the name to make it available in every project, not just the current one. Run claude mcp list to check it is connected.
How do I add it to Codex CLI?
Add a server table to ~/.codex/config.toml:
[mcp_servers.toolz]
command = "npx"
args = ["-y", "toolz-mcp"]Start a new Codex session to pick it up.
How do I add it to Gemini CLI?
Add it to mcpServers in ~/.gemini/settings.json, or in .gemini/settings.json inside a project to scope it there:
{
"mcpServers": {
"toolz": {
"command": "npx",
"args": ["-y", "toolz-mcp"]
}
}
}Inside Gemini CLI, /mcp lists the configured servers and their tools.
How do I add it to Cursor?
Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project):
{
"mcpServers": {
"toolz": {
"command": "npx",
"args": ["-y", "toolz-mcp"]
}
}
}Then check it is switched on in the MCP section of Cursor's settings.
What does the remove_background tool accept?
| Argument | Type | Required | Meaning |
|---|---|---|---|
input |
string | Yes | A local file path, or an http:// or https:// URL of an image |
output |
string | No | Where to write the result. Default: <input name>-no-bg.png next to the input |
format |
"png" or "webp" |
No | Output format. Both keep transparency. Default png |
crop |
boolean | No | Trim the output to the subject's bounding box |
It returns the path of the file it wrote and the image's width and height. Clients discover the tool, and its argument schema, through the standard MCP tools/list request, so you never have to describe it to the assistant yourself.
Things you can ask once it is installed:
- "Remove the background from every JPG in
./productsand save them as WebP." - "Cut out
https://example.com/team/ana.jpgand crop it to her." - "Remove the background from
~/Downloads/sneaker.jpgand save it assneaker-cutout.webpin the same folder."
Where does the processing happen?
On your computer. The server runs the model with ONNX Runtime for Node.js on the CPU, using the same families of open models as the browser tool (IS-Net or BiRefNet, see Models and hardware). Local files are read from disk and the result is written to disk. When you pass a URL, the server downloads that image itself; that request goes to the image's host, not to Toolz.dev.
Some clients show you each tool call and its arguments before running it. The tool only reads the input you give it and writes the output file.
Can ChatGPT remove a background with this?
ChatGPT's own apps connect to remote MCP servers rather than local stdio ones, so toolz-mcp does not plug into ChatGPT directly today. Codex CLI, OpenAI's local coding agent, does support it (see above). For a one-off in any chat assistant, the browser tool is the quicker route: remove the background, then paste the result with ⌘ V.
Troubleshooting the MCP server
- "not found" or 404 from npm. The package is not published yet; see the note at the top.
- The client says the server failed to start. Run
npx -y toolz-mcpin a terminal. It should sit waiting for input with no error; press Ctrl C to stop it. An error there is the real problem. - Windows and
npx. Some clients cannot startnpxdirectly on Windows. Use"command": "cmd"with"args": ["/c", "npx", "-y", "toolz-mcp"]. - Relative paths go to the wrong place. A relative path is resolved from the server's working directory, which the client picks and which may not be your project folder. Absolute paths always work.