MCP Directory

How to add MCP Image Compression to Cursor

High-performance MCP server for compressing JPEG, PNG, WebP and AVIF images offline. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 33 · stdio · no auth

Cursor 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

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the MCP Image Compression config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of MCP Image Compression's tools to confirm it's connected.

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 Cursor

image_compression

Compress 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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the MCP Image Compression config there under the "mcpServers" key and restart the client.

Is MCP Image Compression safe to use with Cursor?

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.

View repo Full MCP Image Compression page