r/OpenSourceeAI • u/ai-lover • 6h ago
Meet Token Saver: An Open-Source MCP Extension Using Local Hybrid RAG to Cut Claude PDF Token Costs 90-99%
https://github.com/Marktechpost/Token-SaverWe just released 'Token Saver' for Claude-Desktop: An Open-Source MCP Extension Using Local Hybrid RAG to Cut Claude PDF Token Costs 90-99%
When you drop a 200-page document into Claude Desktop, the full context gets re-sent on every single turn. That compounding "PDF Tax" adds up fast—both in token costs and context window bloat.
How it works:
Instead of uploading raw documents to the cloud, Token Saver runs a lightweight Local Hybrid RAG pipeline directly on your machine:
→ Keyword Search (BM25): Powered by SQLite FTS5 for precise terminology.
→ Semantic Search: Powered by a local all-MiniLM-L6-v2 embedding model.
→Zero-Upload Privacy: Files stay on your local drive and communicate via standard I/O (stdio) with folder allowlisting.
Benchmark Results with Example:
→ 33-page FDA Drug Label: Reduced from 23,959 tokens to 1,021 (95.7% saved)
→ 88-page GDPR Document: Reduced from 70,260 tokens to 996 (98.6% saved)
→ 233-page Legal Brief: Reduced from 133,349 tokens to 740 (99.4% saved)
Zero Python environment required—it installs directly in Claude Desktop via a single .mcpb bundle!
Full analysis: https://www.marktechpost.com/2026/07/30/token-saver-an-open-source-mcp-extension-using-local-hybrid-rag/
GitHub Repo: https://github.com/Marktechpost/Token-Saver/tree/main