</>MCP Agents Market
Plugin

pxpipe

by teamchong7.1kTypeScriptUpdated 2026-08-17

cut Claude Code token usage by rendering text context as images

Claude CodeCursorCodex

pxpipe is a Claude Code plugin that cuts token costs by 59–70% by rendering bulky text context—system prompts, tool documentation, and conversation history—as compact PNG images before sending requests to Anthropic's API. It exploits the fact that image tokens are priced by pixel dimensions rather than content density, packing approximately 3.1 characters per image token versus 1 character per text token. The plugin runs as a local proxy that developers point their Claude Code client to, transparently compressing requests while streaming responses normally. It works with multiple vision-capable models including Claude Fable 5, Opus 5, Gemini 3.6 Flash, and GPT 5.6 Sol, with model-specific rendering profiles optimized for each.

Key Features

Reduces Claude Code token usage by 59–70% end-to-end by converting dense text context into vision-optimized PNG images
Packs ~3.1 characters per image token versus ~1 char/text-token, achieving 4.7–5.3× effective context window expansion
Supports multiple models with optimized profiles: Claude Fable 5, Opus 5, Gemini 3.6 Flash, GPT 5.6 Sol, and Grok 4.5
Live web dashboard at localhost:47821 showing real-time token savings, side-by-side text/image conversions, and per-model controls
Profitability gates ensure compression only activates when token-dense content will actually save money versus sparse prose
Offline export mode renders files, diffs, or stdin to PNG pages without running the proxy for manual use in other clients
Detailed event logging to ~/.pxpipe/events.jsonl with per-request token measurements and savings calculations
Library API for programmatic integration into custom agent workflows without running the proxy server

Use Cases

  • 01Reducing API bills for long coding sessions with extensive file reads and command outputs in Claude Code
  • 02Compressing multi-file context when working on large codebases where tool results exceed cache limits
  • 03Extending effective context windows by 4–5× to fit more conversation history and documentation in the same token budget
  • 04Batch processing dense logs, JSON responses, or structured data through vision-capable models at lower cost
  • 05Exporting complex codebases or diffs as visual context for sharing with team members using image-upload AI clients
  • 06Running long SWE-bench style agent tasks where accumulated history would otherwise fill the context window

Related Plugins

View more

pxpipe — FAQ

What is pxpipe and how does it reduce Claude Code token usage?+

pxpipe is a local proxy that intercepts Claude Code API requests and converts bulky text context (system prompts, tool docs, old conversation turns) into compact PNG images before sending them to Anthropic. Image tokens cost a fixed amount based on pixel dimensions regardless of text density, enabling ~3.1 chars/token versus ~1 char/token for regular text, resulting in 59–70% lower API bills.

How do I install and use pxpipe with Claude Code?+

Run 'npx pxpipe-proxy' to start the proxy on port 47821, then launch Claude Code with 'ANTHROPIC_BASE_URL=http://127.0.0.1:47821 claude'. Alternatively, use 'pxpipe warp -- claude' to route traffic without setting environment variables. The dashboard at http://127.0.0.1:47821 shows live savings and controls.

Which AI clients and models work with pxpipe?+

pxpipe works with Claude Code, Cursor, Codex, and any client that can point to a custom API base URL. Supported models include Claude Fable 5 (default), Claude Opus 5, Google Gemini 3.6 Flash, GPT 5.6 Sol, and Grok 4.5, each with optimized rendering profiles.

Is pxpipe lossy and will it break my code?+

Yes, it is lossy—exact 12-character hex strings in dense imaged content score 13/15 on Fable 5 versus 0/15 on weaker models, and misses are silent confabulations. Recent turns and open tool calls stay as text, and byte-exact work should route to non-allowlisted models as an escape hatch. SWE-bench testing shows 10/10 identical results on both plain and pxpipe arms.

Do I need an API key or is pxpipe free to use?+

pxpipe itself is free and MIT-licensed, but you still need your own Anthropic (or OpenAI/Google) API key since the proxy forwards requests to the real provider. Savings are measured against your actual API usage and billed tokens.

Can I use pxpipe without the proxy for manual image exports?+

Yes, run 'npx pxpipe-proxy export src/' or pipe text via stdin to render content as PNG pages in an offline export folder. Upload the generated PNGs to any image-capable AI client like Cursor when you want dense visual context without running the proxy.

How do I install pxpipe?+

Open the source repository on GitHub and follow its README. pxpipe is a plugin — MCP Agents Market links you directly to the official repo.

Is pxpipe free?+

pxpipe is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches