ShortPixel Image Optimizer — Claude Code MCP server for image URLs
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.
claude mcp add --transport http shortpixel-image-optimizer https://mcp.shortpixel.com/mcpWhat ShortPixel Image Optimizer 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.
What it helps with
- 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 for the agent
- Optimize these image URLs with
optimize_image_urlsin 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
How to install ShortPixel Image Optimizer
Platform CLI: remote server
claude mcp add --transport http shortpixel-image-optimizer https://mcp.shortpixel.com/mcpPlatform CLI: remote server
codex mcp add shortpixel-image-optimizer --url https://mcp.shortpixel.com/mcpConfig file
{
"mcpServers": {
"shortpixel-image-optimizer": {
"url": "https://mcp.shortpixel.com/mcp"
}
}
}Config file
{
"servers": {
"shortpixel-image-optimizer": {
"type": "http",
"url": "https://mcp.shortpixel.com/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http shortpixel-image-optimizer https://mcp.shortpixel.com/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about ShortPixel Image Optimizer
How do I install ShortPixel Image Optimizer in Claude Code?
Run claude mcp add --transport http shortpixel-image-optimizer https://mcp.shortpixel.com/mcp. Then add the header carrying your ShortPixel key, or requests will be rejected.
What does ShortPixel Image Optimizer do?
It hands the agent an optimize_image_urls tool that sends public image links to the SPIO API and returns compressed versions. Up to 100 URLs per call.
Do I need an API key?
Yes. Your own ShortPixel key travels with every request in the Authorization header. The server does not keep it — it forwards it to the public API.