{
  "markdown": "# @glassypic/mcp-server\n\n[![npm version](https://img.shields.io/npm/v/@glassypic/mcp-server.svg)](https://www.npmjs.com/package/@glassypic/mcp-server)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![MCP](https://img.shields.io/badge/MCP-Compatible-brightgreen.svg)](https://modelcontextprotocol.io)\n\nMCP server for [GlassyPic](https://glassypic.com). 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.\n\n## Quick Start\n\nAdd to your MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"glassypic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@glassypic/mcp-server@latest\"]\n    }\n  }\n}\n```\n\nNo signup required. Works out of the box with 20 free daily credits.\n\n> **Windows users:** If the server doesn't appear after editing a JSON config, your client likely can't resolve `npx` from PATH (a common, silent failure). Wrap the command with `cmd /c`:\n>\n> ```json\n> {\n>   \"mcpServers\": {\n>     \"glassypic\": {\n>       \"command\": \"cmd\",\n>       \"args\": [\"/c\", \"npx\", \"-y\", \"@glassypic/mcp-server@latest\"]\n>     }\n>   }\n> }\n> ```\n>\n> 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.\n\n### Client-Specific Setup\n\n<details>\n<summary><strong>Claude Desktop</strong></summary>\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"glassypic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@glassypic/mcp-server@latest\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Claude Code</strong></summary>\n\n```bash\nclaude mcp add glassypic -- npx -y @glassypic/mcp-server@latest\n```\n</details>\n\n<details>\n<summary><strong>Cursor</strong></summary>\n\nAdd to `.cursor/mcp.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"glassypic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@glassypic/mcp-server@latest\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Windsurf</strong></summary>\n\nEdit `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"glassypic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@glassypic/mcp-server@latest\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Smithery</strong></summary>\nInstall via Smithery: [![smithery badge](https://smithery.ai/badge/glassypic/mcp-server)](https://smithery.ai/servers/glassypic/mcp-server)\n</details>\n\n<details>\n<summary><strong>Cline</strong></summary>\n\nOpen Cline settings → MCP Servers → Add, then paste:\n\n```json\n{\n  \"mcpServers\": {\n    \"glassypic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@glassypic/mcp-server@latest\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Gemini CLI</strong></summary>\n\n```bash\ngemini mcp add --transport stdio glassypic npx -y @glassypic/mcp-server@latest\n```\n\nOr edit `~/.gemini/settings.json` (global) or `.gemini/settings.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"glassypic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@glassypic/mcp-server@latest\"]\n    }\n  }\n}\n```\n\nVerify it's running inside Gemini CLI with `/mcp list`.\n</details>\n\n<details>\n<summary><strong>OpenAI Codex CLI</strong></summary>\n\n```bash\ncodex mcp add glassypic -- npx -y @glassypic/mcp-server@latest\n```\n\nOr edit `~/.codex/config.toml` manually:\n\n```toml\n[mcp_servers.glassypic]\ncommand = \"npx\"\nargs = [\"-y\", \"@glassypic/mcp-server@latest\"]\n```\n</details>\n\n## Tool: `optimize_image`\n\nOne 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.\n\n### Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `input` | string | Yes | — | Absolute local file path or remote URL |\n| `output_path` | string | No | auto | File path or directory (ending in `/`). If omitted: saves next to original with SEO slug or `.glassypic` suffix |\n| `output_format` | string | No | original | `jpg`, `png`, `webp`, `avif`, `gif`, or `original` |\n| `output_width_px` | int | No | — | Target width in pixels |\n| `output_height_px` | int | No | — | Target height in pixels |\n| `output_upscale_factor` | int | No | — | AI upscale factor: `2` (2×) or `4` (4×) |\n| `output_resize_behavior` | string | No | pad | `pad` (white padding) or `crop` (smart crop). Only used when both width and height are set |\n| `output_seo_tag_gen` | bool | No | true | Generate SEO metadata and rename file to SEO slug. Costs 1 extra credit |\n| `output_file_size_limit` | int | No | — | Target maximum output file size in bytes. Server attempts to meet this via additional compression. Not guaranteed |\n| `gif_frame_limit` | int | No | 100 | Max frames to process for animated GIFs (1–100). Reduces credit cost by sampling fewer frames |\n| `confirm_gif_cost` | bool | No | — | Set to `true` to proceed after reviewing the animated GIF cost warning. Required for animated GIFs |\n\n### Resize Behavior\n\n| Dimensions provided | Behavior | `output_resize_behavior` |\n|---|---|---|\n| Width only | Proportional scale | N/A |\n| Height only | Proportional scale | N/A |\n| Width + Height | Exact dimensions, white padding | `pad` (default) |\n| Width + Height | Exact dimensions, smart crop | `crop` |\n\n### Examples\n\n**Basic compression** — just compress, keep format and dimensions:\n\n```json\n{ \"input\": \"/Users/me/photos/hero.png\" }\n```\n\n**Convert to WebP:**\n\n```json\n{ \"input\": \"/Users/me/hero.png\", \"output_format\": \"webp\" }\n```\n\n**Resize proportionally** — set one dimension, the other scales:\n\n```json\n{ \"input\": \"/Users/me/hero.png\", \"output_width_px\": 1200 }\n```\n\n**Exact dimensions with padding** — white bars fill the gap:\n\n```json\n{ \"input\": \"/Users/me/hero.png\", \"output_width_px\": 1080, \"output_height_px\": 1080 }\n```\n\n**Exact dimensions with smart crop:**\n\n```json\n{ \"input\": \"/Users/me/hero.png\", \"output_width_px\": 1080, \"output_height_px\": 1080, \"output_resize_behavior\": \"crop\" }\n```\n\n**AI upscale 4x:**\n\n```json\n{ \"input\": \"/Users/me/icon.png\", \"output_upscale_factor\": 4 }\n```\n\n**From URL, save to directory:**\n\n```json\n{ \"input\": \"https://example.com/photo.jpg\", \"output_path\": \"/Users/me/assets/\" }\n```\n\n**Skip SEO to save 1 credit:**\n\n```json\n{ \"input\": \"/Users/me/hero.png\", \"output_seo_tag_gen\": false }\n```\n\n### Output\n\nReturns a text summary and structured metadata:\n\n```\nOptimized: /Users/me/photos/modern-office-workspace.webp\nSize: 142.3 KB\nCompression: 73%\nFormat: webp\nDimensions: 1920x1080\nAlt text: Modern office workspace with laptop and coffee cup on wooden desk\n```\n\n**Structured output fields:**\n\n```json\n{\n  \"output_path\": \"/Users/me/photos/modern-office-workspace.webp\",\n  \"output_size_bytes\": 145715,\n  \"output_width_px\": 1920,\n  \"output_height_px\": 1080,\n  \"output_format\": \"webp\",\n  \"compression_ratio\": 0.27,\n  \"seo_alt_text\": \"Modern office workspace with laptop and coffee cup on wooden desk\",\n  \"seo_keywords\": [\"office\", \"workspace\", \"laptop\", \"desk\", \"modern\"],\n  \"seo_filename\": \"modern-office-workspace\"\n}\n```\n\n## Supported Formats\n\n| Format | Input | Output | Notes |\n|--------|-------|--------|-------|\n| JPG | Yes | Yes | |\n| PNG | Yes | Yes | |\n| WebP | Yes | Yes | |\n| AVIF | Yes | Yes | |\n| GIF | Yes | Yes | Animated GIFs preserved when output is GIF |\n| SVG | Yes | Yes | SVG→SVG optimized via SVGO; raster↔SVG conversion supported |\n| ICO | Yes | Yes | Smart rebuild: generates 16, 24, 32, 48, 256px favicon set |\n| HEIC/HEIF | Yes* | No | Auto-converted to JPG at upload |\n| TIFF | Yes* | No | Auto-converted to JPG at upload |\n| BMP | Yes* | No | Auto-converted to JPG at upload |\n\nGlassyPic supports high-quality conversion between any input and output format combination.\nConverting an animated GIF to a non-GIF format (JPG, PNG, WebP, AVIF) preserves only the first frame.\nConverting 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.\n\nMax upload file size: 50 MB.\n\n### SVG & ICO Examples\n\n```\n# Optimize an SVG file (keeps as vector)\nOptimize logo.svg and keep it as SVG\n\n# Convert SVG to raster\nConvert icon.svg to a 512x512 PNG\n\n# Trace raster to vector SVG\nConvert my logo.png to a vector SVG\n\n# Generate favicon set from any image\nConvert logo.png to an ICO favicon\n\n# Generate single-size ICO\nConvert logo.png to a 32x32 ICO\n\n# Extract largest icon from ICO\nConvert favicon.ico to PNG\n```\n\n## How It Works\n\n```\nLocal file or URL\n  → Upload to GlassyPic API\n    → Smart compression (lossy, typically 60-80% reduction)\n    → AI SEO tag generation (alt text, keywords, filename)\n    → Optional: resize, upscale, format conversion\n  → Download optimized file\n    → Save with SEO filename slug (or .glassypic suffix if SEO disabled)\n```\n\nAll processing happens server-side via the [GlassyPic API](https://api.glassypic.com). The MCP server is a thin client that orchestrates the pipeline.\n\n## Credits\n\n| | Guest | Free | Pro | Max |\n|---|---|---|---|---|\n| Credits/day or month | 20/day | 30/day | 3,300/month | 12,000/month |\n| Images/day (default settings) | ~5 | ~7 | ~825 | ~3,000 |\n| Cost per image | 4 credits (compress + SEO tags, defaults) | same | same | same |\n| Signup required | No | Free signup | Paid | Paid |\n\nSession data is stored locally at `~/.glassypic/session.json` and persists across invocations. \n\n### Automatic upscaling\n\nWhen a resize target exceeds the source image by more than 1.2×, GlassyPic\nautomatically runs an AI upscale before resizing, so enlargements ship sharp\ninstead of blurred. This happens without `output_upscale_factor` being set and\n**adds 2 credits**.\n\nA resize-only call therefore costs the same as a full pipeline when the source is\nsmaller than the target:\n\n| Call | Credits |\n|---|---|\n| Compress only, no SEO tags | 3 |\n| Compress + SEO tags (defaults) | 4 |\n| Resize down + SEO tags | 5 |\n| Resize up past 1.2× + SEO tags | 7 |\n| Compress + resize + explicit upscale + tags | 7 |\n| SVG or ICO output | 1 (flat, overrides the above) |\n\nAnimated GIFs are billed per frame — see the `confirm_gif_cost` parameter.\n\n## Account & Credits\n\nLog in to unlock more credits and share them across the web app and MCP server:\n\n```\nUse the login tool to sign in.\nUse the status tool to check your current credits.\nUse the upgrade tool to open the pricing page.\nUse the logout tool to sign out.\n```\n\n### login\n\nOpens 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.\n\n```\nLogin complete: user@example.com (Pro tier, 3,150 of 3,300 credits remaining)\n```\n\n### status\n\nCheck your current account status and credits before batch processing:\n\n```\nLogged in as user@example.com (Pro tier)\nCredits: 3,150 of 3,300 remaining\nResets: 03/01/2026, 12:00 AM PST\n```\n\n### logout\n\nRevokes the session and reverts to guest mode (20 credits/day).\n\n### upgrade\n\nOpens [glassypic.com/pricing](https://glassypic.com/pricing) in your browser.\n\n## Tips for AI Agents\n\nPaste this into your `CLAUDE.md` or system prompt to help agents use the tool effectively:\n\n```\n## GlassyPic MCP\n\nTools: optimize_image, login, logout, status, upgrade\n\n- Use status to check credits before batch processing\n- Credits: 3 to compress (always), +1 if width/height is set, +2 to upscale, +1 for SEO tags (default). A full pipeline is 7 credits. SVG/ICO output is a flat 1 credit.\n- Resizing up past 1.2x the source triggers an automatic AI upscale (+2 credits) even without output_upscale_factor set — a resize-only call on a small image can cost 7, not 5.\n- Guest: 20 credits/day. Free account: 30/day. Pro: 3,300/month.\n- Always use absolute file paths, not relative.\n- Set only width OR height for proportional resize. Set both for exact dimensions.\n- When both dimensions are set, use output_resize_behavior: \"crop\" for photos, \"pad\" for logos/icons.\n- output_seo_tag_gen (default true) renames the file to an SEO slug and generates alt text + keywords.\n- Set output_seo_tag_gen: false to save 1 credit when SEO metadata is not needed.\n- GIF is supported for both input and output; animated GIFs stay animated when output_format is \"gif\".\n- Converting an animated GIF to jpg/png/webp/avif preserves only the first frame.\n- HEIC, TIFF, BMP inputs are auto-converted to JPG.\n- For batch processing, call optimize_image once per file.\n- If credits run out, use login to sign in or upgrade to open pricing.\n```\n\n## Troubleshooting\n\n**Server not appearing in tool list:**\n- Restart your MCP client after editing the config\n- Ensure Node.js >= 18 is installed: `node --version`\n- Try running directly: `npx -y @glassypic/mcp-server@latest` (should start without errors)\n- **On Windows:** if the server silently never loads, wrap the command with `cmd /c` (`\"command\": \"cmd\"`, `\"args\": [\"/c\", \"npx\", \"-y\", \"@glassypic/mcp-server@latest\"]`) — see the Windows note under [Quick Start](#quick-start)\n\n**\"Insufficient credits\" error:**\n- Use the `status` tool to check remaining credits\n- Use the `login` tool to sign in for more credits (free accounts get 30/day)\n- Use the `upgrade` tool to open the pricing page and compare plans\n- Disable SEO tags (`output_seo_tag_gen: false`) to save 1 credit; note that resizing up past 1.2× the source still adds an automatic 2-credit upscale regardless\n\n**Login browser window doesn't open:**\n- Open this URL manually: `https://glassypic.com/mcp/authorize` and enter the code shown in the terminal\n- Ensure a browser is installed and accessible\n\n**Session token issues:**\n- Session data is stored at `~/.glassypic/session.json`\n- Delete this file to reset and start fresh\n- Use `logout` then `login` to re-authenticate\n\n**File not found:**\n- Use absolute paths for local files\n- For URLs, ensure the image is publicly accessible\n\n**Timeout errors:**\n- Large images or AI upscaling can take 30-60 seconds\n- The server has a 60-second timeout per job\n\n## Privacy Policy\n\nFull policy: **https://glassypic.com/privacy/**\n\n**What is transmitted.** Images you optimize are uploaded to the GlassyPic API\n(`https://api.glassypic.com`) for processing, along with your authentication\ntoken. Images are retained according to your account tier and then deleted —\nboth the original upload and the processed version. See the policy for the\nretention schedule.\n\nWhen 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.\n\n**What is stored locally.** When you use the `login` tool, your access token and\naccount email are written to `~/.glassypic/session.json` with file mode `0600`\n(owner read/write only). If you optimize an image *without* logging in, the\nfirst upload mints a guest session token, which is written to that same file\nso subsequent calls stay attached to the same guest session's credits — no\naccount, email, or personal information is attached to it. Running the\n`logout` tool removes the file's token. See also\n[Account & Credits](#account--credits) and [Troubleshooting](#troubleshooting).\n\n**What is not collected.** When run as a local connector, this server sends no\ntelemetry and makes no network call other than to the GlassyPic API. (The\nremote HTTP transport additionally calls Supabase for authentication.)\n\n## Configuration\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `GLASSYPIC_API_URL` | `https://api.glassypic.com` | API endpoint. Development and self-hosting only — most users never set it. |\n| `TINIFY_API_URL` | — | Pre-rename alias for the above. Retained for existing deployments; `GLASSYPIC_API_URL` wins when both are set. |\n\nThe value must be an `https` URL. Plain `http` is accepted only for `localhost`\nand `127.0.0.1`, because your images and `Bearer` token are sent to this host. An\ninvalid value produces a clear error naming the variable rather than a silent\nrequest to the wrong endpoint.\n\n## Requirements\n\n- Node.js >= 18\n- An MCP-compatible client (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, OpenAI Codex CLI, Gemini CLI, etc.)\n\n## License\n\nMIT - see [LICENSE](LICENSE).\n",
  "bytes": 16634,
  "sha": "7d64167df334a20d3916eab03051620c35b1acab5443caa1c4ad4a1da71a912c",
  "repo_slug": "onepunchtechnology/glassypic-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_onepunchtechnology_glassypic_d2f8d8ce/readme"
}