# ShortPixel Image Optimizer

Gives your agent one tool for shrinking public images by URL through the ShortPixel SPIO API. Handy when a project carries a lot of heavy assets.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: short-pixel-optimizer
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/short-pixel-optimizer/com.shortpixel.mcp
- Updated: 2026-10-06
- HTML: https://affpapa.org/en/nevibecode/mcp/shortpixel-image-optimizer

## What it does

The server sits at `https://mcp.shortpixel.com/mcp` and speaks Streamable HTTP. It exposes a single tool, `optimize_image_urls`, which takes a list of public image links and hands them to the SPIO API. One call accepts up to 100 URLs.

You supply the ShortPixel key yourself, in an `Authorization: Bearer <shortpixel_api_key>` header; `X-ShortPixel-Api-Key` works too. Nothing is stored server-side — the key is passed straight through to the public API. No key means no request, so grab one on shortpixel.com first.

Compression is controlled by arguments: `lossy` (`0` lossless, `1` lossy, `2` glossy), `wait` from `0` to `30` seconds, `upscale` (`0`, `2`, `3`, `4`), a `resize` mode (`0`, `1`, `3`, `4`) plus `resize_width` and `resize_height`. Your MCP client has to accept both JSON and SSE, or the response won't parse. Self-hosting needs Node.js 20+ and npm.

## Requirements
- Remote server: `https://mcp.shortpixel.com/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http shortpixel-image-optimizer https://mcp.shortpixel.com/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add shortpixel-image-optimizer --url https://mcp.shortpixel.com/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "shortpixel-image-optimizer": {
            "url": "https://mcp.shortpixel.com/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "shortpixel-image-optimizer": {
            "type": "http",
            "url": "https://mcp.shortpixel.com/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http shortpixel-image-optimizer https://mcp.shortpixel.com/mcp
```

## When to use it
- shrink a batch of linked images without leaving the chat
- pick lossless or lossy for a given set of pictures
- resize images to a target width and height before layout
- check how much weight the optimizer stripped from the logs
- run images through CMYK conversion

## Example prompts
- Optimize these image URLs with `optimize_image_urls` in lossy mode
- Compress the pictures in this list and resize them to 1200 pixels wide
- Run ShortPixel over these links and tell me how much was saved

## Similar
- [remove-image-watermark](https://affpapa.org/en/nevibecode/skills/remove-image-watermark.md) — skill · 7600 installs
- [vault-optimizer](https://affpapa.org/en/nevibecode/agents/vault-optimizer.md) — subagent · 727 installs
- [image-enhancer](https://affpapa.org/en/nevibecode/skills/image-enhancer.md) — skill · 989 installs
- [github-image-upload](https://affpapa.org/en/nevibecode/skills/drogers0-github-image-upload.md) — skill · 509 installs
- [linkfox-zhihuiya-fulltext-image](https://affpapa.org/en/nevibecode/skills/linkfox-zhihuiya-fulltext-image.md) — skill · 389 installs
- [unsplash-image](https://affpapa.org/en/nevibecode/skills/unsplash-image.md) — skill · 367 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
