Token Saver: Open-Source MCP Extension Cuts Claude PDF Token Costs by 90-99% Using Local Hybrid RAG
Marktechpost AI Media Inc
Anthropic
Marktechpost AI team released Token Saver, an open-source Model Context Protocol (MCP) extension for Claude Desktop that uses local Hybrid RAG to reduce token costs for large PDFs by 92-99%. It ensures privacy by never uploading files and requires no Python environment setup.
Marktechpost AI team released Token Saver, an open-source MCP extension for Claude Desktop (MIT licensed, v1.0) developed by Arnav Rai, Jean-marc Mommessin, and Asif Razzaq. Token Saver acts as a local MCP server that uses Local Hybrid RAG (combining BM25 keyword matching and semantic search with all-MiniLM-L6-v2) to retrieve only relevant passages from PDFs, cutting token consumption by 92-99% compared to sending the entire document. The extension processes PDFs locally through an 8-stage pipeline: extract text via pypdfium2, chunk into 180-word overlapping passages, score with hybrid RAG, apply quality gate, deduplicate, trim to answer, cap payload at 8000 characters, and wrap with source and page number. Benchmarks show savings of 95.7% for a 33-page FDA drug label, 98.6% for 88-page GDPR, and 99.4% for 233-page SFFA v. Harvard. Security is ensured via zero uploads, folder allowlisting, and network isolation (stdio only). Token Saver works with Claude 3.5 Sonnet (recommended) and Opus. Setup requires only downloading a .mcpb bundle and installing it in Claude Desktop without Python or terminal configuration.
- Сокращения
- MCP = Model Context Protocol — Протокол контекста модели
- RAG = Retrieval-Augmented Generation — Генерация с расширением за счет поиска
- FTS5 = Full-Text Search version 5 — Полнотекстовый поиск версии 5
- BM25 = Best Matching 25 — Лучшее соответствие 25
- LLM = Large Language Model — Большая языковая модель
- PDF = Portable Document Format — Портативный формат документов
Source: MarkTechPost —
original
