<?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: Fex Beck</title>
    <description>The latest articles on DEV Community by Fex Beck (@fex_beck_27bfd4dccd05f062).</description>
    <link>https://dev.to/fex_beck_27bfd4dccd05f062</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%2F3868473%2F922afe48-56fe-41a5-9482-3441b3f31a8e.png</url>
      <title>DEV Community: Fex Beck</title>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fex_beck_27bfd4dccd05f062"/>
    <language>en</language>
    <item>
      <title>How to give Claude Code persistent memory with 51 MCP tools</title>
      <dc:creator>Fex Beck</dc:creator>
      <pubDate>Wed, 08 Apr 2026 20:40:47 +0000</pubDate>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062/how-to-give-claude-code-persistent-memory-with-51-mcp-tools-3h2f</link>
      <guid>https://dev.to/fex_beck_27bfd4dccd05f062/how-to-give-claude-code-persistent-memory-with-51-mcp-tools-3h2f</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Claude Code uses MEMORY.md files for persistence. 200-line limit, no search, no validation, no multi-agent support. After months of fighting this, I built BrainDB.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup (2 minutes)
&lt;/h2&gt;

&lt;p&gt;Clone, configure, start:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/beckfexx/BrainDB.git
cd BrainDB &amp;amp;&amp;amp; cp .env.example .env
bun install &amp;amp;&amp;amp; bun run start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add to your MCP config (Claude Code settings):&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{&lt;br&gt;
  "mcpServers": {&lt;br&gt;
    "braindb": {&lt;br&gt;
      "command": "bun",&lt;br&gt;
      "args": ["run", "src/mcp-client.ts"],&lt;br&gt;
      "env": { "BRAINDB_URL": "&lt;a href="http://localhost:3197" rel="noopener noreferrer"&gt;http://localhost:3197&lt;/a&gt;" }&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  What you get (51 tools)&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Smart Context&lt;/strong&gt; — Claude loads relevant memories based on CWD and git branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decisions that stick&lt;/strong&gt; — Authoritative memories that supersede conflicting old ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session Handovers&lt;/strong&gt; — Pass context to the next session seamlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contradiction Detection&lt;/strong&gt; — Flags conflicting stored facts automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nightly Self-Learning&lt;/strong&gt; — Validates memories against web sources overnight.&lt;/p&gt;

&lt;h2&gt;
  
  
  MEMORY.md vs BrainDB
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;MEMORY.md&lt;/th&gt;
&lt;th&gt;BrainDB&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Search&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;FTS5 + embeddings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Capacity&lt;/td&gt;
&lt;td&gt;200 lines&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Nightly fact-checking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-agent&lt;/td&gt;
&lt;td&gt;File conflicts&lt;/td&gt;
&lt;td&gt;Claims + handovers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contradictions&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;Auto-detected&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The 51 Tools grouped
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Memory&lt;/strong&gt; (15): remember, recall, forget, decide, context, validate, learn...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search&lt;/strong&gt; (5): semantic-search, hybrid-search, embeddings...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents&lt;/strong&gt; (8): heartbeat, claim, release, handover, inbox...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph&lt;/strong&gt; (10): entities, relations, contradictions...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System&lt;/strong&gt; (8): health, stats, backup, capabilities...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inception&lt;/strong&gt; (5): dream, decay, inception findings...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every tool Claude Code needs for real persistent memory. No more MEMORY.md limitations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/beckfexx/BrainDB" rel="noopener noreferrer"&gt;GitHub: beckfexx/BrainDB&lt;/a&gt; — AGPL-3.0, TypeScript.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>mcp</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why SQLite+FTS5 beats Vector DBs for AI Agent Memory</title>
      <dc:creator>Fex Beck</dc:creator>
      <pubDate>Wed, 08 Apr 2026 20:40:09 +0000</pubDate>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062/why-sqlitefts5-beats-vector-dbs-for-ai-agent-memory-4inj</link>
      <guid>https://dev.to/fex_beck_27bfd4dccd05f062/why-sqlitefts5-beats-vector-dbs-for-ai-agent-memory-4inj</guid>
      <description>&lt;h2&gt;
  
  
  The conventional wisdom is wrong
&lt;/h2&gt;

&lt;p&gt;Everyone says you need a vector database for AI memory. Pinecone, Weaviate, Qdrant. They all need a server, an API key, and a monthly bill.&lt;/p&gt;

&lt;p&gt;I went a different way: &lt;strong&gt;SQLite + FTS5&lt;/strong&gt;. One file. Zero dependencies. Better results.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;BrainDB stores 4,300+ memories in a single SQLite file with three search modes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Full-text search (FTS5)&lt;/strong&gt; — Sub-millisecond keyword search with BM25 ranking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Embedding similarity&lt;/strong&gt; — 384-dim vectors stored as BLOBs, cosine similarity computed in TypeScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Hybrid search&lt;/strong&gt; — Reciprocal Rank Fusion combines both for best-of-both-worlds retrieval.&lt;/p&gt;

&lt;h2&gt;
  
  
  Custom relevance scoring
&lt;/h2&gt;

&lt;p&gt;SQLite custom functions run type-aware ranking inside the database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decisions get +0.3 boost (authoritative)&lt;/li&gt;
&lt;li&gt;Issues get -0.1 (often resolved)&lt;/li&gt;
&lt;li&gt;Superseded memories return 0&lt;/li&gt;
&lt;li&gt;Exponential time decay with type-specific half-lives&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;SQLite+FTS5&lt;/th&gt;
&lt;th&gt;Pinecone Free&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Latency&lt;/td&gt;
&lt;td&gt;&amp;lt;1ms&lt;/td&gt;
&lt;td&gt;50-200ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Setup&lt;/td&gt;
&lt;td&gt;0 minutes&lt;/td&gt;
&lt;td&gt;15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$0-70/mo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backup&lt;/td&gt;
&lt;td&gt;cp file.db backup.db&lt;/td&gt;
&lt;td&gt;API call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Offline&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;For most AI agent memory use cases, SQLite is the right choice.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/beckfexx/BrainDB" rel="noopener noreferrer"&gt;Try it: github.com/beckfexx/BrainDB&lt;/a&gt; — AGPL-3.0, TypeScript, Bun.&lt;/p&gt;

</description>
      <category>sqlite</category>
      <category>ai</category>
      <category>vectordatabase</category>
      <category>typescript</category>
    </item>
    <item>
      <title>I built an AI memory that fact-checks itself while you sleep</title>
      <dc:creator>Fex Beck</dc:creator>
      <pubDate>Wed, 08 Apr 2026 19:45:46 +0000</pubDate>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062/i-built-an-ai-memory-that-fact-checks-itself-while-you-sleep-29mj</link>
      <guid>https://dev.to/fex_beck_27bfd4dccd05f062/i-built-an-ai-memory-that-fact-checks-itself-while-you-sleep-29mj</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;AI agents forget everything between sessions. Claude Code uses MEMORY.md files — a 200-line limit, no search, no validation. After months of manually maintaining memory files, I built something better.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is BrainDB?
&lt;/h2&gt;

&lt;p&gt;BrainDB is a &lt;strong&gt;local-first AI memory system&lt;/strong&gt; built on SQLite. No cloud, no vector database, no subscriptions. One SQLite file, 110 REST endpoints, 51 MCP tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why SQLite instead of Pinecone/Weaviate?
&lt;/h3&gt;

&lt;p&gt;SQLite with FTS5 gives you sub-millisecond full-text search with BM25 ranking. Combined with embedding vectors (stored as BLOBs), you get &lt;strong&gt;hybrid search&lt;/strong&gt; — keyword precision + semantic understanding. For &amp;lt;100k memories, this beats any managed vector DB in latency and simplicity.&lt;/p&gt;

&lt;h3&gt;
  
  
  The killer features nobody else has
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Inception — Nightly fact-checking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every night, BrainDB picks high-importance memories, generates search queries, searches the web via SearXNG, and fact-checks them with an LLM. Last run found 26 outdated facts automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[inception] Processing: "PostgreSQL default port is 5433"
[inception] Web search: 3 results confirm port 5432
[inception] Result: CONTRADICTION — stored fact is wrong
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. autoDream — Knowledge consolidation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While you sleep, BrainDB merges duplicate memories, archives stale ones, and adjusts importance scores. Like defragmenting your AI's brain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Multi-agent coordination&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multiple AI agents can share the same memory with pessimistic locking (claims), context handovers, heartbeat monitoring, and a signal protocol. No conflicts, no data races.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MCP Client (Claude/Cursor) → MCP Server → REST API → SQLite+FTS5
                                              ↓
                                    Ollama (local embeddings)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7 route modules: Memory, Search, Agents, Graph, Orchestrator, System, Inception.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relevance Scoring
&lt;/h3&gt;

&lt;p&gt;Custom SQLite function with type-aware ranking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decisions get +0.3 boost (authoritative)&lt;/li&gt;
&lt;li&gt;Issues get -0.1 (often resolved)&lt;/li&gt;
&lt;li&gt;Superseded memories return 0 (replaced by newer version)&lt;/li&gt;
&lt;li&gt;Exponential time decay with type-specific half-lives&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/beckfexx/BrainDB.git
&lt;span class="nb"&gt;cd &lt;/span&gt;BrainDB &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
bun &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; bun run start
&lt;span class="c"&gt;# → http://localhost:3197/health&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or with Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4,300+ memories&lt;/strong&gt; in production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;110 REST endpoints&lt;/strong&gt; across 7 domain modules&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;51 MCP tools&lt;/strong&gt; for Claude Code / Cursor&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;0 TypeScript errors&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AGPL-3.0&lt;/strong&gt; — free for self-hosting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Compared to alternatives
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;BrainDB&lt;/th&gt;
&lt;th&gt;MemPalace&lt;/th&gt;
&lt;th&gt;LangChain Memory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hybrid search (FTS5+embeddings)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-learning (Inception)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-agent coordination&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;⚠️ Basic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local-first (no cloud)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Knowledge graph&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production-tested&lt;/td&gt;
&lt;td&gt;✅ 4.3k memories&lt;/td&gt;
&lt;td&gt;Demo only&lt;/td&gt;
&lt;td&gt;Framework&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/beckfexx/BrainDB" rel="noopener noreferrer"&gt;beckfexx/BrainDB&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback welcome. This is a solo project — every star, issue, or PR helps.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>sqlite</category>
      <category>typescript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
