ShortPixel Image Optimizer
com.shortpixel.mcpPublished by mcp.shortpixel.comOfficial publisherv0.3.0Updated Oct 24, 2026
Optimize public image URLs via the ShortPixel SPIO API for AI agents
Overview
A remote MCP server that lets an assistant optimize public image URLs through the ShortPixel SPIO API, with options for compression, resizing, format conversion
- What you can do
- Optimize one or more public image URLs through ShortPixel, up to 100 per call, and get back the optimized image link and reduction figures. Choose compression level (lossless, lossy, glossy), wait time, upscaling, and resize mode with target width and height. Convert formats (WebP, AVIF, JPG, PNG, GIF), remove backgrounds, convert CMYK to RGB, and keep or strip EXIF metadata. Apply per-URL overrides and echo back a data list unchanged in the response.
- When to use it
- Useful when an assistant works with web images and needs them compressed, resized, converted, or background-removed without leaving the chat. Suited to batch optimization of up to 100 public image URLs per request.
- Requirements
- A remote endpoint at mcp.shortpixel.com over Streamable HTTP; no local install is needed for end users. A ShortPixel account and API key are required, sent as an Authorization bearer token (or the X-ShortPixel-Api-Key header). The image URLs must be publicly reachable.
Installation
In SourceWeft
- Open ShortPixel Image Optimizer in the dashboard and add it to a workspace.
- Connect Authorization token credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/com.shortpixel.mcp%2Foptimize/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"shortpixel-image-optimizer": {
"type": "http",
"url": "https://mcp.shortpixel.com/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
ShortPixel MCP Server
Public HTTP MCP server that exposes ShortPixel SPIO image optimization to AI agents (Cursor, Claude Desktop, VS Code, etc.).
Architecture
Each request carries the user's own ShortPixel API key. The MCP server does not store user keys — it forwards them to the public SPIO API.
Requirements
- Node.js 20+
- npm
Install (server)
Edit .env for server settings (port, allowed hosts, upstream API URL). Do not put user API keys in server .env.
Run
Endpoints:
Quick test (curl)
Server up, no API key:
API key present (simple check):
Use http:// (not https://) on port 3000 unless TLS is configured on nginx.
MCP request (important: Streamable HTTP clients must accept both JSON and SSE):
Authentication
Send the user's ShortPixel API key on every MCP request:
Alternative header:
Users without a key can get one at shortpixel.com.
Cursor setup (end user)
Replace the URL with your deployed host during development (e.g. http://localhost:3000/mcp).
Server environment variables
For internal ShortPixel development, set SHORTPIXEL_API_URL=https://devapi2.shortpixel.com/v2.
Request logging
Logs go to stdout, which the shortpixel-mcp systemd service redirects to /var/log/shortpixel/mcp.log (npm start shows them directly when running locally).
Default (LOG_FORMAT=text) — narrative flow you can follow:
LOG_MCP_PROTOCOL=false keeps only high-level app logs and hides MCP payload dumps.
Structured (LOG_FORMAT=json) — one JSON object per line:
API keys are masked (****abcd). Full keys are never logged.
Note: The chat prompt never reaches this server. The LLM (inside the MCP client) turns user text into a structured tools/call; the server only sees JSON-RPC arguments and maps them to the SPIO API.
Set LOG_LEVEL=debug for tools/list and extra HTTP lines.
Deploy
Runs as the shortpixel-mcp systemd service (unit file at /etc/systemd/system/shortpixel-mcp.service), which runs node dist/index.js directly (no pm2) and reads env vars from .env in the project directory (EnvironmentFile=).
Re-upload package.json and package-lock.json after each dependency change. If build still fails, run npm ci --include=dev (some servers set NODE_ENV=production which skips devDependencies).
Available MCP tools
optimize_image_urls arguments:
urls(required): Public image URLs to optimize (max 100)lossy: Compression level (0lossless,1lossy,2glossy)wait: Max wait seconds (0to return immediately,1-30to wait)upscale: Upscale factor (0,2,3,4)resize: Resize mode (0none,1outer,3inner,4smart crop)resize_width,resize_height: Resize target dimensions in pixelscmyk2rgb: Convert CMYK to RGB (1yes,0no)keep_exif: Keep EXIF metadata (1keep,0remove)convertto: Conversion value (+webp,+avif,+webp|+avif,webp|avif,jpg,png,gif)bg_remove: Background removal (1, image URL, or#rrggbbxx)refresh: Force source refetch (1) or use cached optimized data (0)paramlist: Per-URL overrides array (must matchurlslength)returndatalist: Any array echoed back unchanged in response
Project layout
Naming conventions
Scripts
Source: README.md at commit a7e387d
Tools
0Version history
1- v0.3.0LatestSep 16, 2026
Score
75% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listedRequired15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.