
How to add MCP Image Compression to Windsurf
High-performance MCP server for compressing JPEG, PNG, WebP and AVIF images offline. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 33★ · stdio · no auth
Windsurf config for MCP Image Compression
npx -y @inhiblab-core/mcp-image-compression{
"mcpServers": {
"mcp-image-compression": {
"command": "npx",
"args": [
"-y",
"@inhiblab-core/mcp-image-compression"
],
"env": {
"IMAGE_COMPRESSION_DOWNLOAD_DIR": "<YOUR_DIR>"
}
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the MCP Image Compression config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5MCP Image Compression's tools become available to Cascade.
Before you start
- Node.js with npx (to run the published @inhiblab-core/mcp-image-compression package)
- An MCP-compatible client such as Claude Desktop, Cursor, or Windsurf
- A writable local directory set via the IMAGE_COMPRESSION_DOWNLOAD_DIR environment variable
- Optionally Docker, if building/running the server from the provided Dockerfile
What MCP Image Compression can do in Windsurf
image_compressionCompress one or more images. Inputs: urls (URLs of images to compress), quality (int, compression quality 0-100), and format (output format, e.g. "jpeg", "png", "webp", "avif"). Returns the URLs of the compressed images.
Security
No API key or authentication is required; the server runs locally over stdio and processes images offline. Set the IMAGE_COMPRESSION_DOWNLOAD_DIR environment variable to a directory where the server is allowed to write the compressed output files.
MCP Image Compression + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the MCP Image Compression config there under the "mcpServers" key and restart the client.
Is MCP Image Compression safe to use with Windsurf?
No API key or authentication is required; the server runs locally over stdio and processes images offline. Set the IMAGE_COMPRESSION_DOWNLOAD_DIR environment variable to a directory where the server is allowed to write the compressed output files.
Which image formats are supported?
The server supports JPEG, PNG, WebP, and AVIF for both input and output via the format parameter.
Does it require an internet connection or API key?
No. It works fully offline and requires no API key or authentication; compression runs locally.
Where are the compressed images saved?
Compressed files are written to the directory you set via the IMAGE_COMPRESSION_DOWNLOAD_DIR environment variable, and the tool returns the URLs of the compressed images.