Skip to content

rahilp/second-brain-cloudflare

Repository files navigation

Second Brain

License: MIT Built with Cloudflare Workers MCP Compatible

You use Claude for some things, ChatGPT for others, Cursor for code. But your context — your projects, decisions, preferences — doesn’t move with you. You re-explain yourself constantly.

Second Brain fixes that. One shared memory, available in every AI tool you use.

And unlike the built-in memory inside any single app, this one is yours. It lives in your own account. No platform controls it, and no platform can take it away.

Second Brain Demo

Deploy to Cloudflare


How it works

Connect Second Brain to whichever AI tools you use. Then tell it things once. It finds them later by meaning, so asking “what did I decide about the pricing model?” surfaces the right note even if you never used those exact words when you saved it.

Tool What it does
remember Store anything: ideas, decisions, project context
append Add updates to an existing entry without creating duplicates
recall Finds memories by meaning, not exact wording
list_recent Browse recent memories by date
forget Delete an entry

Save from anywhere

Memory is only useful if it actually gets filled. Second Brain connects to the tools and moments where context naturally lives.

  • Obsidian -- notes sync automatically via the community plugin
  • iOS -- Brain Dump, Text Brain Dump, and Save to Brain shortcuts in one tap
  • Browser -- bookmarklet saves any page or selection instantly
  • Any AI client -- use remember mid-conversation, right when something matters

You can also remove the integrations section at the bottom since this replaces it.


Setup

Before you deploy: You’ll be asked to set an AUTH_TOKEN. This is the password your AI clients use to connect.

Quick option: Use a memorable phrase like coffee-lover-2026

Secure option: Run openssl rand -base64 32 in your terminal and paste the result

Save it. You’ll need it in the next step.

  1. Click Deploy — everything provisions automatically
  2. Set your token — you’ll be prompted during deploy
  3. Connect your AI toolsinstructions here

That’s it. Your memory is live and ready across every tool you connect.

# Verify it's working (replace with your worker URL and token)
curl -X POST https://<your-worker-url>/capture \
  -H "Authorization: Bearer coffee-lover-2026" \
  -H "Content-Type: application/json" \
  -d '{"content": "second brain is working", "source": "test"}'
# → {"ok":true,"id":"..."}

Documentation


Integrations


Stack

Cloudflare Workers · D1 SQLite · Vectorize · Workers AI · MCP TypeScript SDK · MIT License

All free tier at personal scale. Your data stays in your own Cloudflare account.


MIT License · Discussions