An elite, state-of-the-art, and blazing-fast background removal, element isolation, and layer composition environment. Running entirely locally on your machine for maximum privacy, it combines advanced neural-network-based background removal (InSPyReNet) with OpenCV image processing.
It is designed to operate in two modes:
- Interactive Desktop GUI: A rich PyQt6 desktop application featuring full layer management, opacity controls, rectangular selections, clipboard integrations (
Cmd+C/Cmd+V), and real-time mask refinement sliders (Threshold, Edge Erosion/Dilation, Edge Blur). - Headless Model Context Protocol (MCP) Server: A high-performance, robust stdio-based server allowing external AI agents (like Claude Desktop, Cursor, Windsurf, or custom developer agents) to directly invoke local background removal, masking, image editing, and layer rendering capabilities.
- InSPyReNet Core: Incorporates the Intelligent Search and Parse Network, achieving professional-grade background cutouts in seconds.
- Edge Refinement Sliders: Real-time non-destructive controls including:
- Threshold: Hard transparency cutoff (0-255).
- Shift Edge: Erode (shrink) or Dilate (grow) the mask borders (-20 to +20 pixels).
- Blur Edge: Soften cutout borders with adjustable Gaussian blur radius (0-20) for incredibly natural compositions.
- Hierarchical Layer System: Stack, reorder, group (folders), toggle visibility, and adjust individual opacities.
- Selection & Clipboard Integration: Select rectangular regions, deep copy, and paste-in-place or merge directly into selected layers.
- Multi-Format Support: Reads JPG, PNG, WEBP; exports to transparent PNG or white/colored background JPG.
- Standard stdio transport implementation using Python's
FastMCPframework. - Secure local execution; no data ever leaves your machine.
FP-Background_Obliterator is optimized for cross-platform hardware acceleration:
- Apple Silicon macOS (M1/M2/M3): Automatically utilizes Apple Metal Performance Shaders (MPS) via
mps:0for super-fast neural execution. - Windows & Linux (NVIDIA): Automatically binds to CUDA GPU acceleration if an NVIDIA GPU and compatible PyTorch runtime are present.
- CPU Fallback: Gracefully falls back to high-performance CPU processing if no compatible GPU is detected.
We provide cross-platform automated scripts that will set up an isolated virtual environment (venv), install all pip requirements, and launch the application.
Ensure you are in the project folder and run:
./launch_headless.shThis script automatically checks for Python 3, creates venv if missing, installs dependencies, and boots the stdio MCP server.
To open the graphical interface:
./launch_ui.shWe provide native Command Prompt scripts (.bat) for Windows environments.
Double-click launch_headless.bat or run in CMD:
launch_headless.batDouble-click launch_ui.bat or run in CMD:
launch_ui.batBy connecting this local MCP server, you give your developer AI agents (e.g., Claude, Cursor, Windsurf) direct superpowers to manipulate images in your workspace.
Add the following configuration block under mcpServers in your Claude Desktop configuration file:
- macOS Path:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows Path:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"FP-Background_Obliterator": {
"command": "/Volumes/Test1/Works/FP-Background_Obliterator/launch_headless.sh"
}
}
}(On Windows, replace command path with "C:\\path\\to\\FP-Background_Obliterator\\launch_headless.bat").
- Open Cursor settings (
Cmd+,orCtrl+,). - Navigate to Features -> MCP.
- Click + Add New MCP Server.
- Set the fields:
- Name:
FP-Background_Obliterator - Type:
command - Command:
/Volumes/Test1/Works/FP-Background_Obliterator/launch_headless.sh(or the Windows absolute bat path)
- Name:
- Click Save and click Refresh on the server status.
Add the configuration to your user-level or workspace-level mcp_config.json file:
{
"mcpServers": {
"FP-Background_Obliterator": {
"command": "/Volumes/Test1/Works/FP-Background_Obliterator/launch_headless.sh"
}
}
}When an agent connects to the server, the following five powerful tools are dynamically injected into its cognitive space:
Remove the background of an image and save it as a transparent PNG.
- Arguments:
input_path(string, required): Absolute path to the source image.output_path(string, optional): Absolute path to save the cutout. Defaults to<input_name>_no_bg.pngin the source directory.mode(string, optional): Speed/quality core.'fast'(recommended) or'base'(ultra precision).threshold(integer, optional): Cutoff threshold (0-255). Default is128.shift(integer, optional): Erode (negative) or Dilate (positive) mask boundaries in pixels (-20 to +20). Default is0.blur(integer, optional): Soften mask edge radius (0-20). Default is0.
Generate and save the raw grayscale alpha mask (transparency map) for a local image.
- Arguments:
input_path(string, required): Absolute path to the source image.output_path(string, optional): Absolute path to save the grayscale mask PNG.mode(string, optional):'fast'or'base'.
Apply a grayscale mask image to an RGB image to create a transparent PNG, with optional edge refinement.
- Arguments:
input_path(string, required): Absolute path to source RGB image.mask_path(string, required): Absolute path to grayscale mask.output_path(string, required): Absolute path to save output transparent PNG.threshold/shift/blur(optional): Same refinement controls as above.
Perform basic image adjustments (brightness, contrast, resizing, rotating, and cropping) in one call.
- Arguments:
input_path(string, required): Source path.output_path(string, required): Destination path.brightness(number, optional): Brightness multiplier (e.g.1.2for brightening).contrast(number, optional): Contrast multiplier.width(integer, optional): Target resize width (maintains aspect ratio if height omitted).height(integer, optional): Target resize height.rotate_angle(number, optional): Counter-clockwise rotation angle.crop_box(array of 4 integers, optional): Crop boundaries[left, top, right, bottom].
Composite multiple image layers together on a single canvas, supporting transparency, custom position coordinates, and layer opacity.
- Arguments:
output_path(string, required): Path to save the composite PNG.canvas_width(integer, required): Target width.canvas_height(integer, required): Target height.layers(array of objects, required): Ordered list from top to bottom (first element is top-most layer). Each object:image_path(string, required): Absolute path to the layer image.position(array of 2 integers, optional):[x, y]coordinates. Default is[0, 0].opacity(number, optional): Opacity from0.0to1.0. Default is1.0.visible(boolean, optional): Defaulttrue.
background_color(array of 4 integers, optional): Canvas fill[R, G, B, A]. Default is[0, 0, 0, 0](transparent).
This project is licensed under the MIT License - see the LICENSE file for details. All model weights downloaded by InSPyReNet are subject to their respective creators' licensing terms.