<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fabio Nonato</title>
    <description>The latest articles on DEV Community by Fabio Nonato (@nonatofabio_28).</description>
    <link>https://dev.to/nonatofabio_28</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F694694%2Fdc798bef-dc56-46a4-aa60-dccf7b7d1f8f.jpeg</url>
      <title>DEV Community: Fabio Nonato</title>
      <link>https://dev.to/nonatofabio_28</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nonatofabio_28"/>
    <language>en</language>
    <item>
      <title>How to give Claude "Long Term Memory" of your local files (No Docker required)</title>
      <dc:creator>Fabio Nonato</dc:creator>
      <pubDate>Wed, 10 Dec 2025 07:29:48 +0000</pubDate>
      <link>https://dev.to/nonatofabio_28/how-to-give-claude-long-term-memory-of-your-local-files-no-docker-required-57o2</link>
      <guid>https://dev.to/nonatofabio_28/how-to-give-claude-long-term-memory-of-your-local-files-no-docker-required-57o2</guid>
      <description>&lt;h3&gt;
  
  
  The Problem: RAG is too hard
&lt;/h3&gt;

&lt;p&gt;I have a folder of 50+ PDFs—technical specs, old logs, and some... &lt;em&gt;interesting&lt;/em&gt; declassified government documents.&lt;/p&gt;

&lt;p&gt;I want to open Claude and ask: &lt;em&gt;"What happened in the 1952 sightings?"&lt;/em&gt; and have it answer using &lt;strong&gt;my&lt;/strong&gt; files.&lt;/p&gt;

&lt;p&gt;The standard advice for this is a nightmare:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Spin up a Docker container (Chroma/Qdrant).&lt;/li&gt;
&lt;li&gt; Write a Python script to parse PDFs (LangChain/LlamaIndex).&lt;/li&gt;
&lt;li&gt; Set up an API server to bridge it to the LLM.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExZDg3czZtbHQ4ejF0bTQyZnF4bTFqbTJyNGN0djR6ZGRvbWRsa3BqcyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FAPqEbxBsVlkWSuFpth%2Fgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExZDg3czZtbHQ4ejF0bTQyZnF4bTFqbTJyNGN0djR6ZGRvbWRsa3BqcyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FAPqEbxBsVlkWSuFpth%2Fgiphy.gif" width="434" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;People turned "Ctrl+F with semantics" into a distributed systems architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: &lt;code&gt;local-faiss-mcp&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;I got tired of the bloat, so I built &lt;a href="https://github.com/nonatofabio/local_faiss_mcp" rel="noopener noreferrer"&gt;local-faiss-mcp&lt;/a&gt;. It’s a CLI tool that runs 100% locally.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No Docker:&lt;/strong&gt; Just a Python script.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No API Keys:&lt;/strong&gt; Uses local embeddings (&lt;code&gt;all-MiniLM-L6-v2&lt;/code&gt;) and FAISS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Native:&lt;/strong&gt; Connects directly to Claude Desktop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is how to set it up in 5 minutes.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 1: Get some "Cool" Data
&lt;/h3&gt;

&lt;p&gt;To test a RAG system, you need real-world data. Let's use the &lt;strong&gt;ODNI Preliminary Assessment on Unidentified Aerial Phenomena&lt;/strong&gt;. It’s declassified, text-heavy, and full of weird military jargon—perfect for testing semantic search.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Create a folder: &lt;code&gt;mkdir ~/ufo_docs&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt; Download this PDF: &lt;a href="https://www.dni.gov/files/ODNI/documents/assessments/Prelimary-Assessment-UAP-20210625.pdf" rel="noopener noreferrer"&gt;ODNI Preliminary Assessment 2021 (PDF)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;(Optional) Throw in the &lt;a href="https://www.404media.co/content/files/2025/02/simplesabotage.pdf" rel="noopener noreferrer"&gt;CIA Simple Sabotage Manual&lt;/a&gt; just for chaos.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 2: Install the Tool
&lt;/h3&gt;

&lt;p&gt;It’s a standard Python package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;local-faiss-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Index the Docs (The Magic Part)
&lt;/h3&gt;

&lt;p&gt;We used to have to write ingestion scripts. Now, we just use the CLI.&lt;/p&gt;

&lt;p&gt;Run this command to recursively index your new UFO folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;local-faiss index &lt;span class="s2"&gt;"~/ufo_docs/**/*.pdf"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see a progress bar as it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Reads the PDFs (using &lt;code&gt;pypdf&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt; Chunks the text.&lt;/li&gt;
&lt;li&gt; Calculates embeddings on your CPU.&lt;/li&gt;
&lt;li&gt; Saves a &lt;code&gt;.index&lt;/code&gt; file to your disk.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Done. You now have a vector database.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExa3BwMXJ1OWF3MTNvNGM2bzNlMjI3dHEwZG50azQzZXdwM3FxcTdtciZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F9r75ILTJtiDACKOKoY%2Fgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExa3BwMXJ1OWF3MTNvNGM2bzNlMjI3dHEwZG50azQzZXdwM3FxcTdtciZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F9r75ILTJtiDACKOKoY%2Fgiphy.gif" width="275" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Connect to Claude
&lt;/h3&gt;

&lt;p&gt;Open your Claude Desktop config file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mac:&lt;/strong&gt; &lt;code&gt;~/Library/Application Support/Claude/claude_desktop_config.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows:&lt;/strong&gt; &lt;code&gt;%APPDATA%\Claude\claude_desktop_config.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add this block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"local-faiss"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"local-faiss-mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"--index-dir"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"~/ufo_docs"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Claude. You should see a little "plug" icon indicate two tools are loaded: &lt;code&gt;ingest_document&lt;/code&gt; and &lt;code&gt;query_rag_store&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Or use &lt;code&gt;claude&lt;/code&gt; in the terminal directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Ask Questions
&lt;/h3&gt;

&lt;p&gt;Now for the fun part. Open Claude and ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Using your local faiss knowledge: Does the Pentagon's refusal to answer questions in the UAP Hearing count as 'General Interference with Organizations'?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Call &lt;code&gt;query_rag_store&lt;/code&gt; with your question.&lt;/li&gt;
&lt;li&gt; The CLI will search your FAISS index and return the top N chunks.&lt;/li&gt;
&lt;li&gt; Claude will synthesize the answer with citations.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExa2g1bXFxZjM1OWVidno0M2Rzd25teWF6enRxbG8xdmdxeDh1M25hMyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FRxumQ0UcdXLX5ntURY%2Fgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExa2g1bXFxZjM1OWVidno0M2Rzd25teWF6enRxbG8xdmdxeDh1M25hMyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FRxumQ0UcdXLX5ntURY%2Fgiphy.gif" width="480" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced: Enabling "God Mode" (Re-ranking)
&lt;/h3&gt;

&lt;p&gt;If your dataset is huge, standard vector search can sometimes be "fuzzy." You might ask about "Project Mogul" and get results about "Project Grudge."&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;v0.2.0&lt;/strong&gt;, I added &lt;strong&gt;Re-ranking&lt;/strong&gt;. This uses a second, smarter model (CrossEncoder) to double-check the results before giving them to Claude.&lt;/p&gt;

&lt;p&gt;Update your config to enable it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"--index-dir"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"~/ufo_docs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"--rerank"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the accuracy is much better, running entirely on your laptop.&lt;/p&gt;




&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;We don't need Kubernetes to chat with a PDF. We just need a good CLI.&lt;/p&gt;

&lt;p&gt;If you try this out with your own docs (or the UFO files!), let me know how the re-ranking performs for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔗 Repo:&lt;/strong&gt; &lt;a href="https://github.com/nonatofabio/local_faiss_mcp" rel="noopener noreferrer"&gt;github.com/nonatofabio/local_faiss_mcp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>mcp</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
