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# | 1,415 | 4,858,276 | 86% | |
| Focused Emitter | C# | 473 | 1,928,046 | 84% | |
| Focused Emitter (multi) | C# | 305 | 1,181,941 | 70% | |
| MinifyFile | C# | 920 | 416,666 | 31% | |
| TraceImplementors | C# | 64 | 290,747 | 64% | |
| MinifyFile | C | 1 | 239,143 | 36% | |
| MinifyCSharpFile | C# | 343 | 223,118 | 32% | |
| TraceCallers (Initial) | C# | 1 | 158,851 | 46% | |
| TraceCallers | C# | 12 | 133,476 | 86% | |
| FocusType | C# | 87 | 123,688 | 73% | |
| FocusCallers | C# | 42 | 104,187 | 43% | |
| MinifyFile | Razor | 134 | 47,478 | 14% | |
| MinifyFile | JSON | 55 | 18,192 | 27% | |
| Cache | C# | 4 | 11,708 | 69% | |
| OutlineCSharpFile (Initial) | C# | 2 | 10,724 | 57% | |
| MinifyFile | CSS | 54 | 9,816 | 11% | |
| MinifyFile | JavaScript | 9 | 8,235 | 42% | |
| MinifyFile | TypeScript | 6 | 7,018 | 7% | |
| MinifyFile | Markdown | 95 | 6,022 | 0% | |
| MinifyFile | XML | 136 | 5,557 | 2% | |
| MinifyFile | VB.NET | 6 | 5,479 | 13% | |
| MinifyFile | HTML | 4 | 3,738 | 1% | |
| MinifyFile | X++ | 1 | 2,017 | 20% | |
| Focused Emitter (multi) (Initial) | C# | 1 | 2,004 | 23% | |
| Focused Emitter Cache | C# | 33 | 1,991 | 22% | |
| TraceImplementors (Initial) | C# | 1 | 1,344 | 24% | |
| AliasCSharpFile | C# | 1 | 1,189 | 28% | |
| MinifyFile | Python | 3 | 713 | 10% | |
| 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% | |
| Focused Emitter (multi) Cache | C# | 1 | 57 | 19% | |
| MinifyFile | YAML | 5 | 56 | 3% |
Frequently asked questions
What is TokenSaver?
TokenSaver is an MCP (Model Context Protocol) server for .NET developers — a structural warm start for AI coding agents. Instead of loading whole files into the assistant, it hands the model a cheap map of your code (every type and member as a signature, each tagged with its line range) using the Roslyn compiler platform, so the model reads only the slice it needs instead of slurping the file.
How much can TokenSaver reduce token usage?
Per read, a signatures-only outline of a C# file saves 70–95% versus loading the whole file (up to 90% on a large file). The end-to-end saving on a real task is smaller and depends on the model: roughly 1% on a top-tier model that already reads tightly, ~5–7% on a mid-tier model, and ~8% on a smaller, cheaper model. The leaner the model, the more it over-reads on its own — so a warm start helps most for agents running on small/cheap models and for large codebases.
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++, and X++.
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.