About TokenSaver
What it is
TokenSaver is an open-source 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.
Outlining a file costs 70–95% fewer tokens than reading it — up to 90% on a large file. The end-to-end saving on a real task is smaller and scales inversely with how capable the model is: roughly 1% on a top-tier model that already reads tightly, ~5–7% mid-tier, and ~8% on a smaller, cheaper model. The leaner the model, the more it over-reads on its own — so TokenSaver helps most for agents running on small / cheap models and for large codebases. It curbs wasteful reading; it does not change the code the model writes. This site is the live dashboard tracking tokens saved across all installs.
What the tools do
- Outline — signatures of every type and member with no bodies, each tagged with its line range. The warm-start primitive: orient, then read just the lines you need.
- Minify — lossless whole-file reduction, auto-dispatched by file extension, for non-C# files or when you genuinely need a whole file.
- Trace DI registrations — find where a type is wired in dependency injection and to what — the one question a text search can't answer cleanly.
See the full list of capabilities →
Supported languages
Full Roslyn support for C#, Razor, VB.NET, and .NET project files. Comment-strip and whitespace-collapse support for JavaScript, TypeScript, Python, HTML, CSS/SCSS/LESS, JSON, YAML, C, C++, and X++. It works with Visual Studio 2026 (GitHub Copilot Chat), Claude Code, VS Code Copilot, Claude Desktop, and any MCP client that speaks stdio.
Open source
TokenSaver is released under the MIT license. The package is published on NuGet and the source code is on GitHub.
Get started
Head to the install page for one-click install buttons, per-client configuration snippets, and upgrade and uninstall instructions.