Secondbrain

secondbrain

GitHub ยท ~/code/secondbrain

A shared memory server for AI tools. Built on Cloudflare Workers and the Model Context Protocol (MCP).

Problem

AI assistants forget everything between conversations. When using multiple tools, insights from Claude never reach ChatGPT, notes in Gemini stay locked there.

Solution

A unified, always-on memory layer that every MCP-compatible tool can read from and write to.

Architecture

Layer Service Role
Canonical store Cloudflare D1 (SQLite) Every memory with metadata, tags, namespace
Semantic index Cloudflare Vectorize Vector embeddings for meaning-based recall
Embedding model Workers AI (@cf/baai/bge-base-en-v1.5) 768-dimension embeddings at the edge

When you remember something, it's written to both D1 and Vectorize. Recall blends semantic matches with keyword matches.

Key Features

  • Cross-tool memory (Claude, ChatGPT, Gemini, etc.)
  • Hybrid recall (semantic + keyword)
  • Namespace isolation
  • Tagging (up to 16 tags per memory)
  • Bearer-token auth
  • Edge-native on Cloudflare

Tools

Six MCP tools exposed: remember, recall, forget, namespaces, list, search.

Related

  • pi โ€” can use secondbrain as a memory backend
  • Paperclip โ€” agent orchestration that could benefit from shared memory
  • Kyle Boas โ€” author