Background Vanish MCP Server
A local Model Context Protocol (MCP) server that provides tools for isolating backgrounds from images (creating transparent PNGs). It runs entirely locally using rembg (U2NET) and the official mcp Python SDK.
Features
- Local-first: Uses
rembgwhich downloads the U2NET model (~176MB) locally on first run. No API keys or cloud service dependencies. - File System Integration: Works directly with local file paths.
- Base64 support: Can process images sent as base64 strings directly.
Tools
1. remove_background
Removes the background from an image file on the local file system.
- Arguments:
input_path(string, required): Absolute path to the input image file (e.g. JPG, PNG).output_path(string, optional): Absolute path where the transparent PNG should be saved. Defaults to<input_filename>_no_bg.png.return_base64(boolean, optional): Iftrue, returns the base64-encoded string of the output.
- Returns: A confirmation message with path info and optional base64 representation.
2. remove_background_base64
Removes background from a base64-encoded image directly.
- Arguments:
image_base64(string, required): Base64-encoded image data. Supports optional data URI prefix (e.g.data:image/png;base64,...).
- Returns: A transparent PNG image encoded in base64.
Setup & Installation
1. Python Environment Setup
Ensure Python 3.10+ is installed. Then set up the virtual environment:
python -m venv .venv
.venv\Scripts\activate
pip install -e .
Or directly install the required packages:
pip install mcp rembg pillow hatchling
2. Configure Claude Desktop
Add this to your Claude Desktop configuration file (typically located at %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"bg-vanish-mcp": {
"command": "C:/Companies/MCP-servers/bg-remover-mcp/.venv/Scripts/python.exe",
"args": [
"C:/Companies/MCP-servers/bg-remover-mcp/server.py"
],
"env": {
"USE_GPU": "true"
}
}
}
}
[!NOTE] On the very first image processing request,
rembgwill automatically download the U2NET model to your user home folder (~/.u2net/u2net.onnx). This may take a few moments depending on your network connection.
Metadata
Release files for bg-vanish-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bg_vanish_mcp-0.1.0.tar.gz | 770.6 kB | Without provenance | Details for bg_vanish_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bg_vanish_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for bg_vanish_mcp-0.1.0-py3-none-any.whl |
Total release size: 775.5 kB
Release files / bg_vanish_mcp-0.1.0.tar.gz
| Download URL | bg_vanish_mcp-0.1.0.tar.gz |
|---|---|
| Size | 770.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10e355107ff9e3e65ad523f096eeecfd94d8a4fb2dbdc176d82ba0147a5572c9
|
|
BLAKE2b-256 checksum How to use checksums |
c427ecf9bda4a74f4802fabe2e438042ddfb50e52ee961e6c82bdadbb6890c48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / bg_vanish_mcp-0.1.0-py3-none-any.whl
| Download URL | bg_vanish_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ab9b65290c7705fe426ac4e6e4bf7d3f5595948521c2de6beb7c9b2bcf0aa34
|
|
BLAKE2b-256 checksum How to use checksums |
79add12c0b9e3c0ee3bdb1376800df12868ec6a65d8f50f5d08154f47a4dda40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for bg-vanish-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.