
Token Compressor
Shrink long system prompts and tool instructions before they hit a paid API, without stripping conditionals your agent relies on.
Overview
Token Compressor is a MCP server for the Build phase that shrinks agent prompts about 40–60% with local LLM compression and embedding validation while preserving conditionals.
What is this MCP server?
- Targets 40–60% token reduction on verbose prompts using a local LLM pipeline
- Embedding validation checks that compressed text still matches original intent
- Preserves conditionals and branching logic instead of naive summarization
- Stdio MCP package on PyPI (token-compressor-mcp) for Claude Code–style clients
- Keeps sensitive prompt text on your machine when compression runs locally
- Advertised 40–60% prompt compression range
- Server version 0.1.1 on PyPI identifier token-compressor-mcp
- Stdio transport; local LLM plus embedding validation per description
Community signal: 8 GitHub stars.
What problem does it solve?
Long agent prompts burn context windows and API spend on every turn, and naive summarization silently drops the if/when rules that keep your agent safe.
Who is it for?
Solo builders running Claude Code or similar agents with repetitive, rule-heavy system prompts who want local, validation-backed compression before scale.
Skip if: Teams that need cloud-only MCP with no local LLM setup, or anyone who can solve the problem by deleting unused tools and skills instead of compressing text.
What do I get? / Deliverables
After you register the server, you can compress bulky prompts locally, validate semantic fidelity, and send leaner context to your agent without rewriting every conditional by hand.
- Shorter prompt variants validated against the original meaning
- Preserved conditional and branching language in compressed output
- Repeatable compression step in your agent prep pipeline
Recommended MCP Servers
Journey fit
Prompt compression sits where solo builders wire agents and skills—right before context is sent on every turn. Agent-tooling is the shelf for MCP servers that change how much context your coding agent carries, not for app feature code.
How it compares
MCP compression utility for prompts—not an agent skill and not a hosted chat product.
Common Questions / FAQ
Who is Token Compressor for?
It is for indie developers and agent builders who maintain large prompts or skill instructions and want measurable token savings without trusting blind summarization.
When should I use Token Compressor?
Use it when you are stabilizing agent-tooling—before you ship a long system prompt to production or when context limits start blocking multi-skill workflows.
How do I add Token Compressor to my agent?
Install the PyPI package token-compressor-mcp, configure stdio transport in your MCP client (for example Claude Code), and invoke its compress tools on prompt text you already use in sessions.