@agents-npm-packages/supercompress
v1.0.5
Published
SuperCompress — one install, all your coding agents. Auto-compresses LLM context to save ~65% on token costs.
Maintainers
Readme
SuperCompress
One install. All your coding agents. ~65% fewer LLM tokens. Forever.
npm install -g supercompress-cliThe install itself registers the MCP plugin for detected agents. supercompress setup opens the SuperCompress account connection flow, auto-detects installed agents, configures the supported ones, and starts the proxy. No raw API-key copy step is required.
It also installs a standard MCP plugin as supercompress-mcp. MCP-capable clients such as Codex, Cursor, Claude Code, and Gemini CLI can use the same compression tool while keeping their existing login flow.
The proxy works when an agent sends an OpenAI-compatible or Anthropic-compatible API request through its configurable base URL. It does not intercept an agent's own hosted subscription backend. In particular, Codex sessions authenticated only with ChatGPT login do not provide an OpenAI API key that this local proxy can forward; use Codex API-key mode for compression.
How It Works
SuperCompress sits between your coding agent and the LLM provider, compressing every prompt before it reaches the model:
[Cursor/Windsurf/etc.] → POST /v1/chat/completions → [SuperCompress]
↓
Compresses context via API
↓
Forwards to OpenAI/Anthropic
↓
Returns response (with savings!)Every compression call is authenticated against your SuperCompress account and billed per your plan (Free → Starter → Pro). Heavy users hit the free tier fast and upgrade naturally.
One-Time Setup
# Install globally
npm install -g supercompress-cli
# Run the interactive setup
supercompress setupThe setup command will:
- Open the SuperCompress dashboard and link your account with a one-time code
- Detect installed Cursor, Windsurf, Continue, Cline, Claude Code, Codex, and Aider
- Configure supported agent settings and print manual steps for agents without a safe config surface
- Register as a background service (auto-starts on login)
Setup reports an agent as configured only after its local setting is written. Run supercompress status and check request logs before relying on it.
Commands
| Command | Description |
|---------|-------------|
| supercompress setup | Interactive setup (account link, agent config, background service, proxy start) |
| supercompress start | Start the compression server |
| supercompress stop | Stop the compression server |
| supercompress status | Check if the server is running |
| supercompress restart | Restart the server |
| supercompress uninstall | Remove SuperCompress and revert all agent configs |
| supercompress-mcp | Run the MCP plugin over stdio for any MCP-compatible agent |
After installation, run supercompress setup. It opens the dashboard for sign-in, links your account with a one-time code, auto-configures the detected agents, and starts the proxy. The key is never sent to the coding agent or provider.
MCP Plugin
For any MCP-compatible client, register:
{
"mcpServers": {
"supercompress": {
"command": "supercompress-mcp"
}
}
}MCP is the portable integration layer. Clients without MCP support or a configurable model endpoint cannot be intercepted by an external plugin.
Manual Configuration
If auto-detection doesn't find your agent, configure it manually:
Cursor
Settings → Models → Override OpenAI Base URL: http://localhost:8080/v1
Windsurf
Settings → API Endpoint: http://localhost:8080/v1
Continue (VS Code)
Edit ~/.continue/config.json:
{
"models": [{
"title": "SuperCompress",
"provider": "openai",
"model": "gpt-4o",
"apiBase": "http://localhost:8080/v1",
"apiKey": "sk-supercompress"
}]
}Cline (VS Code)
Extension settings → API Provider: OpenAI Compatible → Base URL: http://localhost:8080/v1
Claude Code
export ANTHROPIC_BASE_URL=http://localhost:8080
claudeThis applies to Claude API-key mode. Claude's hosted login/subscription backend may bypass ANTHROPIC_BASE_URL or use credentials that are not valid for the public Anthropic API, in which case the proxy cannot forward the request.
Aider
aider --openai-api-base http://localhost:8080/v1
# or
export OPENAI_API_BASE=http://localhost:8080/v1Codex authentication
Codex API-key mode works with openai_base_url in ~/.codex/config.toml:
openai_base_url = "http://localhost:8080/v1"Start Codex with an OpenAI API key available to it. A Codex ChatGPT subscription login is a different backend and is not proxyable by this local API adapter.
What You Get
| Before | After | |--------|-------| | 4,000 tokens per Cursor request | ~1,400 tokens (~65% less) | | $0.04 per GPT-4 Turbo request | ~$0.014 per request | | $200/month per heavy user | ~$70/month | | Context window fills up fast | 3x more effective context space |
How We Make Money (Transparent)
The server calls POST /api/v1/compress on the SuperCompress API for every compression. That call is authenticated by your API key and counts against your plan's monthly token quota:
| Plan | Price | Tokens/Month | Typical Usage | |------|-------|-------------|---------------| | Free | $0 | 100K | 1–2 days of Cursor | | Starter | $10/mo | 5M | 1–2 months | | Pro | $20/mo | 15M | Sweet spot for daily devs | | Business | $60/mo | Unlimited | Teams on shared server |
A heavy Cursor user generates 50K–500K tokens/day. The free tier runs out fast — and the value you get (saving 65% on your $20–200/mo LLM bill) far outweighs the $10–20 plan price.
Requirements
- Node.js 18+ (
node -v) - A SuperCompress account (get a free API key at https://supercompress.dev/dashboard)
Privacy
The server runs locally on your machine. Your provider API keys (OpenAI, Anthropic) never leave your computer. Only the context text is sent to the SuperCompress API for compression.
Uninstall
supercompress uninstallThis stops the server, reverts all agent configurations, and removes the config directory.
License
MIT
