English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Token Saver: Local MCP Extension Cuts Claude's PDF Reading Cost by Up to 13x

Forum topic · 小凯 · 2026-08-02

Summary

Token Saver is an open-source, MIT-licensed MCP extension released in July 2026 that dramatically reduces the token cost of reading large PDFs in Claude Desktop. Instead of sending an entire document to the model, users index PDFs locally; Claude then retrieves only the most relevant excerpts (capped at 8,000 characters) with page numbers via the MCP protocol, so the full PDF never leaves the user's machine. Under the hood it uses hybrid RAG: BM25 keyword scoring (weight 0.4, on SQLite FTS5) combined with local all-MiniLM-L6-v2 embeddings (weight 0.6), plus a quality gate requiring semantic hits above a 0.25 similarity threshold. Reported benchmarks show savings of 95.7% on a 33-page FDA drug label, 98.6% on the 88-page GDPR text, and 99.4% on the 233-page SFFA v. Harvard opinion. Beyond cost savings, the tool offers compliance value for legal, medical, and financial PDFs through zero-upload, folder-allowlist design, and ships with open retrieval evaluation scripts (recall@5, false-abstain). Known limitations include an ~80MB embedding model download with BM25-only fallback, poor support for scanned/image PDFs without OCR, and occasional Windows sentence-splitter errors. Repository: https://github.com/Marktechpost/Token-Saver

Category: ai-products · AI coding infrastructure Released: v1.0, 2026-07-30 Sources: Marktechpost official GitHub repo (MIT license), kiadev.net hands-on testing, techsparking secondary coverage

What it does

Before dropping a large PDF into Claude Desktop, index it locally first. When you ask a question, Claude calls this local tool via the MCP protocol and receives only "the few passages most relevant to the current question + page numbers." The entire PDF never leaves your hard drive — the model only sees precise excerpts clipped to 8,000 characters.

The underlying approach is hybrid RAG: BM25 (keyword, weight 0.4, running on SQLite FTS5) + local all-MiniLM-L6-v2 embeddings (semantic, weight 0.6). After both scoring paths, results pass a "quality gate" — a purely semantic hit must exceed a 0.25 similarity threshold to make it into the results.

The numbers

Measured on three documents (estimated with cl100k_base):

| Document | Pages | Full-doc tokens | Tool-returned tokens | Savings | |---|---:|---:|---:|---:| | FDA drug label | 33 | 23,959 | 1,021 | 95.7% | | GDPR full text | 88 | 70,260 | 996 | 98.6% | | SFFA v. Harvard | 233 | 133,349 | 740 | 99.4% |

Drop a 1,000-page textbook into Claude and at full price you'd pay for the whole book again on every conversational turn; with Token Saver, each turn costs only a few hundred tokens of precise slices. The bigger the document, the greater the savings — the ratio is not linear.

Why this is more than a token-saving utility

1. The billing logic changed. Claude bills per token of context, plus context re-sent on every turn. Token Saver doesn't cut the cost of a single question — it changes the cost structure of the "long document + multi-turn conversation" combination. A reading session on a 200-page PDF that might have cost $5–10 could run around $0.50 with Token Saver.

2. The MCP ecosystem is sinking from "general-purpose tools" to "domain tools." Token Saver isn't general-purpose; it does exactly one thing: PDF reading. MIT licensed, 17 commits, built by Arnav Rai, an undergraduate intern at Rochester Institute of Technology, during his internship at Marktechpost. It shows individual developers can now write MCP tools and ship them to production.

3. Local-first compliance value. Legal, medical, and financial PDFs are nearly impossible to upload to third-party services. Token Saver's design — folder allowlist + zero upload + only metadata going to Claude — is "compliance first, features second" for these workflows.

4. Retrieval evaluation is open source. The repo includes eval/retrieval_eval.py and RESULTS.md, with actual numbers for recall@5 and false-abstain. Marktechpost treats RAG tools as "products that can be benchmarked," not "demo demos."

Limitations

  • Embedding model choice: all-MiniLM-L6-v2 requires an ~80MB download on first use. If the download fails, it automatically degrades to pure BM25 — retrieval quality drops but it still works.
  • Not all PDFs are supported: scanned or image-only PDFs need OCR first; if pypdfium2 extraction fails, pypdf is used as a fallback.
  • The Stanford NLP sentence splitter occasionally errors on Windows, noted by the author in known-issues.
  • The performance ceiling is Claude itself: no matter how good the returned passages are, model reasoning is constrained to the 8,000-character input limit.
  • How to view this class of tools

    Token Saver's real significance isn't "saving 99% of cost" — it's turning "large-document Q&A" from a luxury into a commodity. Teams doing enterprise knowledge bases, document review, or compliance analysis used to spend $200 having a new hire "read the GDPR" before work could begin; now the same job can be done for $15.

    It's the story AI coding tools have been telling, in a different setting: wrap a single-point capability into a pluggable MCP tool, let the model decide when to invoke it — the model weights don't upgrade, but a hole gets punched through the workflow.

    Original links:

  • https://github.com/Marktechpost/Token-Saver
  • https://kiadev.net/news/2026-07-30-token-saver-local-hybrid-rag
  • https://techsparking.com/meet-the-token-saver-an-open-source-mcp-extension-using-local-hybrid-rag-to-reduce-token-costs-claude-pdf-90-99

Tags

#mcp#claude#token-saver#rag#pdf#cost-optimization#hybrid-search#local-first

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178503856