Glassypic

io.github.onepunchtechnology由 GitHub 账号 onepunchtechnology 发布v2.1.3更新于 Nov 6, 2026

Production-ready images in one pass: resize, crop, compress, convert format, upscale, tag for SEO

已验证Streamable HTTP可网页运行开发者工具媒体与设计

概览

AI 生成的概览

GlassyPic 通过托管 API 优化网页图片:压缩、缩放、放大、格式转换并生成 SEO 元数据。

可以做什么
  • 优化图片:压缩、缩放或裁剪、2 倍或 4 倍放大、转换格式,并生成 SEO 文件名、替代文本和关键词
  • 处理本地绝对路径文件或远程图片链接,可指定输出路径、格式和目标文件大小
  • 支持 JPG、PNG、WebP、AVIF、GIF、SVG、ICO、HEIC、TIFF、BMP 等多种格式
  • 查询账户状态:登录情况、套餐等级、剩余额度和重置时间
  • 打开定价页面,供用户查看或更改套餐
适用场景
适合在准备网站或应用素材时,让助手一步完成图片压缩、缩放、格式转换、放大并生成 SEO 元数据,也可批量处理多个文件。
运行要求
可作为本地 npm 包通过 npx 运行,需要 Node.js 18 或更高版本,也可连接远程 HTTP 端点。无需注册,访客每天有 20 个免费额度;登录后额度与网页版共享。自托管时可设置 GLASSYPIC_API_URL。需要能访问 GlassyPic API 的网络。
安装前请注意
图片会上传到 GlassyPic API 处理;传入远程链接时由 GlassyPic 服务器抓取,该链接会一并发送。处理会消耗额度,SEO 标记、缩放和放大各自额外计费,放大超过原图 1.2 倍会自动触发付费放大。会话令牌和账户邮箱会保存在本地会话文件中。输出文件会写入磁盘,可能覆盖指定路径。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Glassypic,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.onepunchtechnology%2Fglassypic/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "glassypic": {
      "type": "http",
      "url": "https://app.glassypic.com/mcp"
    }
  }
}

README

@glassypic/mcp-server

[npm version] [License: MIT] [MCP]

MCP server for GlassyPic. One tool that turns raw images into production-ready assets: upscaling, resizing and cropping, compression, file format conversion, and SEO filename and alt text generation. Describe the outcome you want in natural language.

Quick Start

Add to your MCP client config:

json
{  "mcpServers": {    "glassypic": {      "command": "npx",      "args": ["-y", "@glassypic/mcp-server@latest"]    }  }}

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 npx from PATH (a common, silent failure). Wrap the command with cmd /c:

json
{  "mcpServers": {    "glassypic": {      "command": "cmd",      "args": ["/c", "npx", "-y", "@glassypic/mcp-server@latest"]    }  }}

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.

Client-Specific Setup

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "glassypic": {      "command": "npx",      "args": ["-y", "@glassypic/mcp-server@latest"]    }  }}
Claude Code
bash
claude mcp add glassypic -- npx -y @glassypic/mcp-server@latest
Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "glassypic": {      "command": "npx",      "args": ["-y", "@glassypic/mcp-server@latest"]    }  }}
Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "glassypic": {      "command": "npx",      "args": ["-y", "@glassypic/mcp-server@latest"]    }  }}
Smithery Install via Smithery: [![smithery badge](https://smithery.ai/badge/glassypic/mcp-server)](https://smithery.ai/servers/glassypic/mcp-server)
Cline

Open Cline settings → MCP Servers → Add, then paste:

json
{  "mcpServers": {    "glassypic": {      "command": "npx",      "args": ["-y", "@glassypic/mcp-server@latest"]    }  }}
Gemini CLI
bash
gemini mcp add --transport stdio glassypic npx -y @glassypic/mcp-server@latest

Or edit ~/.gemini/settings.json (global) or .gemini/settings.json in your project root:

json
{  "mcpServers": {    "glassypic": {      "command": "npx",      "args": ["-y", "@glassypic/mcp-server@latest"]    }  }}

Verify it's running inside Gemini CLI with /mcp list.

OpenAI Codex CLI
bash
codex mcp add glassypic -- npx -y @glassypic/mcp-server@latest

Or edit ~/.codex/config.toml manually:

toml
[mcp_servers.glassypic]command = "npx"args = ["-y", "@glassypic/mcp-server@latest"]

Tool: optimize_image

One tool that turns a supplied image into a production-ready asset through a fixed server-side pipeline (typically 60-80% size reduction), with optional resize, upscale, format conversion, and SEO metadata generation. Inputs include JPEG, PNG, WebP, AVIF, GIF, SVG, ICO, HEIC, TIFF, and BMP. Outputs are JPEG, PNG, WebP, AVIF, GIF, SVG, and ICO. Accepts absolute local file paths or remote URLs.

Parameters

ParameterTypeRequiredDefaultDescription
inputstringYes—Absolute local file path or remote URL
output_pathstringNoautoFile path or directory (ending in /). If omitted: saves next to the original, using the SEO slug when one is generated, otherwise a .polished suffix
output_formatstringNooriginaljpg, png, webp, avif, gif, svg, ico, or original
output_width_pxintNo—Target width in pixels
output_height_pxintNo—Target height in pixels
output_upscale_factorintNo—AI upscale factor: 2 (2×) or 4 (4×)
output_resize_behaviorstringNopadpad (white padding) or crop (smart crop). Only used when both width and height are set
output_seo_tag_genboolNotrueGenerate SEO metadata and rename file to SEO slug. Costs 1 extra credit
output_file_size_limitintNo—Target maximum output file size in bytes. Server attempts to meet this via additional compression. Not guaranteed
gif_frame_limitintNo100Max frames to process for animated GIFs (1–100). Reduces credit cost by sampling fewer frames
confirm_gif_costboolNo—Set to true to proceed after reviewing the animated GIF cost warning. Required for animated GIFs

Resize Behavior

Dimensions providedBehavioroutput_resize_behavior
Width onlyProportional scaleN/A
Height onlyProportional scaleN/A
Width + HeightExact dimensions, white paddingpad (default)
Width + HeightExact dimensions, smart cropcrop

Examples

Basic compression — just compress, keep format and dimensions:

json
{ "input": "/Users/me/photos/hero.png" }

Convert to WebP:

json
{ "input": "/Users/me/hero.png", "output_format": "webp" }

Resize proportionally — set one dimension, the other scales:

json
{ "input": "/Users/me/hero.png", "output_width_px": 1200 }

Exact dimensions with padding — white bars fill the gap:

json
{ "input": "/Users/me/hero.png", "output_width_px": 1080, "output_height_px": 1080 }

Exact dimensions with smart crop:

json
{ "input": "/Users/me/hero.png", "output_width_px": 1080, "output_height_px": 1080, "output_resize_behavior": "crop" }

AI upscale 4x:

json
{ "input": "/Users/me/icon.png", "output_upscale_factor": 4 }

From URL, save to directory:

json
{ "input": "https://example.com/photo.jpg", "output_path": "/Users/me/assets/" }

Skip SEO to save 1 credit:

json
{ "input": "/Users/me/hero.png", "output_seo_tag_gen": false }

Output

Returns a text summary and structured metadata:

Optimized: /Users/me/photos/modern-office-workspace.webpSize: 142.3 KBCompression: 73%Format: webpDimensions: 1920x1080Alt text: Modern office workspace with laptop and coffee cup on wooden desk

Structured output fields:

json
{  "output_path": "/Users/me/photos/modern-office-workspace.webp",  "output_size_bytes": 145715,  "output_width_px": 1920,  "output_height_px": 1080,  "output_format": "webp",  "compression_ratio": 0.27,  "seo_alt_text": "Modern office workspace with laptop and coffee cup on wooden desk",  "seo_keywords": ["office", "workspace", "laptop", "desk", "modern"],  "seo_filename": "modern-office-workspace"}

Supported Formats

FormatInputOutputNotes
JPGYesYes
PNGYesYes
WebPYesYes
AVIFYesYes
GIFYesYesAnimated GIFs preserved when output is GIF
SVGYesYesSVG→SVG optimized via SVGO; raster↔SVG conversion supported
ICOYesYesSmart rebuild: generates 16, 24, 32, 48, 256px favicon set
HEIC/HEIFYes*NoAuto-converted to JPG at upload
TIFFYes*NoAuto-converted to JPG at upload
BMPYes*NoAuto-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.

SVG & ICO Examples

# Optimize an SVG file (keeps as vector)Optimize logo.svg and keep it as SVG
# Convert SVG to rasterConvert icon.svg to a 512x512 PNG
# Trace raster to vector SVGConvert my logo.png to a vector SVG
# Generate favicon set from any imageConvert logo.png to an ICO favicon
# Generate single-size ICOConvert logo.png to a 32x32 ICO
# Extract largest icon from ICOConvert favicon.ico to PNG

How It Works

Local file or URL  → Upload to GlassyPic API    → Optional AI upscale (explicit, or automatic when a resize target exceeds the source by more than 1.2×)    → Optional resize    → Compression    → Optional SEO metadata  → Download optimized file    → Save with the SEO filename slug, or a `.polished` suffix when SEO is off or returns no slug

All processing happens server-side via the GlassyPic API. The MCP server is a thin client that orchestrates the pipeline.

Credits

Guests can use the tool with no signup. Logging in links your GlassyPic account and shares its credits with the web app. Allowances differ by plan and change over time: run the status tool for your live balance, or see glassypic.com/pricing for plans. A default run (compress + SEO tags) costs 4 credits per image.

Session data is stored locally at ~/.glassypic/session.json and persists across invocations.

Automatic upscaling

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:

CallCredits
Compress only, no SEO tags3
Compress + SEO tags (defaults)4
Resize down + SEO tags5
Resize up past 1.2× + SEO tags7
Compress + resize + explicit upscale + tags7
SVG or ICO output1 (flat, overrides the above)

Animated GIFs are billed per frame — see the confirm_gif_cost parameter.

Account & Credits

Log in to unlock more credits and share them across the web app and MCP server:

Use the login tool to sign in.Use the status tool to check your current credits.Use the upgrade tool to open the pricing page.Use the logout tool to sign out.

login

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.

Login complete: [email protected] (Pro tier, 3,150 of 3,300 credits remaining)

status

Check your current account status and credits before batch processing:

Logged in as [email protected] (Pro tier)Credits: 3,150 of 3,300 remainingResets: 03/01/2026, 12:00 AM PST

logout

Revokes the session and reverts to guest mode.

upgrade

Opens glassypic.com/pricing in your browser.

Tips for AI Agents

Paste this into your CLAUDE.md or system prompt to help agents use the tool effectively:

## GlassyPic MCP
Tools: optimize_image, login, logout, status, upgrade
- Use status to check credits before batch processing- 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.- 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.- Allowances vary by plan; call status for the live balance instead of assuming a number.- Always use absolute file paths, not relative.- Set only width OR height for proportional resize. Set both for exact dimensions.- When both dimensions are set, use output_resize_behavior: "crop" for photos, "pad" for logos/icons.- output_seo_tag_gen (default true) renames the file to an SEO slug and generates alt text + keywords.- Set output_seo_tag_gen: false to save 1 credit when SEO metadata is not needed.- GIF is supported for both input and output; animated GIFs stay animated when output_format is "gif".- Converting an animated GIF to jpg/png/webp/avif preserves only the first frame.- HEIC, TIFF, BMP inputs are auto-converted to JPG.- For batch processing, call optimize_image once per file.- If credits run out, use login to sign in or upgrade to open pricing.

Troubleshooting

Server not appearing in tool list:

  • Restart your MCP client after editing the config
  • Ensure Node.js >= 18 is installed: node --version
  • Try running directly: npx -y @glassypic/mcp-server@latest (should start without errors)
  • 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

"Insufficient credits" error:

  • Use the status tool to check remaining credits
  • Use the login tool to sign in for more credits
  • Use the upgrade tool to open the pricing page and compare plans
  • 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

Login browser window doesn't open:

  • Open this URL manually: https://glassypic.com/mcp/authorize and enter the code shown in the terminal
  • Ensure a browser is installed and accessible

Session token issues:

  • Session data is stored at ~/.glassypic/session.json
  • Delete this file to reset and start fresh
  • Use logout then login to re-authenticate

File not found:

  • Use absolute paths for local files
  • For URLs, ensure the image is publicly accessible

Timeout errors:

  • Large images or AI upscaling can take 30-60 seconds
  • The server has a 60-second timeout per job

Privacy Policy

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.)

Configuration

VariableDefaultPurpose
GLASSYPIC_API_URLhttps://api.glassypic.comAPI endpoint. Development and self-hosting only — most users never set it.

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.

Requirements

  • Node.js >= 18
  • An MCP-compatible client (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, OpenAI Codex CLI, Gemini CLI, etc.)

Security

Report vulnerabilities privately. See SECURITY.md. Do not file a public issue for an unfixed security report.

License

MIT - see LICENSE.

来源:README.md,提交 3d43a2e

工具

3

optimize_image

Optimize Image

Optimize an image: smart lossy compression (typically 60-80% size reduction), optional resize/upscale/format conversion, and AI-generated SEO metadata. Accepts absolute local file paths or remote URLs. In remote/API mode, only remote URLs are supported. Supported input formats: JPG, PNG, WebP, AVIF, GIF, SVG, ICO, HEIC, TIFF, BMP (max 50 MB). Supported output formats: JPG, PNG, WebP, AVIF, GIF, SVG, ICO. Credits: 3 to compress (always), +1 if width or height is set, +2 to upscale, +1 for SEO tags (on by default). A full pipeline is 7 credits. Upscale is charged whether you request it or the server adds it automatically — it does so whenever a resize target exceeds the source by more than 1.2x, so a resize-only call on a small image also costs 7. SVG or ICO output is a flat 1 credit, overriding everything above. Animated GIFs are billed per frame: (per-frame operations x frames) + 1 if tags, up to 601 credits at the 100-frame limit — confirm_gif_cost gates that path. GIFs are excluded from automatic upscaling. Works as a guest with no signup. Log in with the login tool for more credits. Use status tool to check remaining credits before batch processing.

输入参数input必填output_pathoutput_formatgif_frame_limitoutput_width_pxconfirm_gif_costoutput_height_px_gif_temp_file_idoutput_seo_tag_genoutput_upscale_factoroutput_file_size_limitoutput_resize_behavior

status

Account Status

Check your GlassyPic account status: login state, tier, credits remaining, and credit reset time. Use this before batch processing to verify sufficient credits.

无需输入参数。

upgrade

Open Pricing Page

Open the GlassyPic pricing page in the user's browser, where the account's plan can be reviewed and changed. Call this only when the user asks to change or review their plan.

无需输入参数。

版本历史

3
  1. v2.1.3最新Oct 16, 2026
  2. v2.1.2Oct 1, 2026
  3. v2.0.2Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分