second-brain-cloudflare is a free, open source note taking & knowledge management project written in TypeScript and released under MIT. It has 771 GitHub stars, 117 forks and 16 open issues, and was last pushed 31 hours ago. On this registry it ranks #37 of 41 tracked projects in Note Taking & Knowledge Management, with 5 head-to-head comparisons available.

What is second-brain-cloudflare?

Second Brain is a self-hosted memory layer for AI tools — an MIT-licensed TypeScript application that runs as a Cloudflare Worker, stores anything once, and lets Claude, ChatGPT, Cursor, Codex, and any other Model Context Protocol client recall it by meaning — built for individuals and small teams who want their AI context to live in their own Cloudflare account.

What it is

Second Brain Cloudflare is an open-source memory system that runs as a Cloudflare Worker backed by D1, Vectorize, Workers AI, and KV. Every application and AI client connects to that single Worker through REST or the Model Context Protocol, so a memory saved from one tool is retrievable from another. It sits in the Productivity & Utilities / Note Taking & Knowledge Management category, is written in TypeScript, and is released under the MIT licence. The project also ships a desktop app for Mac and Windows, a CLI, a browser extension, an Obsidian plugin, and integrations with Notion, calendars, email, and iOS Shortcuts.

The problem it addresses is context fragmentation. Claude, ChatGPT, Cursor, Codex, and the other AI tools a person uses do not naturally share context, so the same projects, decisions, and preferences get repeated in every app. Second Brain replaces that per-tool repetition with one persistent memory system: rather than re-pasting context into each assistant, the user saves a memory once and each MCP-compatible client retrieves the relevant part on demand. Retrieval works by meaning rather than exact wording, so a natural-language question finds the right memory even when the original save used different words. Memories, vectors, credentials, and application resources remain inside the user's own Cloudflare account.

Key capabilities

  • Semantic recall: a natural-language question retrieves the right memory even when the wording differs from the way it was saved.
  • One Worker for every client and device, so there is nothing to copy or synchronise between applications.
  • Dashboard control over every memory: browse, edit, append, connect, share, export, or permanently remove it.
  • Automatic classification, duplicate detection, relationships, time-aware ranking, and optional weekly insights keep the store usable as it grows.
  • Capture from existing surfaces, including MCP clients, the CLI, a browser extension, Obsidian, Notion, calendars, email, iOS Shortcuts, and the web dashboard.
  • Team Edition with a Personal workspace nobody else can read plus a Shared layer, where memories are private by default and enter the shared layer only when deliberately shared. Sharing moves one canonical memory rather than copying it, the author stays visible, and only the author or an admin can edit, delete, or un-share. In the API, CLI, and MCP tools the Shared layer is the stable workspace value company.
  • Admin management of members, access, capture defaults, and integrations without granting access to anyone's personal workspace.

Who uses it and how

  • Individuals who work across several AI tools and want one memory store instead of repeating the same context in Claude, ChatGPT, Cursor, and Codex.
  • Teams that need a shared layer alongside private personal memory: the same Worker supports personal and team use, with no separate team deployment.
  • People who already capture notes in Obsidian, Notion, calendars, email, or iOS Shortcuts and want those surfaces feeding the same memory store.
  • Non-terminal users who prefer the desktop app, which builds the brain and connects AI tools in about two minutes without Cloudflare setup.
  • Admins who set member access, capture policies, and integrations for a team while personal workspaces stay unreadable to them.

Getting started

The desktop app is the easiest path: download it for Mac or Windows from releases/latest and it builds the Second Brain and connects AI tools in about two minutes, with no terminal or Cloudflare setup. Manual deployment uses the Deploy to Cloudflare button for the repository, with the setup documented in the project wiki.

How it compares

The supplied facts do not name any competing memory product, so no product-by-product comparison is offered here; on the material available, second-brain-cloudflare stands alone in this registry. The adjacent names it does list — Claude, ChatGPT, Cursor, Codex, Obsidian, Notion, calendars, email, and iOS Shortcuts — are capture and retrieval surfaces it connects to rather than substitutes for it.

When to use it — and when not to

A self-hoster takes on a Cloudflare Worker plus its D1, Vectorize, Workers AI, and KV bindings, and is responsible for that account and its resources; anyone who does not want to own that infrastructure should not pick it. Teams needing several shared layers managed through the dashboard or admin flows should also wait, because v3.0.0 gives each brain exactly one shared team — the API and MCP layer carry optional team parameters and a list_teams tool so multi-team support can ship later, but the dashboard does not yet create or switch between teams. The repository currently carries 16 open issues.

project readme (upstream, from github) — read inline

Second Brain

Private memory for you. Shared memory for your team. Available to every MCP-compatible AI tool you use.

Now with Team Edition — private personal layers plus a shared team layer, in one Worker.

License: MIT Built with Cloudflare Workers MCP Compatible MCP Toplist

Claude, ChatGPT, Cursor, Codex, and the other AI tools you use do not naturally share context. You end up repeating the same projects, decisions, and preferences in every app.

Second Brain gives those tools one persistent memory system. It runs in your own Cloudflare account, stays under your control, and retrieves the right context by meaning rather than exact wording.


The desktop app is the easiest way to start. It builds your Second Brain and connects your AI tools in about two minutes—no terminal or Cloudflare setup required.

Download for Mac or Windows


Deploy to Cloudflare · Read the documentation

What it does

  • Recalls by meaning. Ask a natural-language question and find the right memory even when you used different words when saving it.
  • Works across tools and devices. Every client talks to the same Worker, so there is nothing to copy or synchronize between apps.
  • Keeps you in control. Browse, edit, append, connect, share, export, or permanently remove any memory from the dashboard.
  • Builds useful context. Automatic classification, duplicate detection, relationships, time-aware ranking, and optional weekly insights help the brain stay useful as it grows.
  • Captures from where you already work. Use MCP clients, the CLI, browser extension, Obsidian, Notion, calendars, email, iOS Shortcuts, or the web dashboard.
  • Stays in your account. Memories, vectors, credentials, and application resources live in your own Cloudflare account.

See it in action

Second Brain demo

Team Edition

Second Brain can now be a team's memory without stopping being yours.

  • Every person gets a Personal workspace that nobody else can read, plus a Shared layer visible to the team.
  • Memories are private by default and only enter the Shared layer when someone deliberately shares them.
  • Sharing moves one canonical memory rather than making a copy. Its author remains visible, and only the author or an admin can edit, delete, or un-share it.
  • Admins can manage members, access, capture defaults, and integrations without gaining access to anyone's personal workspace.
  • Existing v2 memories become the owner's private memories during upgrade. Nothing is exposed to a team automatically.
Layer Who can read it Who can edit or delete it
Personal Only you Only you
Shared Everyone on the team The author or an admin

The same Worker supports personal and team use; there is no separate team deployment. In the API, CLI, and MCP tools, the Shared layer is represented by the stable workspace value company. See the Team Setup guide for member management, capture policies, sharing, and upgrades.

v3.0.0 scope: each brain has one shared team. The API and MCP layer include optional team parameters and a list_teams tool so multi-team support can ship later without breaking changes; the dashboard and admin flows do not create or switch between multiple teams yet. See CHANGELOG.md.

How it works

Second Brain runs as a Cloudflare Worker backed by D1, Vectorize, Workers AI, and KV. Every app and AI client connects to that Worker through REST or the Model Context Protocol (MCP).

  1. Capture: Save a decision, preference, project update, note, or source from any connected client.
  2. Organize: Second Brain classifies it, checks for duplicates and contradictions, creates relationships, and indexes it for semantic search.
  3. Recall: Ask in natural language. Second Brain retrieves relevant memories, follows useful connections, and returns source-backed context to the tool you are using.

If Vectorize is unavailable, captures and keyword recall continue working. Your memories remain usable while semantic indexing is restored. Keyword recall works for Japanese, Chinese, and other scripts written without spaces, and for full-width text. The shipped embedding models read English best; the desktop app's Settings can switch a brain to a multilingual reading.

Memory tools

Tool What it does
remember Store ideas, decisions, preferences, and project context
append Add a timestamped update to an existing memory
update Replace an existing memory
recall Find memories by meaning rather than exact wording
list_recent Browse recently saved memories
list_teams List shared teams you belong to (names and ids). In v3.0.0 this is one team; used by MCP clients for future multi-team support
get_prompt_capsule Read a deterministic core or project context projection for a gateway-controlled prompt prefix
get Read one memory by ID
forget Permanently delete a memory
set_status Mark a memory canonical, draft, or deprecated
link Add an explicit relationship between two memories
unlink Remove a relationship between two memories
connections List the memories connected to a memory
share Move a memory between the Personal and Shared layers

On a team brain, memory tools accept a workspace of personal or company when you want to choose a layer explicitly. company is the wire value for the Shared team layer. Without workspace, captures use the member and team defaults, while recall searches everything that person is allowed to see.

Optional team (workspace id) and MCP list_teams / GET /team/workspaces are wired for a future multi-team release. In v3.0.0 you can omit them — each brain has one shared team and the primary team is used automatically.

CLI example:

brain remember --workspace company "We ship on Thursdays"
brain recall --workspace company "when do we ship?"

Prompt Capsules

Prompt Capsules are deterministic, read-only projections for gateways and custom agents that can place stable context before a changing user request. They complement query-specific recall; they do not inject every memory into every prompt.

A Capsule entry is an ordinary canonical memory with one target tag and one slot tag. Core entries use capsule:core; project entries use capsule:project:. Slots are emitted in this fixed order:

  • Core: identity, preferences, constraints, principles
  • Project: current-state, decisions, open-questions

Tag the slot as capsule-slot: and keep at most one canonical entry per slot. Draft and deprecated entries are ignored. Ambiguous slots are omitted without choosing a winner; malformed rows are skipped. The response reports duplicate_slots and invalid_entries, and complete is false. Other valid slots remain available, including on the shared layer.

An entry must carry status:canonical to be part of a Capsule. The easiest way is to include status:canonical in the tags at remember or capture time (it is stored after whitespace trimming, and the classifier then leaves it alone); otherwise the definition starts as draft and requires set_status canonical. Classification, including /classify-pending, never publishes a capsule. A write that contradicts a protected memory is demoted to draft even when the caller requested canonical. To take an entry out of a Capsule, set its status to draft or deprecated. MCP update accepts an optional tags array: pass the complete replacement definition, for example ["capsule:core", "capsule-slot:preferences"], along with the entry id and content. Naming either capsule namespace replaces both namespaces; a lone slot tag is not a complete definition. Omit tags to preserve existing tags. MCP and REST capture/update accept at most 64 tags of 128 characters each.

Shared-layer recovery: members can publish their own shared definitions, but cannot edit a teammate's entry.

readme truncated — read the full docs on github

Frequently asked questions

Is second-brain-cloudflare free to use?

second-brain-cloudflare is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does second-brain-cloudflare do?

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.

What is second-brain-cloudflare written in?

second-brain-cloudflare is primarily written in TypeScript. Its source is publicly available at https://github.com/rahilp/second-brain-cloudflare, and it has 771 GitHub stars.