<?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: lobrzut</title>
    <description>The latest articles on DEV Community by lobrzut (@lobrzut).</description>
    <link>https://dev.to/lobrzut</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3989520%2F691a5e25-9a3a-449b-b466-627336ced00d.jpeg</url>
      <title>DEV Community: lobrzut</title>
      <link>https://dev.to/lobrzut</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lobrzut"/>
    <language>en</language>
    <item>
      <title>Self-hosted second brain with MCP</title>
      <dc:creator>lobrzut</dc:creator>
      <pubDate>Wed, 17 Jun 2026 17:11:21 +0000</pubDate>
      <link>https://dev.to/lobrzut/self-hosted-second-brain-with-mcp-59d4</link>
      <guid>https://dev.to/lobrzut/self-hosted-second-brain-with-mcp-59d4</guid>
      <description>&lt;p&gt;I run IT and cybersecurity ops by day and tinker in a homelab at night. The problem I kept hitting: useful context from Cursor and Claude Code sessions evaporates when the chat ends. Notes end up scattered. RAG demos are cloud-first. I wanted something I own.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://github.com/lobrzut/brain" rel="noopener noreferrer"&gt;Brain AI Hub&lt;/a&gt;: a portable second brain with a local LLM, markdown vault, semantic search, and MCP hooks for IDE agents.&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local LLM&lt;/strong&gt; - Ollama (qwen2.5, nomic-embed). OpenAI-compatible API on &lt;code&gt;:11434&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowledge store&lt;/strong&gt; - Obsidian-style vault, PDF/EPUB library, sqlite-vec RAG, lightweight knowledge graph.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent bridge&lt;/strong&gt; - three MCP servers (&lt;code&gt;brain-vault&lt;/code&gt;, &lt;code&gt;brain-library&lt;/code&gt;, &lt;code&gt;brain-rag&lt;/code&gt;) with one-click deploy to Cursor, Claude Code, VS Code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transcript pipeline&lt;/strong&gt; - distills exports from Claude/Cursor/Antigravity into vault markdown, dedupes, indexes code, runs scheduled jobs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dashboard&lt;/strong&gt; - FastAPI UI on &lt;code&gt;:7860&lt;/code&gt; for services, chat, GPU/VRAM, API keys, pipeline status.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Two editions
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Edition&lt;/th&gt;
&lt;th&gt;Install&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Windows portable&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Install.bat&lt;/code&gt; then &lt;code&gt;Start.bat&lt;/code&gt; - copy the folder, run on another PC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Linux server&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Run &lt;code&gt;linux/bootstrap.sh&lt;/code&gt; on the server (see repo README) - MCP SSE gateway on &lt;code&gt;:7862&lt;/code&gt; for LAN clients&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Install scripts speak English and Polish. Set &lt;code&gt;LANG=en&lt;/code&gt; or &lt;code&gt;LANG=pl&lt;/code&gt; in &lt;code&gt;locale.env&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  MCP in practice
&lt;/h2&gt;

&lt;p&gt;On Windows, Brain deploys stdio MCP configs from the dashboard. On Linux, point Cursor at the SSE gateway:&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;"brain-rag"&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;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://192.168.1.10:7862/sse/brain-rag"&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;Agents can search your vault, pull library chunks, and run skills without sending data to a third-party memory API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why MCP instead of only RAG?
&lt;/h2&gt;

&lt;p&gt;RAG answers retrieval. MCP gives agents &lt;strong&gt;tools&lt;/strong&gt;: write a note, list vault files, trigger a skill, query the code index. That matches how Cursor and Claude Code actually work: function calls mid-session, not a single embedding search at prompt time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;Python, FastAPI, Ollama, sqlite-vec, PowerShell (Windows), systemd (Linux). Homelab-friendly: MikroTik/UniFi networking, WireGuard, Docker where it helps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&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/lobrzut/brain.git
&lt;span class="nb"&gt;cd &lt;/span&gt;brain
&lt;span class="c"&gt;# Windows: Install.bat &amp;amp;&amp;amp; Start.bat&lt;/span&gt;
&lt;span class="c"&gt;# Linux:  curl -fsSL https://raw.githubusercontent.com/lobrzut/brain/main/linux/bootstrap.sh | sudo bash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;http://127.0.0.1:7860&lt;/code&gt;, connect MCP from the Tools tab, drop a PDF in the library, run a distill job on an old chat export.&lt;/p&gt;

&lt;p&gt;Feedback and issues welcome on &lt;a href="https://github.com/lobrzut/brain" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>rag</category>
      <category>ollama</category>
      <category>homelab</category>
    </item>
  </channel>
</rss>
