The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Glassypic listing page.
MCP server for GlassyPic. One tool that turns raw images into production-ready assets. Support upscaling, resizing/cropping, compression, file format conversion, and SEO filename & alt text generation. Just describe the outcome you want in natrual language.
Add to your MCP client config:
No signup required. Works out of the box with 20 free daily credits.
Windows users: If the server doesn't appear after editing a JSON config, your client likely can't resolve
npxfrom PATH (a common, silent failure). Wrap the command withcmd /c:This applies to the hand-edited JSON configs below (Claude Desktop, Cursor, Windsurf, Cline). The CLI commands (Claude Code, Gemini CLI, Codex CLI) are unaffected.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Add to .cursor/mcp.json in your project root:
Edit ~/.codeium/windsurf/mcp_config.json:
Open Cline settings → MCP Servers → Add, then paste:
Or edit ~/.gemini/settings.json (global) or .gemini/settings.json in your project root:
Verify it's running inside Gemini CLI with /mcp list.
Or edit ~/.codex/config.toml manually:
optimize_imageOne tool that turns raw images into production-ready assets using AI-powered algorithm and multi-step agents (typically 60-80% size reduction), with optional resize, upscale, format conversion, and SEO metadata generation. Supports JPEG, PNG, WebP, HEIC, GIF, AVIF, TIFF, and BMP. Accepts absolute local file paths or remote URLs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
input | string | Yes | — | Absolute local file path or remote URL |
output_path | string | No | auto | File path or directory (ending in /). If omitted: saves next to original with SEO slug or .glassypic suffix |
output_format | string | No | original | jpg, png, webp, avif, gif, or original |
output_width_px | int | No | — | Target width in pixels |
output_height_px | int | No | — | Target height in pixels |
output_upscale_factor | int | No | — | AI upscale factor: 2 (2×) or 4 (4×) |
output_resize_behavior | string | No | pad | pad (white padding) or crop (smart crop). Only used when both width and height are set |
output_seo_tag_gen | bool | No | true | Generate SEO metadata and rename file to SEO slug. Costs 1 extra credit |
output_file_size_limit | int | No | — | Target maximum output file size in bytes. Server attempts to meet this via additional compression. Not guaranteed |
gif_frame_limit | int | No | 100 | Max frames to process for animated GIFs (1–100). Reduces credit cost by sampling fewer frames |
confirm_gif_cost | bool | No | — | Set to true to proceed after reviewing the animated GIF cost warning. Required for animated GIFs |
| Dimensions provided | Behavior | output_resize_behavior |
|---|---|---|
| Width only | Proportional scale | N/A |
| Height only | Proportional scale | N/A |
| Width + Height | Exact dimensions, white padding | pad (default) |
| Width + Height | Exact dimensions, smart crop | crop |
Basic compression — just compress, keep format and dimensions:
Convert to WebP:
Resize proportionally — set one dimension, the other scales:
Exact dimensions with padding — white bars fill the gap:
Exact dimensions with smart crop:
AI upscale 4x:
From URL, save to directory:
Skip SEO to save 1 credit:
Returns a text summary and structured metadata:
Structured output fields:
| Format | Input | Output | Notes |
|---|---|---|---|
| JPG | Yes | Yes | |
| PNG | Yes | Yes | |
| WebP | Yes | Yes | |
| AVIF | Yes | Yes | |
| GIF | Yes | Yes | Animated GIFs preserved when output is GIF |
| SVG | Yes | Yes | SVG→SVG optimized via SVGO; raster↔SVG conversion supported |
| ICO | Yes | Yes | Smart rebuild: generates 16, 24, 32, 48, 256px favicon set |
| HEIC/HEIF | Yes* | No | Auto-converted to JPG at upload |
| TIFF | Yes* | No | Auto-converted to JPG at upload |
| BMP | Yes* | No | Auto-converted to JPG at upload |
GlassyPic supports high-quality conversion between any input and output format combination. Converting an animated GIF to a non-GIF format (JPG, PNG, WebP, AVIF) preserves only the first frame. Converting an animated GIF to a GIF format supports upscaling/resizing while preserving the animation and quality. You may also reduce animated GIF file size by decreasing the number of output frames.
Max upload file size: 50 MB.
All processing happens server-side via the GlassyPic API. The MCP server is a thin client that orchestrates the pipeline.
| Guest | Free | Pro | Max | |
|---|---|---|---|---|
| Credits/day or month | 20/day | 30/day | 3,300/month | 12,000/month |
| Images/day (default settings) | ~5 | ~7 | ~825 | ~3,000 |
| Cost per image | 4 credits (compress + SEO tags, defaults) | same | same | same |
| Signup required | No | Free signup | Paid | Paid |
Session data is stored locally at ~/.glassypic/session.json and persists across invocations.
When a resize target exceeds the source image by more than 1.2×, GlassyPic
automatically runs an AI upscale before resizing, so enlargements ship sharp
instead of blurred. This happens without output_upscale_factor being set and
adds 2 credits.
A resize-only call therefore costs the same as a full pipeline when the source is smaller than the target:
| Call | Credits |
|---|---|
| Compress only, no SEO tags | 3 |
| Compress + SEO tags (defaults) | 4 |
| Resize down + SEO tags | 5 |
| Resize up past 1.2× + SEO tags | 7 |
| Compress + resize + explicit upscale + tags | 7 |
| SVG or ICO output | 1 (flat, overrides the above) |
Animated GIFs are billed per frame — see the confirm_gif_cost parameter.
Log in to unlock more credits and share them across the web app and MCP server:
Opens a browser window to complete login (Google, Facebook, or email/magic link). After approval, your account is linked and credits are shared with the web app.
Check your current account status and credits before batch processing:
Revokes the session and reverts to guest mode (20 credits/day).
Opens glassypic.com/pricing in your browser.
Paste this into your CLAUDE.md or system prompt to help agents use the tool effectively:
Server not appearing in tool list:
node --versionnpx -y @glassypic/mcp-server@latest (should start without errors)cmd /c ("command": "cmd", "args": ["/c", "npx", "-y", "@glassypic/mcp-server@latest"]) — see the Windows note under Quick Start"Insufficient credits" error:
status tool to check remaining creditslogin tool to sign in for more credits (free accounts get 30/day)upgrade tool to open the pricing page and compare plansoutput_seo_tag_gen: false) to save 1 credit; note that resizing up past 1.2× the source still adds an automatic 2-credit upscale regardlessLogin browser window doesn't open:
https://glassypic.com/mcp/authorize and enter the code shown in the terminalSession token issues:
~/.glassypic/session.jsonlogout then login to re-authenticateFile not found:
Timeout errors:
Full policy: https://glassypic.com/privacy/
What is transmitted. Images you optimize are uploaded to the GlassyPic API
(https://api.glassypic.com) for processing, along with your authentication
token. Images are retained according to your account tier and then deleted —
both the original upload and the processed version. See the policy for the
retention schedule.
When you pass a remote URL to the tool, the GlassyPic API fetches it server-side; the URL itself is sent to GlassyPic, and the request to the image host originates from GlassyPic's servers rather than from your machine.
What is stored locally. When you use the login tool, your access token and
account email are written to ~/.glassypic/session.json with file mode 0600
(owner read/write only). If you optimize an image without logging in, the
first upload mints a guest session token, which is written to that same file
so subsequent calls stay attached to the same guest session's credits — no
account, email, or personal information is attached to it. Running the
logout tool removes the file's token. See also
Account & Credits and Troubleshooting.
What is not collected. When run as a local connector, this server sends no telemetry and makes no network call other than to the GlassyPic API. (The remote HTTP transport additionally calls Supabase for authentication.)
| Variable | Default | Purpose |
|---|---|---|
GLASSYPIC_API_URL | https://api.glassypic.com | API endpoint. Development and self-hosting only — most users never set it. |
TINIFY_API_URL | — | Pre-rename alias for the above. Retained for existing deployments; GLASSYPIC_API_URL wins when both are set. |
The value must be an https URL. Plain http is accepted only for localhost
and 127.0.0.1, because your images and Bearer token are sent to this host. An
invalid value produces a clear error naming the variable rather than a silent
request to the wrong endpoint.
MIT - see LICENSE.