Inferni Token Saver
Provides a summarize_changes tool that inspects a local git project to report what changed recently, including uncommitted work, then condenses it through the local model.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Inferni Token Saver
Make your Claude usage go further: keep big files and web pages out of the chat, and let a free local model on your own PC do the heavy reading.
Inferni Token Saver is a free, open-source Model Context Protocol server made by Inferni for hobbyists who use Claude (including the free plan) and want their usage to last longer.
Every message you send makes Claude re-read the whole conversation, including every file and page it has read so far. One big log or source file can cost tens of thousands of tokens, and it keeps costing on every message after. Inferni Token Saver gives Claude cheaper ways to get the same answer:
Search instead of read: find the lines that matter in a file or a whole folder.
Read a part: just the lines needed, with line numbers.
Let a free local model read it: Ollama or LM Studio on your PC reads the big file or web page and Claude gets a short answer.
Start fresh without losing your place: save a handoff note from a long chat, load it in a new one.
See what it saved: a running tally of tokens kept out of your chats.
Real results
Measured on an RTX 5060 Ti (16 GB) with gemma4:12b in Ollama:
Job | Claude would have read | Claude read instead | Time |
Question about a 1,000-line Python file ("how are start/stop requests handled?") | ~12,600 tokens | ~150 | 4 s |
Which version and components are in a 6,300-line JavaScript library | ~53,500 tokens | ~85 | 44 s (read in 3 parts) |
Summary of a project README | ~2,800 tokens | ~320 | 4 s |
Find two function definitions in a 23-file project ( | ~12,600 tokens | ~90 | 0.3 s |
All four answers were checked against the files and were correct. The first summary after the model has been idle takes longer (up to a minute or so) while the model loads onto the graphics card.
How answers are checked
A small local model can get things wrong, and Claude can't tell when it only sees the summary. So every answer is checked on your PC before Claude sees it:
The local model cites line numbers for each point it makes.
Each point is checked against those lines: its key words must be there, and any name, version or identifier it mentions must exist in the text.
The model judges each point again, this time seeing only that point's evidence lines.
Claude gets the points that pass, with the real lines behind them, so it sees evidence rather than the
model's word. Points that don't pass are listed apart, under unverified, with the reason. Guesses about
things the text never mentions (such as "probably a firewall" for a log that doesn't mention one) are always
removed, along with any advice that rests on them. If nothing in an answer holds up, Claude gets the exact lines
that match the question instead.
The cost/saving limit: texts under 3,000 tokens come back whole, since a summary isn't worth the risk. Above that, a result costs at most 15% of reading the whole text, and never more than 1,500 tokens. Debugging and exact-detail questions get careful mode: more checking and more real lines (up to 25% or 2,500 tokens). The checking itself runs on your PC, so it costs a few seconds, not Claude usage.
Measured on 20 questions with known answers about real code, logs and libraries (evals/, RTX 5060 Ti,
gemma4:12b):
Correct | Claude read (all 20) | Saved | Time (all 20) | |
0.2.0 (summaries unchecked) | 18 / 20 | 5,400 tokens | 99% | 258 s |
0.3.0 (checked, with evidence) | 20 / 20 | 9,000 tokens | 98% | 275 s |
The 20 files would have cost about 320,000 tokens to read in full. Of 116 points the model made, 8 were set apart as unverified, including a wrong "firewall" guess that 0.2.0 passed straight to Claude.
When it helps: working with logs, code, documents and web pages, or long chats you can hand off. When it doesn't: ordinary back-and-forth chat. Short files are returned whole, because a summary wouldn't be cheaper.
Related MCP server: Hybrid RAG Project MCP Server
Contents
Tools
Tool | What it does | Needs a local model? |
| Size, lines and token cost of a file or folder, with advice on how to read it | No |
| Matching lines (with line numbers) from a file or a whole folder | No |
| Part of a file, up to 400 lines at a time | No |
| Files in a folder with sizes (skips | No |
| Local model reads a file and answers a question or summarises it | Yes |
| Local model reads a web page and answers a question or summarises it | Yes |
| Carry a long chat's progress into a fresh chat | No |
| Errors in a log grouped by type, the latest traceback, and the likely cause and fix | Optional (for the explanation) |
| Overview of a project folder from its README, config and entry points | Yes |
| What changed recently in a git project, including uncommitted work | Yes |
| Savings summary (today, last 7 days, all time, by tool and day) and local model status | No |
Without a local model the search, read, log and handoff tools still work, so it's useful on any PC.
Automatic handoffs
Long chats are the biggest hidden cost: every message re-reads the whole conversation. Inferni Token Saver asks Claude to keep a handoff note up to date by itself, so starting a fresh chat never loses your place:
Claude saves a handoff without being asked when a piece of work is finished or the chat has grown long, and tells you in one line.
Saving again under the same title updates the same note, so each piece of work has one current handoff instead of a pile of old ones. The newest 50 notes are kept.
Claude can't see how long a chat is from inside a tool, so the token saver counts instead: after 25 tool calls or about 30,000 tokens of results since the last handoff, results include a reminder (
handoff_due). A pause of over 30 minutes starts the count again, since that's usually a new chat.In a new chat, say "continue from my handoff", or just carry on with the same work and Claude offers to load the matching note.
Switch it off with auto_handoff = false, or change when reminders come with handoff_after_calls and
handoff_after_tokens in the config file.
Shortcuts in Claude's + menu
Inferni Token Saver adds ready-made prompts to Claude Desktop's + menu, so common jobs are one click: Save a handoff, Continue from a handoff, Check a log, Explain a project and Token savings.
Savings summary
Every result includes a savings line (tokens saved by that call, today and in total), so Claude can tell you
as it goes. Ask "how much has the token saver saved?" for the full breakdown, or run this in a terminal
(example output):
inferni-token-saver --savingsInferni Token Saver: estimated tokens kept out of your AI chats
Today 19,600 (4 uses)
Last 7 days 84,210 (23 uses)
All time 142,880 (41 uses since 2026-12-05, 96% less than reading in full)
By tool:
summarize_file 88,400 (12 uses)
check_log 31,050 (9 uses)
...Install
You need Python 3.11 or newer (python.org; tick "Add python.exe to PATH" on Windows).
git clone https://github.com/DiveDevil-oss/inferni-token-saver.git
cd inferni-token-saver
python -m venv .venv
.venv\Scripts\pip install .
.venv\Scripts\inferni-token-saver --check--check shows which folders it may read and whether it found a local model. The full path to
inferni-token-saver.exe (for example C:\Users\you\inferni-token-saver\.venv\Scripts\inferni-token-saver.exe)
is what you give your AI app.
Set up a local model
Ollama (recommended)
Install Ollama. It runs quietly in the tray.
Download a model that fits your graphics card:
Graphics memory
Model to try
Command
16 GB or more
Gemma 4 12B
ollama pull gemma4:12b8–12 GB
a 7–9B model, e.g. Qwen 3.5 9B
ollama pull qwen3.5:9bNo graphics card
a small model (slow, but works on the CPU)
ollama pull gemma4:e4bRun
inferni-token-saver --checkagain. It should say"ready": true.
To keep models off your C: drive, set the OLLAMA_MODELS environment variable (for example
E:\Ollama\models) before pulling, then restart Ollama.
Tuning: on an RTX 5060 Ti (16 GB) with Ollama 0.40 and gemma4:12b, Ollama's own defaults were the
fastest. Flash attention (OLLAMA_FLASH_ATTENTION=1) and a compressed cache (OLLAMA_KV_CACHE_TYPE=q8_0)
saved up to 0.9 GB of graphics memory but read and wrote 10–25% slower. A bigger context_tokens (65536)
gave the same 20/20 on the test set but took 40% longer, because more text is read per question. So keep
the defaults and context_tokens = 32768 unless your card is short of memory, in which case the compressed
cache is the setting to try first.
LM Studio
Download a model in LM Studio, load it, and start the server on the Developer tab (port 1234). Inferni Token Saver uses LM Studio if Ollama isn't running.
Add it to your AI app
Claude Desktop (free plan works)
Open Settings → Developer → Edit Config.
Add Inferni Token Saver under
mcpServers(keep any servers already there):{ "mcpServers": { "inferni-token-saver": { "command": "C:\\Users\\you\\inferni-token-saver\\.venv\\Scripts\\inferni-token-saver.exe" } } }Fully quit Claude Desktop (tray icon → Quit) and reopen it. It should appear under + → Plugins → Connectors.
Store/MSIX installs of Claude Desktop read their config from
%LOCALAPPDATA%\Claude-Data\claude_<id>\claude_desktop_config.json, not %APPDATA%\Claude\. Edit Config
opens the right file.
VS Code (Copilot Free), Gemini CLI, Cursor and others
Any MCP app works: run inferni-token-saver.exe as a stdio server. For example, .vscode/mcp.json:
{ "servers": { "inferni-token-saver": { "type": "stdio", "command": "C:\\...\\inferni-token-saver.exe" } } }Config file
Everything is optional. Create an example with inferni-token-saver --init. It lives at
%APPDATA%\inferni-token-saver\config.toml (Windows) or ~/.config/inferni-token-saver/config.toml.
# Folders the AI may search and read. Default: your home folder.
roots = ["C:/Users/you", "D:/projects"]
# "auto" picks Ollama, then LM Studio, and the first chat model found. Or name one.
model = "gemma4:12b"
# How much text the local model reads at once, in tokens. More needs more graphics memory.
# 32768 suits a 12-16 GB card with a 12B model; use 8192-16384 on 8 GB cards.
context_tokens = 32768
# The cost/saving limit (see "How answers are checked").
return_whole_below = 3000 # tokens: smaller texts come back whole
max_share = 0.15 # a result costs at most this share of reading the whole text...
max_result_tokens = 1500 # ...and never more than this
check_answers = true # check the local model's answers before Claude sees them
# Automatic handoffs (see "Automatic handoffs").
auto_handoff = true
handoff_after_calls = 25 # remind Claude after this many tool calls since the last handoff...
handoff_after_tokens = 30000 # ...or this many tokens of resultsFlag | Environment variable | Does |
|
| Folders the AI may read |
|
| Local model to use |
|
| Use a different config file |
| Where handoffs and the savings tally go (default |
Tips for getting the most out of your usage
Start new chats often. A long chat re-reads everything on every message. Claude keeps a handoff note up to date for you (see Automatic handoffs), so when a chat gets long, open a new one and say "continue from my handoff".
Give Claude the file's path instead of attaching it. An attached or pasted file goes into the chat in full before any tool can help; a path lets Claude search or summarise it.
Ask questions, not "read this". "Why did my bot crash? The log is C:\bots\mybot\bot.log" lets Claude use
check_loginstead of reading the whole log.Switch off connectors you don't need in a chat (+ → Plugins → Connectors). Every connector that's on adds its tool descriptions to every message.
Ask Claude for
token_savingsnow and then to see what it's saving you.
Safety
Only the folders you allow. Files outside
rootscan't be read or searched.Secret files are refused.
.env, private keys,credentials*, password databases and similar can't be read at all, and anything that looks like a token, password, API key or webhook is replaced with[redacted]before Claude or the local model sees it.Read-only. The only tool that writes is
save_handoff, and only into its own notes folder.Your own network stays private.
summarize_urlwon't fetch addresses on your own network (routers, local servers) unless you setallow_private_urls = true.Local. Summaries are made on your PC. Nothing is sent anywhere except the page you ask
summarize_urlto fetch.Summaries are checked, but can still miss things. Answers are checked against the text (see above), but a summary can leave out something that mattered. For anything important, have Claude read the cited lines with
read_lines.
See SECURITY.md to report a problem.
Development
python -m venv .venv
.venv\Scripts\pip install -e ".[dev]"
.venv\Scripts\pytest
.venv\Scripts\ruff check src testsThe tests use a fake local model, so they run without Ollama. See CONTRIBUTING.md.
To measure answer quality with your real local model, write questions with known answers about your own files
(see evals/cases.json for the format) and run:
.venv\Scripts\python evals\run_evals.py --base C:\path\to\your\projects --cases my_cases.jsonIt prints how many answers were right, how many tokens Claude would read, and the time taken.
License
Licensed under MIT.
Also by Inferni: Inferni MCP, which lets your AI see and manage the apps and bots on your PC.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let ChatGPT and Claude read and edit files, search and run commands on your own computer.
Let ChatGPT and Claude work on your own computer: files, terminal, Word, Excel and PDF.
Agent personas for Claude. 16 tools, 13 personas, 3 workflows. Zero extra API cost. Free.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables Claude to delegate coding tasks to local Ollama models, reducing API token usage by up to 98.75% while leveraging local compute resources. Supports code generation, review, refactoring, and file analysis with Claude providing oversight and quality assurance.1127AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables Claude to perform hybrid search across local documents by combining semantic vector retrieval and BM25 keyword matching for optimal context recovery. It supports multiple file formats including PDF, CSV, and Markdown, leveraging local Ollama models for private and efficient document querying.5MIT
- AlicenseAqualityDmaintenanceEnables Claude Code to offload routine code generation and text processing tasks to a local Ollama LLM, saving Cloud API tokens and costs with automatic model selection and security features.11244 npm3Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to hand off bulk, mechanical, read-heavy tasks to a local model, including agentic loops that can read, write, and run commands sandboxed at zero cloud token cost.MIT