LLM-native image optimization MCP server
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
- !Licence file present but not machine-readable
/plugin marketplace add eralpozcan/vision-squeezer
/plugin install vision-squeezer3 items en este repositorio
Resumen de Plugins
<p align="center">
<img src="assets/logo.png" width="300" alt="VisionSqueezer Logo" />
</p>
# VisionSqueezer
<p align="center">
<a href="https://github.com/eralpozcan/vision-squeezer/actions"><img src="https://img.shields.io/github/actions/workflow/status/eralpozcan/vision-squeezer/ci.yml?label=build" alt="Build"></a>
<a href="https://crates.io/crates/vision-squeezer"><img src="https://img.shields.io/crates/v/vision-squeezer" alt="crates.io"></a>
<a href="https://www.npmjs.com/package/vision-squeezer"><img src="https://img.shields.io/npm/v/vision-squeezer" alt="npm"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Elastic--2.0-blue" alt="License"></a>
</p>
LLM-native image optimization middleware & MCP server. Reduces vision model token consumption by preprocessing images into tile-boundary-aligned, padding-free formats.
Works with **any agent or editor** that speaks MCP — Claude, GPT, Gemini, Codex, or your own.
---
## Install
### Interactive (recommended)
Picks the client, method, and scope for you:
```bash
npx vision-squeezer install
```
Prompts for:
- Target — Claude Code / Codex CLI / Qwen Code / OpenCode / Gemini CLI / Kimi CLI / Cursor / Windsurf / Claude Desktop / VS Code
- Install method (Claude Code only) — `plugin` (bundles MCP + stats/doctor/upgrade skills) or `mcp-add` (server only)
- Install scope (`mcp-add` only) — `user` (all projects, recommended), `local` (this project only), `project` (share via `.mcp.json`)
Scripted setups pass the choices directly:
```bash
npx vision-squeezer install --client claude --method plugin --yes
npx vision-squeezer install --client claude --method mcp-add --scope user --yes
npx vision-squeezer install --client cursor --yes
npx vision-squeezer install --client vscode --yes
```
Editors without a CLI (Cursor, Windsurf, Claude Desktop) get one entry merged into their JSON config; existing servers are kept and a file that cannot be parsed is left untouched.
### Claude Code — plugin marketplace (one-liner, bundles skills)
```
/plugin marketplace add eralpozcan/vision-squeezer
/plugin install vision-squeezer-mcp@vision-squeezer
```
Installs the MCP server *and* `/vision-stats`, `/vision-doctor`, `/vision-upgrade` skills as a single Claude Code plugin. Restart open Claude Code sessions for the MCP server to attach.
### Claude Code — `mcp add` (server only)
```bash
# All projects on this machine (recommended)
claude mcp add --scope user vision-squeezer -- npx -y vision-squeezer
# This project only (Claude Code's default)
claude mcp add vision-squeezer -- npx -y vision-squeezer
# Share with the team via .mcp.json in the repo
claude mcp add --scope project vision-squeezer -- npx -y vision-squeezer
```
### Claude Desktop
```bash
npx vision-squeezer install --client claude-desktop --yes
```
Or add to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\\Claude\\`):
```json
{
"mcpServers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
### Cursor
```bash
npx vision-squeezer install --client cursor --yes
```
Or add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):
```json
{
"mcpServers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
<details>
<summary><b>Click here to view installation instructions for 10+ other IDEs and Agents (VS Code, JetBrains, Windsurf, Zed, etc.)</b></summary>
### VS Code Copilot
```bash
code --add-mcp '{"name":"vision-squeezer","command":"npx","args":["-y","vision-squeezer"]}'
```
Or add to `.vscode/mcp.json`:
```json
{
"servers": {
"vision-squeezer": {
"type": "stdio",
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
### JetBrains (IntelliJ, WebStorm, PyCharm)
Open **Tools → GitHub Copilot → Model Context Protocol (MCP) → Configure**, then add:
```json
{
"servers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
### Windsurf
```bash
npx vision-squeezer install --client windsurf --yes
```
Or add to `~/.codeium/windsurf/mcp_config.json`:
```json
{
"mcpServers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
### Gemini CLI
```bash
gemini mcp add --scope user vision-squeezer -- npx -y vision-squeezer
```
Or add to `~/.gemini/settings.json` (user) / `.gemini/settings.json` (project):
```json
{
"mcpServers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
### Codex CLI
```bash
codex mcp add vision-squeezer -- npx -y vision-squeezer
```
Or add to `~/.codex/config.toml`:
```toml
[mcp_servers.vision-squeezer]
command = "npx"
args = ["-y", "vision-squeezer"]
```
### Qwen Code
```bash
qwen mcp add vision-squeezer -- npx -y vision-squeezer
```
### OpenCode
`opencode mcp add` is interactive-only, so add directly to `~/.config/opencode/opencode.json` (global) or `opencode.json` in the repo root (project):
```json
{
"mcp": {
"vision-squeezer": {
"type": "local",
"command": ["npx", "-y", "vision-squeezer"],
"enabled": true
}
}
}
```
### Kimi CLI
```bash
kimi mcp add vision-squeezer -- npx -y vision-squeezer
```
### Zed
Add to `~/.config/zed/settings.json`:
```json
{
"context_servers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
### Kiro
Add to `.kiro/settings/mcp.json` (workspace) or `~/.kiro/settings/mcp.json` (global):
```json
{
"mcpServers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
### Antigravity
MCP-only, no hooks needed. Configure via the Antigravity MCP settings:
```json
{
"mcpServers": {
"vision-squeezer": {
"command": "npx",
"args": ["-y", "vision-squeezer"]
}
}
}
```
</details>
### Manual install (Rust binary)
```bash
# From crates.io
cargo install vision-squeezer
# Or from source
git clone https://github.com/eralpozcan/vision-squeezer && cd vision-squeezer
make install # builds → ~/.local/bin/
```
Then use the binary path directly in any config above instead of `npx`:
```json
{ "command": "vision-squeezer-mcp" }
```
> **Tip:** Run `npx -y vision-squeezer --setup` to print ready configs with auto-detected paths.
---
## CLI Usage
```bash
vision-squeezer path/to/image.jpg \
--mode auto|ocr|standard \ # default: auto (= standard, keeps colour; ocr is opt-in)
--format jpeg|webp|avif \ # default: jpeg
--quality 85 \ # output quality 1-100 (default: 75)
--tile-size 256 \ # patch size in px (default: 512)
--no-crop \ # disable padding removal
--smart-crop \ # edge-energy crop (vs corner-tolerance)
--auto-quality 0.95 \ # binary-search quality to hit SSIM target
--bg-tolerance 25 \ # background detection 0-255 (default: 15)
--model <provider-alias> \ # model-aware resizing; see the model catalog
--max-tokens 1600 \ # token budget: downscale until the output fits (0 = off; MCP default 1600)
--max-tiles 20 \ # hard cap on tile count (model-specific unit)
--json \ # machine-readable JSON output
--dry-run # run pipeline, skip disk write
```
### Batch mode
Pass a directory instead of a file:
```bash
vision-squeezer ./screenshots --recursive --output-dir ./optimized
vision-squeezer ./screenshots --recursive --json > report.json
```
---
<details>
<summary><b>The Math: How Vision Models Bill You in 2026</b></summary>
If you send raw images to an LLM, you are leaking tokens. Modern vision models do not care about your file size (MB/KB); they only care about **pixel dimensions**, but each provider calculates costs completely differently. `vision-squeezer` simulates these algorithms to find the mathematical minimum size that drops your token usage without losing visual context.
### 1. OpenAI GPT-6 / GPT-5.6 (32px Patches)
Current OpenAI vision models count **32×32 patches**, fit high-detail images within a 2048px edge and 2500-patch budget, then apply a 1.2 multiplier.
* **The Fix:** `--model gpt6` removes padding, fits the patch budget, and avoids partially used edge patches. A 1024×1024 input is 1024 patches / 1229 tokens.
### 2. Claude 4.7+ (28px Patches)
Claude counts `ceil(Width/28) × ceil(Height/28)` visual tokens. Claude 4.7+ high-resolution vision uses a 2576px edge and 4784-token budget; `claude-standard` covers the earlier 1568px / 1568-token tier.
* **The Fix:** Strip padding, fit the selected tier, and align dimensions to the 28px grid.
### 3. Gemini 3 (Large Tiles)
Gemini uses a massive **768×768 tile** system (if the image is > 384px). Each tile is a flat 258 tokens.
* **The Fix:** An 800×600 image triggers a 2×1 tile grid (516 tokens). `vision-squeezer` snaps it down slightly to fit exactly inside a 768×768 box, dropping the cost to 258 tokens (**50% savings**).
### 4. Llama 3.2 / 3.3 Vision (560px Tiles)
Meta's Mllama vision tiles images on a **560×560** grid, capped at 4 tiles (~1601 tokens each).
* **The Fix:** A 2400×1670 screenshot trimmed to 2400×1200 drops from a 2×2 to a 2×1 canvas: **6,404 → 3,202 tokens (−50%)**. (Llama 4 uses a different vision encoder and is not modeled.)
### 5. Qwen2-VL / 2.5-VL / 3-VL (28px Patch Grid)
Alibaba's Qwen-VL uses a **28px effective grid** (14px patch × 2×2 merge); `tokens = (W/28)·(H/28)` bounded to `[4, 16384]`.
* **The Fix:** The patch is small, so area is the lever — a 1024×1024 image with its border stripped to 896×896 drops **1,369 → 1,024 tokens (−25%)**.
### 6. DeepSeek Flash / DeepSeek-VL2
DeepSeek Flash now accepts images through its OpenAI-compatible API and documents an upper bound of **384 image tokens per image**. Use `-Lo que la gente pregunta sobre vision-squeezer
¿Qué es eralpozcan/vision-squeezer?
+
eralpozcan/vision-squeezer es plugins para el ecosistema de Claude AI. LLM-native image optimization MCP server Tiene 2 estrellas en GitHub y su última actualización registrada es del 2026-09-30.
¿Cómo se instala vision-squeezer?
+
Puedes instalar vision-squeezer clonando el repositorio (https://github.com/eralpozcan/vision-squeezer) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar eralpozcan/vision-squeezer?
+
Nuestro agente de seguridad ha analizado eralpozcan/vision-squeezer y le ha asignado un Trust Score de 80/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene eralpozcan/vision-squeezer?
+
eralpozcan/vision-squeezer es mantenido por eralpozcan. La última actividad registrada en GitHub es del 2026-09-30, con 1 issues abiertos.
¿Hay alternativas a vision-squeezer?
+
Sí. En ClaudeWave puedes explorar plugins similares en /categories/plugins, ordenados por popularidad o actividad reciente.
Despliega vision-squeezer en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/eralpozcan-vision-squeezer)<a href="https://claudewave.com/repo/eralpozcan-vision-squeezer"><img src="https://claudewave.com/api/badge/eralpozcan-vision-squeezer" alt="Featured on ClaudeWave: eralpozcan/vision-squeezer" width="320" height="64" /></a>Más Plugins
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Write HTML. Render video. Built for agents.
Agent skill that removes signs of AI-generated writing from text
Academic Research Skills for Claude Code: research → write → review → revise → finalize
Create beautiful slides on the web using a coding agent's frontend skills