Close Menu
NCIJ Network NCIJ Network
    What's Hot

    Boba pearls aren’t made from rabbit poop, despite unpleasant video

    July 30, 2026

    Poland’s Leader Says Russian Missile May Have Struck Its Territory During Ukraine Attack

    July 30, 2026

    Fifa World Cup plans: First lot of private cash could be received by end of October

    July 30, 2026
    Facebook X (Twitter) Instagram
    Trending
    • Boba pearls aren’t made from rabbit poop, despite unpleasant video
    • Poland’s Leader Says Russian Missile May Have Struck Its Territory During Ukraine Attack
    • Fifa World Cup plans: First lot of private cash could be received by end of October
    • After Obamacare Cuts, Hospitals Are Treating More Uninsured Patients
    • How Haley Stevens’s Accent Became a Flashpoint in Michigan’s Senate Race
    • OpenAI’s Hacking Debacle Was a Human Mistake
    • Tencent Open-Sources AngelSpec: A Unified Training Framework for MTP and Block-Parallel Speculative Decoding on Hy3 Models
    • Critical Ruflo Flaw Lets Attackers Spawn Rogue AI Swarms 
    • About
      • Our Team
      • Editorial Policy
      • Editorial Independence
      • International Support
    • Trust & Standards
      • AI Usage Policy
      • Conflict of Interest Policy
      • Corrections Policy
      • Ethics Policy
      • Fact-Checking Policy
      • Source Protection
    • Get Involved
      • Guide for Sources
      • Support Independent Journalism
    • Legal
      • Cookie Policy
      • Privacy Policy
      • Terms of Use
    Facebook X (Twitter) Instagram
    NCIJ Network NCIJ Network
    Thursday, July 30
    • Home
    • World
    • Ai
    • Business
    • Politics
    • Health
    • Crypto
    • Science
    • Technology
    • Cybersecurity
    • Defense & Security
    • Economy
    • Energy
    • Europe
    • More
      • Fact Check
      • Investigations
      • Opinion & Analysis
      • Environment
    NCIJ Network NCIJ Network
    Home»Artificial Intelligence

    Meet Token Saver: An Open-Source MCP Extension Using Local Hybrid RAG to Cut Claude PDF Token Costs 90-99%

    NCIJ NETWNCIJ NETWORKBy NCIJ NETWNCIJ NETWORKJuly 30, 2026 Artificial Intelligence No Comments7 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email

    AI developers, researchers, and professionals frequently hit a frustrating wall when analyzing large documents with LLMs: the hidden, compounding cost of context windows. Pasting a 200-page PDF into a chat isn’t a one-time charge. Because the conversation history is re-sent to the model on every single turn, that massive document is paid for again with every follow-up question.

    Marktechpost AI team just released Token Saver, an open-source Model Context Protocol (MCP) extension for Claude Desktop (MIT licensed, currently at v1.0). It was developed at Marktechpost AI Media Inc by Arnav Rai (CS student at Rochester Institute of Technology) during his internship at Marktechpost, supervised by Jean-marc Mommessin and Asif Razzaq. Token Saver fundamentally changes how Claude interacts with local documents. By implementing a Local Hybrid RAG (system directly on your machine, it allows you to ask questions about massive PDFs without ever uploading the actual file to the model.

    Token consumption is slashed by 92% to 99%, privacy is guaranteed, and setup requires exactly zero Python environments or terminal configurations.

    How it looks!

    The Hidden Token Drain of Large PDFs

    Most users assume that when they drop a PDF into Claude, it simply extracts the text. In reality, Claude’s default behavior converts each page into an image to preserve charts and layouts, while separately extracting text. Before a single image token is even counted, the text alone can run 1,500 to 3,000 tokens per page.

    While Prompt Caching and Claude Projects help soften this blow, they don’t solve the core issue: the entire document still crosses the boundary to the provider’s servers. Furthermore, if you only need two relevant paragraphs from a 1,000-page textbook, forcing the LLM to search the entire 1,000 pages itself is both inefficient and prone to hallucination.

    How Local Hybrid RAG Solves the Problem

    Marktechpost’s Token Saver acts as a local MCP server : a lightweight background program on your machine that Claude can call as a tool. The PDF never leaves your hard drive.

    When you ask a question, Token Saver utilizes Local Hybrid RAG to find the answer. Hybrid RAG is the gold standard for document retrieval because it combines two powerful search methods:

    1. Keyword Matching (BM25): Runs over SQLite’s built-in FTS5 search (weighted at 0.4) to find exact terminology.
    2. Semantic Search (Cosine Similarity): Uses a local all-MiniLM-L6-v2 embedding model (weighted at 0.6) to understand the meaning of your question, rather than just matching exact words.

    By blending these two approaches locally, the server searches the file and hands Claude only the highly relevant passages. Claude then synthesizes the answer, citing the exact page numbers and providing a running tally of the tokens you just saved.

    The 8-Stage Processing Pipeline

    Token Saver runs entirely inside a single, long-running local process. Before any text reaches Claude, the local Hybrid RAG pipeline executes eight rapid steps:

    1. Extract: Uses pypdfium2 (with pypdf as a fallback) to pull text.
    2. Chunk: Splits text into 180-word passages, overlapping by 40 words so context is never blindly cut.
    3. Score (Hybrid RAG): Evaluates chunks using the blended BM25 and local embedding model.
    4. Gate: Enforces a quality threshold. Passages sharing no exact keywords must pass a semantic similarity floor of 0.25 to qualify.
    5. Deduplicate: Drops near-identical passages.
    6. Trim: Narrows the passage down strictly to the sentences that answer the user’s prompt.
    7. Budget: Caps the total payload sent to Claude at 8,000 characters.
    8. Envelope: Wraps the retrieved text in a document-chunk element containing the source file and precise page number.

    (Note: The embedding model is optional but recommended. If it fails to load, the system gracefully falls back to keyword-only matching).

    The Numbers: 99% Savings at Scale

    Because the Hybrid RAG pipeline caps the returned text slice, the token savings grow exponentially with the size of the document. Here is how Token Saver performed in benchmarking (measured via tiktoken, assuming one question per document):

    Document Pages Whole Doc Tokens Returned Tokens Tokens Saved
    FDA drug label 33 23,959 1,021 95.7%
    GDPR (EU 2016/679) 88 70,260 996 98.6%
    SFFA v. Harvard 233 133,349 740 99.4%

    Disclaimer: Token counts use cl100k_base as a stand-in, and baselines assume the whole document is charged on every search.

    For professionals working repeatedly with court opinions, technical standards, financial reports, or dense textbooks, Token Saver eliminates the repetitive token tax.

    Security and Local Privacy

    For enterprise users and legal professionals, data privacy is non-negotiable. Token Saver’s security model rests on three pillars:

    • Zero Uploads: The document never leaves your machine.
    • Folder Allowlisting: You configure a specific folder for Token Saver. The server will actively refuse to read files outside of this designated directory.
    • Network Isolation: The server communicates with Claude Desktop over standard I/O (stdio) only. There are no listening network ports, drastically reducing the attack surface.

    Model Performance: Sonnet vs. Opus

    Marktechpost’s Token Saver works across all three Claude 3.5 tiers, but testing revealed distinct behaviors:

    • Claude 3.5 Sonnet (Recommended): The sensible default. It handles loose file references perfectly, asks clarifying questions if two files have similar names, and correctly applies the retrieved page numbers.
    • Claude 3 Opus: Excels at complex documents with multiple voices (e.g., legal rulings with majority opinions and dissents). Opus is smart enough to flag when it infers an attribution based on context rather than explicit text.

    Getting Started in Minutes

    Unlike many open-source AI tools that require complex Python environments and JSON configurations, Token Saver is packaged as a single .mcpb bundle.

    1. Download token-saver-ccr.mcpb from the project’s GitHub Releases page.
    2. Open Claude Desktop -> Settings -> Extensions -> Install extension.
    3. Enable the extension, click Configure, and select a dedicated folder where you keep your reference PDFs.
    4. At the first prompt, choose Always allow.

    The extension will not run until a folder is chosen, because that single choice serves three purposes at once.

    That folder is worth a moment’s thought. It sets the boundary of what can be read, it is what lets you ask for a file by name instead of typing a path, and it is the list the server shows Claude when a conversation starts. A small folder holding only what you intend to ask about works considerably better than pointing it at all of Documents.

    Key Takeaways

    • Massive Cost Reduction: By using Local Hybrid RAG to pass only relevant paragraphs to the LLM, token costs drop by up to 99%. The longer the chat, the more you save.
    • Verifiable Accuracy: Because Token Saver attaches exact page numbers to every retrieved chunk, you can instantly verify Claude’s claims by opening your local PDF.
    • Absolute Privacy: The boundary is your local machine. Your proprietary data is never uploaded to an AI provider’s server.
    • Frictionless Setup: No Python required. A simple .mcpb file install gets you running in Claude Desktop instantly.

    Check out the GitHub Repo.

    References: MCP Bundle format | all-MiniLM-L6-v2 | pdfkb-mcp | wesleygriffin/pdfrag | Corpora: Dobbs v. Jackson Women’s Health Organization; Berkshire Hathaway 2023 Annual Report



    Arnav Rai

    Arnav is currently a student at Rochester Institute of Technology pursuing a Bachelor’s degree in Computer Science and a minor in Economics with hands-on backend development experience, and is a contributor at Marktechpost, where he writes about AI/ML research.



    Jean-marc is a successful AI business executive .He leads and accelerates growth for AI powered solutions and started a computer vision company in 2006. He is a recognized speaker at AI conferences and has an MBA from Stanford.



    Asif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of Artificial Intelligence for social good. His most recent endeavor is the launch of an Artificial Intelligence Media Platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is both technically sound and easily understandable by a wide audience. The platform boasts of over 2 million monthly views, illustrating its popularity among audiences.



    Claude costs cut Extension Hybrid local MCP Meet OpenSource PDF RAG Saver token
    NCIJ NETWNCIJ NETWORK
    • Website

    Keep Reading

    Tencent Open-Sources AngelSpec: A Unified Training Framework for MTP and Block-Parallel Speculative Decoding on Hy3 Models

    New fire satellites offer hope for Amazon and other biomes, but local barriers remain

    Moonshot AI Open-Sources MoonEP: A Perfectly Balanced Expert Parallelism Library for MoE Training

    Prompt Engineering vs Loop Engineering vs Graph Engineering: What Changes at Each Layer

    Ruflo MCP Flaw Lets Unauthenticated Attackers Run Commands and Poison AI Memory

    Morning Minute: Claude Mythos Breaks Post-Quantum Cryptography

    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    Boba pearls aren’t made from rabbit poop, despite unpleasant video

    July 30, 2026

    Poland’s Leader Says Russian Missile May Have Struck Its Territory During Ukraine Attack

    July 30, 2026

    Fifa World Cup plans: First lot of private cash could be received by end of October

    July 30, 2026

    After Obamacare Cuts, Hospitals Are Treating More Uninsured Patients

    July 30, 2026
    Latest Posts

    Who’s in Andy Burnham’s new Labour cabinet?

    July 22, 2026

    Streeting apologises after early prisoner release comments heard on mic

    July 22, 2026

    Mehr Risikokapital, mehr Rüstung – Reiches Start-up-Plan – POLITICO

    July 22, 2026

    Subscribe to News

    Get the latest sports news from NewsSite about world, sports and politics.

    NCIJ Network is an independent digital news platform delivering trusted investigative journalism, European and global news, in-depth analysis, and fact-based reporting with accuracy, transparency, and integrity.

    Facebook X (Twitter) Instagram Pinterest YouTube

    Boba pearls aren’t made from rabbit poop, despite unpleasant video

    July 30, 2026

    Poland’s Leader Says Russian Missile May Have Struck Its Territory During Ukraine Attack

    July 30, 2026

    Fifa World Cup plans: First lot of private cash could be received by end of October

    July 30, 2026

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Type above and press Enter to search. Press Esc to cancel.