DEV Community

Cover image for What Happens When Every AI Tool You Use Shares One Brain?
Jason Agostoni
Jason Agostoni

Posted on Originally published at jason.agostoni.net

What Happens When Every AI Tool You Use Shares One Brain?

I was working across a growing pile of AI tools, and each one built its own little fiefdom of knowledge. Claude had Projects, Perplexity had Spaces, and my coding agents knew whatever happened to be on the local filesystem. My notes and todo lists lived in Obsidian, my bright ideas in AI "projects," and my coding ideas in chat history I could never find. Each tool knew exactly what I'd told it in that session and nothing more, so every new conversation started with me re-explaining the history of what I was doing.

Then my colleague and friend Siva showed me his second brain. He'd built his on Notion, wired his AI tools into it, automated capturing information, and could ask questions against everything he'd collected. I had to have one.

But not his... My constraints ruled his out (and I just had to be different, because). No new notetaking tool: I already lived in Obsidian and wasn't migrating (again). No cloud subscription to glue it together. And whatever I built had to run on my home server, because I run one anyway and self-hosting is half the fun (pain?).

What I ended up with is a plain folder of Markdown files fronted by a Model Context Protocol (MCP) server that lets any AI agent read and search it, synced to my devices through Obsidian Sync. My personal AI tools now share one brain. What follows is how I built it, what I almost built instead, and what a month of living with it has been like.

Key insights

  • It works way better than I anticipated. Agents move around the vault comfortably, powered mostly by keyword (lexical) and semantic search covering for each other: one finds the exact phrase, the other lets me be vague and "let the AI figure it out."

  • Plain Markdown turned out to be the universal language between AI and human. Every tool reads it, every tool writes it, and I can open any note myself without going through an agent.

  • A month in, the vault powers all my side quests and personal knowledge work, and I can't work without it now.

What I considered

The AI-first memory platforms. Tools like mem0, Supermemory, or LangMem pitch themselves as second brains, but they're built as memory for agents: the AI reads and writes, and human interaction isn't at the forefront. Those have real value, and I even piloted mem0, but I wanted a personal wiki I could browse and edit myself.

The Obsidian MCP servers. Since my notes already lived in Obsidian, this looked like the shortest path. However, everything I found either required the Obsidian desktop app running (via the Local REST API plugin), spoke stdio only, or needed a proxy bridge glued on top. All I really needed was a Markdown MCP: something that treats a folder of Markdown files as the vault, with search and auth. Requiring a desktop app to keep a headless server alive sounded fragile (which is what Notion solves out of the box, FWIW).

Cloud-native platforms. Notion and friends are probably the fastest way to get going, but adopting one meant a new notetaking tool and a cloud subscription: the two constraints I started with. Everything I had lived in Obsidian, so "quick to start" would have come with a migration attached and a bill.

Nothing really fit, so I assembled my own stack.

The build

The assembled stack is one Docker Compose file on my home server, three services:

services:
  mcp:         # markdown-vault-mcp: serves the vault over MCP, with search
  sync:        # obsidian-headless CLI in a Node container: keeps my devices in sync
  cloudflared: # Cloudflare Tunnel connector: outbound-only exposure
Enter fullscreen mode Exit fullscreen mode

(Trimmed for print. The real one has the usual volumes, env vars, and healthchecks.)

The mcp service runs markdown-vault-mcp, an open-source MCP server that treats a plain folder of Markdown files as the vault. It adds keyword search via FTS5, and pointing it at an embedding model adds semantic search; embedding the entire vault costs pennies. The sync service runs the official obsidian-headless CLI against the Obsidian Sync subscription I already had, so anything an agent writes lands on my phone and laptops like any other note. I did have to do an initial "login and setup" ritual inside the sync container, but it has run seamlessly since.

The cloudflared service deserves some emphasis. A Cloudflare Tunnel is outbound-only: my server calls out to Cloudflare, so there are no inbound ports to open and no public IP to worry about. When the stack is down, nothing is exposed at all, which is way better than leaving a forwarded port hanging around "temporarily" for months.

For auth, I didn't want to hand a pre-shared API key to every tool I connect, so I put OAuth in front of it through Google, using my GCP account. Connecting a new tool now means a Google login instead of a copy-pasted secret.

Two key decisions I made. The MCP server mounts only a subfolder of the vault, so agents can't see (ruin) anything outside it, while the sync service mounts the root. Consistency across tools lives in the vault itself: an AGENTS.md at the root, plus instructions the server ships to every client when it connects. Consistent rules across agents for consistent results.

One side confession: in the first days, performance was awful, so I spent way too much time blaming a non-existent Cloudflare outage instead of the actual culprit: the Rancher Desktop VM was undersized for the vault and everything else running on it. Scaled it up, and the flakiness vanished.

Connecting the agents

With the stack running, connecting a tool is routine: add an MCP connector, auth with Google, start hoarding brilliant ideas and lists. I connected Perplexity right away and it's been my primary workhorse since. Grok, Antigravity, and GitHub Copilot quickly followed, so I could take one of those ideas to implementation. Gemini Spark is connected too, though it's only run simple tests so far.

I did not connect Claude and Claude Code. Those are work tools, and I try my best to keep work and personal systems apart. All of my clients now have their own AI use policies, security requirements, NDAs and more, so having their IP leak into a side quest would be bad.

Since the server ships the same instructions to every client at connect time, each tool plays by the same rules. When I change the rules, I change them once. This was one of the wise decisions from the OG designers of MCP.

A month in

The vault has settled in as the default starting point for my side quests. Every project gets its own notes, so picking a quest back up after weeks of neglect no longer means digging through extensive chat histories. My to-do list lives there, and so does the running list of "brilliant ideas," which grows much faster than I'll ever build them.

The surprise of the project has been the search. I expected the agents to churn and waste tokens mining data from the vault. The pairing of keyword and semantic search is the true power behind it. I can just describe what a note is about rather than what it says, and the agent finds it every time.

A folder of Markdown files, a sync container, and a tunnel gave every AI tool I use a shared memory that I can read myself. Total spend: a few pennies of embeddings, since everything else runs on subscriptions and hardware I already had. If your AI tools each keep their own little fiefdom, stand up your own stack!

Top comments (0)