r/coolgithubprojects • u/rahilpirani5 • Jun 28 '26
Built an open-source memory layer that gives Claude, ChatGPT, Cursor, and Codex one shared brain
Using multiple AI tools feels like working with five assistants who never talk to each other.
Claude knows one part of a project. ChatGPT remembers a preference. Cursor knows why the code changed. Codex starts from zero.
Eventually, I was spending more time reconstructing context than getting useful work done.
So I built the opposite.
Second Brain is a free, open-source memory layer that gives Claude, ChatGPT, Cursor, Codex, and other MCP-compatible tools access to the same persistent memory.
Your projects, decisions, preferences, and lessons can follow you between tools instead of being trapped inside one app.
The new version also turns those memories into a self-organizing knowledge graph.
When you save something, Second Brain can connect it to related memories automatically. Recall can then follow those relationships, so a question about a project might also surface:
- the decision you made
- why you made it
- the person or idea connected to it
- a later update that changed the plan
You do not need to remember the exact wording of the original note.
What you get
- One shared memory across your AI tools
- Semantic recall based on meaning, not exact keywords
- Automatic relationships between related memories
- Multi-hop recall for following connected context
- A graph view for exploring how memories fit together
- Tools to remember, recall, append, update, and forget
- Capture from the terminal, Obsidian, browser, iPhone, or directly inside an AI conversation
- MIT-licensed code running in your own Cloudflare account
There is no Second Brain subscription or product-imposed memory tier. Your data lives in your infrastructure. Cloudflare's normal quotas still apply.
Setup
Choose an authentication token
Deploy the Worker to your Cloudflare account
Add the `/mcp` URL to the AI clients you use
The basic deployment takes a couple of minutes. One honest caveat: Cloudflare may require a one-time Wrangler command to enable the Vectorize index if it is not provisioned automatically.
GitHub:
https://github.com/rahilp/second-brain-cloudflare
I would especially value feedback on the graph behavior.
Should relationships stay mostly automatic, or should users have more manual control? How many hops should recall follow before related context becomes noise?
1
u/WizardofYas Jun 28 '26
Hey dude, that sounds great, how about Deepseek and Gemini?
2
u/rahilpirani5 Jun 28 '26
As long as the client supports MCP, it’ll work. However you could use the CLI extension with it if you’re using Gemini CLI.
2
2
Jun 28 '26
[removed] — view removed comment
2
u/WizardofYas Jun 28 '26
Thank you so much for this! I'm trying to have a persistent memory between Gemini & Deepseek and within them too, for instance I want Deepseek to remember what we've built and etc. I also want to have this memory on cloud where I can reach from personal PC & work PC. What do you think 😊
0
u/Otherwise_Wave9374 Jun 28 '26
This is a legit problem, context fragmentation across tools is such a time sink.
How are you thinking about conflict resolution (two tools writing competing "truths") and permissioning (some memories should be private per project/client)? Also curious if you have any heuristics for when to auto-link memories vs leave them unlinked.
The knowledge graph angle sounds especially useful if recall stays predictable. Ive been tracking a few shared-memory/agent workflow ideas too: https://www.aiosnow.com/
1
u/rahilpirani5 Jun 28 '26
Yep, conflict handling and predictable linking are the main focus.
Second Brain uses canonical, draft, and deprecated states so one tool cannot silently overwrite a trusted memory.
Auto-links are weighted and pruned over time, and direct matches always outrank graph-expanded context.
It is designed as a single-user memory layer, so multi-user permissioning is outside the scope.
-2
u/Own-Interaction9471 Jun 28 '26
Why do you need to connect it to claude or any coding environment? Whats the benefit?
0
u/rahilpirani5 Jun 28 '26
The reason to connect Claude or Cursor for example, is so they can actually use the memory while you’re already there, instead of you opening another app and searching for stuff.
Also, it isn’t mainly a coding thing. Code is just one use case. It can hold travel plans, decisions, ideas, preferences, work context, basically whatever you want it to remember.
Claude can use that for everyday life, Cursor can use the project side, and both are pulling from the same brain.
That’s the benefit. Your context follows you.
10
u/Poildek Jun 28 '26
Do you know that there are already dozens of similar projects posted everyday here and on github ?
What value do you add to this already supercrowded ecosystem ?