Cut vision API token costs by snapping images to tile boundaries. Claude, GPT-4o, GPT-5, Gemini.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
Picks the client, method, and scope for you:
Prompts for:
plugin (bundles MCP + stats/doctor/upgrade skills) or mcp-add (server only)mcp-add only) β user (all projects, recommended), local (this project only), project (share via .mcp.json)Scripted setups pass the choices directly:
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.
mcp add (server only)Add to ~/.config/claude/claude_desktop_config.json:
Or add to .cursor/mcp.json:
Add to .vscode/mcp.json:
Open Tools β GitHub Copilot β Model Context Protocol (MCP) β Configure, then add:
Add to ~/.codeium/windsurf/mcp_config.json:
Or add to ~/.gemini/settings.json (user) / .gemini/settings.json (project):
Or add to ~/.codex/config.toml:
opencode mcp add is interactive-only, so add directly to ~/.config/opencode/opencode.json (global) or opencode.json in the repo root (project):
Add to ~/.config/zed/settings.json:
Add to .kiro/settings/mcp.json (workspace) or ~/.kiro/settings/mcp.json (global):
MCP-only, no hooks needed. Configure via the Antigravity MCP settings:
Then use the binary path directly in any config above instead of npx:
Tip: Run
npx -y vision-squeezer --setupto print ready configs with auto-detected paths.
Pass a directory instead of a file:
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.
As of 2026 (Claude 3.5 / 4.5+), Anthropic uses an area-based formula: Tokens β (Width Γ Height) / 750.
Every single pixel of solid background or padding costs you tokens.
vision-squeezer aggressively crops padding (removing solid color borders). A 1025Γ1025 screenshot shrinks just enough to drop from 1,400 tokens to 1,024 tokens (%26 savings).OpenAI scales your image to fit inside a 2048px box, then rescales it again so the shortest side is exactly 768px. Finally, it chops the image into a grid of 512Γ512 tiles. Each tile costs 170 tokens.
vision-squeezer simulates this exact math and snaps the image down by a few pixels so it fits perfectly into the minimum number of tiles.Gemini uses a massive 768Γ768 tile system (if the image is > 384px). Each tile is a flat 258 tokens.
vision-squeezer snaps it down slightly to fit exactly inside a 768Γ768 box, dropping the cost to 258 tokens (%75 savings).Meta's Mllama vision tiles images on a 560Γ560 grid, capped at 4 tiles (~1601 tokens each).
Alibaba's Qwen-VL uses a 28px effective grid (14px patch Γ 2Γ2 merge); tokens = (W/28)Β·(H/28) bounded to [4, 16384].
SigLIP-384 + 2Γ pixel-shuffle gives 196 tokens/tile on a (mΒ·384, nΒ·384) canvas (mΒ·n β€ 9).
Full provider math, exact formulas, and cited sources: visionsqueezer.com/providers
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/vision-squeezer)<a href="https://allmcps.com/mcp/vision-squeezer"><img src="https://allmcps.com/api/badge/vision-squeezer?style=directory" alt="Vision Squeezer on AllMCPs" /></a>