rahilp/second-brain-cloudflare

One memory layer, every AI tool. Store anything once — recall it in Claude, ChatGPT, Cursor, or any MCP client. Self-hosted on Cloudflare's free tier.

703 ★95 forksTypeScriptUpdated 1d ago

What you need to know

A self-hosted persistent memory server ("Second Brain") deployed as a single Cloudflare Worker that gives Claude, ChatGPT, Cursor, Codex and other AI tools one shared, semantic-searchable memory you control.

Install

npm install -g second-brain-cf-cli
npm install && npm run vectors:create && npm run deploy  (manual, requires Node.js + Cloudflare account)
One-click "Deploy to Cloudflare" button, or download the desktop app for Mac/Windows from releases.

Usage

  • Connect AI clients via the /mcp endpoint (OAuth 2.0 dynamic client registration supported): claude mcp add --transport http second-brain https://YOUR-WORKER-URL/mcp, or codex mcp add second-brain --url https://YOUR-WORKER-URL/mcp.
  • Use memory tools from any connected client: remember, append, update, recall, list_recent, forget.
  • Capture from the terminal with "brain remember" / "brain recall", or via Notion, calendars (iCal), email, Obsidian plugin, Chrome extension, iOS Shortcuts, and a bookmarklet.
  • Verify a deployment with curl -X POST https://YOUR-WORKER-URL/capture -H "Authorization: Bearer YOUR-TOKEN" -d '{"content":"second brain is working","source":"test"}'.

Key features

  • Memory graph: memories connect to each other automatically or via explicit link/connections tools, with recall hops to surface related context.
  • Semantic search over meaning rather than exact wording, backed by Cloudflare Vectorize (384-dim, cosine).
  • Integrations: Notion sync (hourly), Google/Outlook/iCloud calendars via iCal, Gmail/iCloud email capture with noise filtering.
  • Runs entirely in your own Cloudflare account (Workers + D1 + Vectorize + Workers AI + KV); free tier at personal scale; graceful keyword-only fallback if the Vectorize index is missing.
  • Desktop app with dashboard, graph view, advanced recall settings, and calendar/email/Notion integration UI.

Best for

Developers who want one persistent, self-hosted memory shared across multiple AI coding tools and chat apps without data living in a third-party cloud.

Caveats

  • Windows desktop build was not code-signed at the time of writing (SmartScreen warning on first launch); Mac build is signed and notarized.
  • Opera can flag a false phishing warning on OAuth login when the workers.dev subdomain contains "gmail-com" (workaround: change subdomain or use another browser).
  • Some MCP clients (notably Claude Code) load tool schemas lazily, so remember/recall may not appear in the visible tool list until a real tool call is made.
Platforms: macOS · Linux · Windows · WebClients: Claude Code · Claude.ai · ChatGPT · Cursor · Codex CLI · Claude Desktop
Documentation ↗

Reviewed 2026-08-07

Topics

ai-memoryclaudeclaude-aiclaude-codecloudflarecloudflare-workersd1ios-shortcutsmcpmodel-context-protocolobsidian-pluginpersonal-knowledge-managementsecond-brainsemantic-searchtypescriptvectorizeworkers
View on GitHub ↗
Stars
703★
Forks
95
Language
TypeScript
License
MIT
Created
2026-05-09
Last push
2026-08-06