Meet Token Saver: An Open-Source MCP Extension Using Local Hybrid RAG to Cut Claude PDF Token Costs 90-99%
MarkTechPost Arnav Rai, Jean-marc Mommessin and Asif Razzaq
A new open-source tool called Token Saver keeps big PDFs off Claude's servers and just feeds it the relevant bits. It cuts token costs by up to 99% and needs zero setup hassle.
Based on reporting by MarkTechPost, Arnav Rai, Jean-marc Mommessin and Asif Razzaq — read the original for the full story.
Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error
Every time you paste a giant PDF into a chatbot and keep asking follow-up questions, you're paying for that document again and again. That's because chat history gets resent to the model on every turn, so a 200-page filing you uploaded once quietly becomes the most expensive part of every message after it. Marktechpost's engineering team decided this was dumb enough to fix, and the result is Token Saver, an MIT-licensed MCP extension for Claude Desktop built by RIT student Arnav Rai during an internship there.
The trick isn't clever prompting, it's just not sending the whole document in the first place. Token Saver runs a local hybrid retrieval system, mixing old-school keyword search (BM25 via SQLite's FTS5, weighted at 0.4) with semantic search through a local all-MiniLM-L6-v2 embedding model (weighted at 0.6). The PDF sits on your hard drive the entire time. When you ask a question, the tool chunks the text into overlapping 180-word passages, scores them, filters out weak matches below a 0.25 similarity floor, deduplicates, trims to the actually relevant sentences, and caps what gets sent to Claude at 8,000 characters. Eight steps, all local, none of it touching Anthropic's servers until the final distilled answer.
The numbers are the real pitch here. Feed Claude an FDA drug label at 23,959 tokens and Token Saver returns just 1,021, a 95.7% savings. A full GDPR regulation document drops from 70,260 tokens to 996, over 98% saved. The SFFA v. Harvard case, at 133,349 tokens for the whole document, gets trimmed to 740 tokens returned, a 99.4% reduction. The pattern is obvious: the bigger and denser the document, the more absurd the savings become, since you're no longer paying to re-transmit hundreds of pages just to answer a two-paragraph question.
There's a privacy angle that matters as much as the cost savings, especially for anyone touching legal or financial documents. Files never leave the machine, the server only reads from a folder you explicitly allowlist, and it talks to Claude over stdio with no open network ports at all. Setup is a single .mcpb bundle install through Claude Desktop's extension settings, no Python environment, no JSON wrangling. Testing showed Claude 3.5 Sonnet handles it best for everyday use, correctly citing page numbers and asking for clarification when filenames are ambiguous, while Opus shines specifically on documents with competing voices, like majority and dissenting legal opinions, where it's smart enough to flag when it's inferring attribution rather than reading it outright.
My take — AI-written commentary, not fact-checked reporting
This is the kind of unglamorous engineering that actually matters more than another benchmark-topping model release: solving the boring, expensive problem of re-paying for context on every turn. It's also a quiet vote for local-first AI tooling over blind trust in provider infrastructure, and I'd like to see more labs bake retrieval-first defaults into their apps instead of leaving it to a student intern's side project to fix.
Read more about this at: MarkTechPost
Related stories
The Tokenpocalypse Is Here: Companies Are Scrambling To Stop Spending So Much on AI
Simon Willison’s Weblog · 1 month ago ·
29
How I Cut an AI Agent's Token Use by 94%
vivekhaldar.com · 2 months ago ·
20
Aider, Claude Code, and OpenClaw ran an identical model. Token use varied 70-fold.
The New Stack · 3 weeks ago ·
8