<?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: Rahil Pirani</title>
    <description>The latest articles on DEV Community by Rahil Pirani (@rahil_pirani_c48446facc8c).</description>
    <link>https://dev.to/rahil_pirani_c48446facc8c</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%2F3922851%2F562316ad-6070-4ae8-9c4c-772035064295.png</url>
      <title>DEV Community: Rahil Pirani</title>
      <link>https://dev.to/rahil_pirani_c48446facc8c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rahil_pirani_c48446facc8c"/>
    <language>en</language>
    <item>
      <title>I gave Claude a persistent memory for $0/month using Cloudflare</title>
      <dc:creator>Rahil Pirani</dc:creator>
      <pubDate>Sun, 10 May 2026 05:35:41 +0000</pubDate>
      <link>https://dev.to/rahil_pirani_c48446facc8c/i-gave-claude-a-persistent-memory-for-0month-using-cloudflare-2e5a</link>
      <guid>https://dev.to/rahil_pirani_c48446facc8c/i-gave-claude-a-persistent-memory-for-0month-using-cloudflare-2e5a</guid>
      <description>&lt;h1&gt;
  
  
  I gave Claude a persistent memory for $0/month using Cloudflare
&lt;/h1&gt;

&lt;p&gt;Claude is great. But every time you start a new conversation, it forgets everything. Your projects, your preferences, what you decided last week — gone.&lt;/p&gt;

&lt;p&gt;The official memory feature exists, but it's vague and you can't really control it. You can't query it, tag it, or search it semantically. It's a black box that occasionally surfaces something useful.&lt;/p&gt;

&lt;p&gt;So I built my own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is
&lt;/h2&gt;

&lt;p&gt;It's a self-hosted MCP server that runs on Cloudflare Workers. Four tools: &lt;code&gt;remember&lt;/code&gt;, &lt;code&gt;recall&lt;/code&gt;, &lt;code&gt;list_recent&lt;/code&gt;, &lt;code&gt;forget&lt;/code&gt;. Claude calls them automatically. You never think about it.&lt;/p&gt;

&lt;p&gt;The interesting part is how recall works — it's not keyword search. Every note gets embedded as a 384-dimensional vector using &lt;code&gt;bge-small-en-v1.5&lt;/code&gt; on Workers AI. When you ask Claude something, it searches by &lt;em&gt;meaning&lt;/em&gt;, not exact words.&lt;/p&gt;

&lt;p&gt;Store: &lt;em&gt;"users drop off at the payment step."&lt;/em&gt;&lt;br&gt;&lt;br&gt;
Query: &lt;em&gt;"onboarding problems."&lt;/em&gt;&lt;br&gt;&lt;br&gt;
It finds it. No keyword overlap needed.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Cloudflare
&lt;/h2&gt;

&lt;p&gt;Honestly, cost. The whole stack — Workers, D1 (SQLite), Vectorize, Workers AI embeddings — runs on Cloudflare's free tier at personal scale. You don't even need a credit card to get started.&lt;/p&gt;

&lt;p&gt;The other reason is deployment. There's a one-click deploy button that provisions everything automatically. It takes about 3 minutes to go from zero to a running second brain connected to Claude Desktop.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to set it up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Deploy&lt;/strong&gt; — click the button in the repo, Cloudflare provisions D1 + Vectorize and deploys the Worker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Run the schema&lt;/strong&gt; — one SQL snippet in the Cloudflare dashboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Set your auth token&lt;/strong&gt; — one command with wrangler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Connect Claude Desktop&lt;/strong&gt; — add a few lines to your config JSON:&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;"second-brain"&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;"npx"&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;"mcp-remote"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://&amp;lt;your-worker-url&amp;gt;/mcp"&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;That's it. Claude now has persistent memory across every conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I actually use it for
&lt;/h2&gt;

&lt;p&gt;I have Claude set up to call &lt;code&gt;recall&lt;/code&gt; at the start of every conversation, before it says anything. So when I open a new chat and say "continue the onboarding work from last week," it already knows what that means.&lt;/p&gt;

&lt;p&gt;I also capture from everywhere — there's a browser bookmarklet that saves any highlighted text or page with one click, and iOS Shortcuts for voice capture on the go. "Hey Siri, brain dump" and I can dictate a note that shows up in Claude's memory immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't do (yet)
&lt;/h2&gt;

&lt;p&gt;There's no UI for browsing your memory. You can hit the &lt;code&gt;/list&lt;/code&gt; endpoint, but it's raw JSON. I want to build a proper dashboard eventually — something that shows your memory visually, lets you edit or delete entries, maybe shows what Claude has recalled most often.&lt;/p&gt;

&lt;p&gt;Also, the local dev experience is slightly annoying because Vectorize and Workers AI don't run locally — you end up pointing at remote resources for real testing. Not a dealbreaker, but worth knowing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The repo
&lt;/h2&gt;

&lt;p&gt;Everything is open source under MIT. One-click deploy, manual setup instructions, iOS Shortcuts templates, bookmarklet source — it's all there.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://github.com/rahilp/second-brain-cloudflare" rel="noopener noreferrer"&gt;github.com/rahilp/second-brain-cloudflare&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you use it, I'd genuinely like to know what you end up storing in it. That's the part I'm most curious about — what people actually find worth remembering.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>cloudflare</category>
      <category>mcp</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
