TokenSaver
saving tokens since May 2026
Sources and methodology
- Energy (~1 kWh per million tokens) — rough estimate derived from the IEA Electricity 2024 report and a Goldman Sachs (2024) analysis of AI data-center demand. Actual inference energy varies widely by model, provider, and hardware — easily 5–10× in either direction.
- Carbon intensity (0.4 kg CO₂ per kWh) — United States national grid average from EPA eGRID 2023 (~0.386 kg CO₂e/kWh, rounded to 0.4). The actual figure depends on where the inference provider's data centers are located and the local grid mix.
- Dollar savings ($3 per million input tokens) — Claude Sonnet input rate from the Anthropic pricing page. Does not account for output tokens, caching, or volume discounts.
Activity
| Tool | Language | Runs | Saved | Avg reduction | Reduction |
|---|---|---|---|---|---|
| OutlineCSharpFile | C# | 450 | 2,647,207 | 91% | |
| Focused Emitter | C# | 316 | 1,834,117 | 85% | |
| Focused Emitter (multi) | C# | 276 | 1,175,196 | 70% | |
| MinifyFile | C# | 805 | 373,481 | 31% | |
| TraceImplementors | C# | 63 | 289,907 | 64% | |
| MinifyFile | C | 1 | 239,143 | 36% | |
| MinifyCSharpFile | C# | 307 | 193,814 | 32% | |
| TraceCallers (Initial) | C# | 1 | 158,851 | 46% | |
| TraceCallers | C# | 11 | 132,452 | 86% | |
| FocusType | C# | 64 | 116,765 | 73% | |
| FocusCallers | C# | 21 | 96,174 | 41% | |
| MinifyFile | Razor | 60 | 18,666 | 15% | |
| MinifyFile | JSON | 28 | 12,555 | 28% | |
| Cache | C# | 4 | 11,708 | 69% | |
| OutlineCSharpFile (Initial) | C# | 2 | 10,724 | 57% | |
| MinifyFile | JavaScript | 6 | 7,526 | 57% | |
| MinifyFile | Markdown | 71 | 4,671 | 0% | |
| MinifyFile | XML | 110 | 3,958 | 2% | |
| MinifyFile | X++ | 1 | 2,017 | 20% | |
| Focused Emitter (multi) (Initial) | C# | 1 | 2,004 | 23% | |
| MinifyFile | HTML | 3 | 1,998 | 1% | |
| TraceImplementors (Initial) | C# | 1 | 1,344 | 24% | |
| MinifyFile | Python | 3 | 713 | 10% | |
| Focused Emitter Cache | C# | 12 | 691 | 20% | |
| DedupCheck | C# | 2 | 654 | 81% | |
| OutlineCSharpFile | VB.NET | 1 | 391 | 79% | |
| Focused Emitter (Initial) | C# | 1 | 199 | 5% | |
| Focused Emitter | VB.NET | 1 | 168 | 34% | |
| MinifyFile | VB.NET | 1 | 146 | 30% | |
| Focused Emitter (multi) Cache | C# | 1 | 57 | 19% | |
| MinifyFile | YAML | 3 | 28 | 2% | |
| MinifyFile | CSS | 2 | 20 | 1% |
Frequently asked questions
What is TokenSaver?
TokenSaver is an MCP (Model Context Protocol) server for .NET developers. It gives AI coding assistants a token-efficient view of C#, Razor, and .NET project files using the Roslyn compiler platform, so the assistant reads the same code using far fewer tokens — with no loss of logic.
How much can TokenSaver reduce token usage?
It depends on the tool and the file. A signatures-only outline of a C# file saves 70–95%, a lossless full-file minify saves 20–50%, and the focused tools save 15–40% measured against reading only the relevant code. On C# files the typical reduction is 50–95%.
Which file types and languages does it support?
Full Roslyn support for C#, Razor, VB.NET, and .NET project files (.csproj, .props, .config, .xml). Comment-strip and whitespace-collapse support for JavaScript, TypeScript, Python, HTML, CSS/SCSS/LESS, JSON, YAML, C, C++, X++, and Markdown.
Which AI tools and editors does it work with?
Visual Studio 2026 (GitHub Copilot Chat), Claude Code, VS Code Copilot, Claude Desktop, and any MCP client that communicates over stdio.
How do I install TokenSaver?
The install page has one-click install buttons, per-client configuration snippets, and upgrade and uninstall instructions.