rembg-mcp
MCP server for GPU-accelerated image background removal using rembg, running locally without API keys.
README
rembg-mcp
MCP server wrapping rembg for GPU-accelerated image background removal. Uses onnxruntime-gpu (CUDA) with automatic CPU fallback. No API keys — models run locally.
Install (GPU / CUDA)
Requires an NVIDIA GPU with CUDA 12.x runtime. Python 3.10–3.12.
uv tool install --python 3.12 "git+https://github.com/ReverserID/rembg-mcp.git"
Or from a local clone:
cd rembg-mcp
uv tool install --python 3.12 .
MCP client config
{
"mcpServers": {
"rembg": {
"command": "rembg-mcp"
}
}
}
Claude Code:
claude mcp add rembg -- rembg-mcp
Environment variables
| Var | Default | Description |
|---|---|---|
REMBG_MODEL |
u2net |
Default model |
REMBG_OUTPUT_DIR |
./rembg-output |
Where cutouts are saved |
REMBG_FORCE_CPU |
`` | Set to 1 to disable GPU |
Tools
remove_background— cut out background from an image on disk, save transparent PNG. Options:model,alpha_matting(better hair/fur edges),post_process_mask,only_mask,bgcolor("R,G,B,A"to composite onto a flat color).remove_background_base64— same, but image in/out as base64 (no disk).list_models— curated model catalog.gpu_status— show ONNX Runtime providers and whether CUDA is active.unload_sessions— free loaded models from GPU/CPU memory.
Models
u2net (default), u2netp, u2net_human_seg, u2net_cloth_seg, silueta, isnet-general-use, isnet-anime, birefnet-general, birefnet-general-lite, birefnet-portrait, sam. Any other rembg model name also works.
Models download on first use and cache under ~/.u2net.
Notes
- First
remove_backgroundcall downloads the model and initializes CUDA — slower; subsequent calls reuse the cached session. - Check
gpu_statusto confirmCUDAExecutionProvideris active.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.