Claude Code Custom Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Claude Code Custom Mcp Server (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that provides powerful image processing tools for Claude Code. This server implements three main functionalities: downloading toy-related images from the web, resizing images, and removing backgrounds from images.
The following prompts were used in this project to demonstrate the image processing pipeline. Each prompt drove a real Claude Code session.
Download 3 different random pictures of single squid. Resize below 150px either
the width or the length. Remove the background and store as png named with
suffix "_rembg".What happened:
Check why image background removal on the 3 squid images are taking so long
and fix the bug. Verify after fix the bug.Root causes found and fixed:
| # | Bug | Fix |
|---|---|---|
| 1 | new_session() and remove() are synchronous/CPU-bound but called directly inside async def, blocking the entire asyncio event loop and starving MCP keepalives | Wrapped rembg work in asyncio.to_thread() so the event loop stays alive during processing |
| 2 | rembg was installed without its [cpu] extra, so onnxruntime was missing — causing a hard crash on first use | Changed rembg>=2.0.50 → rembg[cpu]>=2.0.50 in requirements.txt |
| 3 | The u2net model (~176MB) was downloaded from the internet on every cold container start, making the first call very slow and compounding the blocked-loop problem | Added a RUN python -c "from rembg import new_session; new_session('u2net')" step in Dockerfile to bake the model into the image at build time |
Outcome: All 3 background removals completed successfully in parallel after the rebuild.
fetch_toy_image)resize_image)remove_background_as_png) mkdir mcp-toy-image-tools && cd mcp-toy-image-tools pip install -r requirements.txt python server.py docker build -t mcp-toy-image-tools-server . mkdir -p images input output docker run --rm -i \
--name mcp-toy-image-tools \
-v $(pwd)/images:/app/images \
-v $(pwd)/input:/app/input \
-v $(pwd)/output:/app/output \
mcp-toy-image-tools-serverFor Docker execution:
{
"mcpServers": {
"image-tools-server-docker": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--name", "mcp-toy-image-tools",
"-v", "${PWD}/images:/app/images",
"-v", "${PWD}/input:/app/input",
"-v", "${PWD}/output:/app/output",
"mcp-toy-image-tools-server"
],
"cwd": "/path/to/your/mcp-toy-image-tools"
}
}
}After updating your MCP configuration, restart Claude Code to load the new server.
Once integrated with Claude Code, you can use these commands:
Please use the fetch_toy_image tool to download 5 robot toy images to the ./images directory.Can you resize the image at ./images/robot_toy_1.jpg to 800x600 pixels?Please remove the background from ./images/robot_toy_1.jpg and save it as a PNG.mcp-toy-image-tools/
├── server.py # Main MCP server implementation
├── requirements.txt # Python dependencies
├── Dockerfile # Docker container configuration
├── .mcp.json # Claude Code MCP configuration
├── README.md # This documentation
├── images/ # Directory for downloaded/processed images
├── input/ # Directory for input images (Docker)
└── output/ # Directory for output images (Docker)onnxruntime for CPU inference)PYTHONPATH: Set to project directory for proper module resolution/app/images: Directory for downloaded and processed images/app/input: Input directory for source images/app/output: Output directory for processed images pip install duckduckgo-searchnew_session() and remove() blocking the asyncio event loop.await asyncio.to_thread(_process) in server.py.rembg[cpu] (not just rembg) is in requirements.txt so onnxruntime is present.mcp-userTo run with debug logging:
# Direct Python
PYTHONPATH=. python server.py --log-level DEBUG
# Docker
docker run --rm -i -e LOG_LEVEL=DEBUG mcp-toy-image-tools-server.mcp.json is in the correct locationcwd path is correctThe server uses FastMCP's @mcp.tool() decorator pattern. To add a new tool:
@mcp.tool()
async def your_new_tool(image_path: str, param: str = "default") -> str:
"""Short description shown in Claude Code tool list."""
# For CPU-bound or blocking work, use asyncio.to_thread():
def _process():
# heavy work here
return result
return await asyncio.to_thread(_process) docker build -t mcp-toy-image-tools-server .
# Then /mcp → Reconnect in Claude CodeTest the server independently:
echo '{"method": "tools/list", "params": {}}' | python server.pyThis project is provided as-is for educational and development purposes. Please respect the terms of service of image sources and AI models used.
For issues and questions:
Note: This tool downloads images from the internet and uses AI models for processing. Please use responsibly and respect copyright and terms of service of source websites.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.