← Back to Leaderboard
Srahilp

rahilp/second-brain-cloudflare

A Cloudflare Worker memory layer shared by AI clients over MCP and REST.

Engineering Health (Methodology)
A+ · 94/100
Maintenance Activity
● Updated today
Latest Release
installer-v4.0.7
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption19/25
Release Cadence20/20
License Clarity20/20
MCPSelf-HostedAPI
Total Stars
★ 886
24h Growth
+1
7d Growth
+8
Forks
133

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

rahilp/second-brain-cloudflare Star History (2026-05-08 - 2026-12-04) ALL-TIME STAR HISTORY (2026-05 – 2026-12) +885 in 210d · avg +4/day 936 468 0 2026-05-08: ★ 12026-05-23: ★ 802026-06-06: ★ 2392026-06-20: ★ 2782026-07-04: ★ 4832026-07-18: ★ 5842026-08-01: ★ 6702026-08-15: ★ 6952026-08-29: ★ 7202026-09-12: ★ 7432026-09-26: ★ 7762026-10-10: ★ 7912026-10-24: ★ 8152026-11-06: ★ 8512026-11-19: ★ 8662026-12-04: ★ 886 ★ 886 2026-05 2026-08 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Second Brain is a TypeScript application built around a single Cloudflare Worker. REST and MCP expose the same persistent memory system to AI clients and capture integrations. D1 backs memory storage and ranked full-text retrieval; Vectorize and Workers AI provide semantic search, with KV also part of the Worker stack. Captured records are classified, checked for duplicates and contradictions, linked to related records, and indexed for recall. Recall can follow those relationships and return source-backed context.

The package uses @cloudflare/workers-oauth-provider and the @modelcontextprotocol/client, @modelcontextprotocol/server, and @modelcontextprotocol/sdk packages. The repository separates src/, db/, integrations/, and installer/, with wrangler.jsonc for Worker configuration. Workspace is the access boundary; projects group records by subject and can overlap without changing who can read them. Tags and source provide separate facets for classification and provenance.

Key Capabilities & Differentiators

Retrieval supports both semantic recall and relevance-ranked full-text matching. The latter matters for ticket IDs, versions, names, and exact phrases, and remains available alongside capture when Vectorize is unavailable. New deployments use the full-text index immediately; existing deployments build it over nightly runs. The shipped embedding models favor English, with a multilingual option in desktop settings. Memory operations include as-of recall, timestamped updates, history, undo, explicit relationships, and status changes. brief surfaces outstanding items, while digest reads the latest existing summary.

Team Edition gives each member a private workspace and exposes a shared workspace as company in the API, CLI, and MCP tools. Sharing moves one canonical record; only its author or an admin can edit or remove the shared record. Admins do not gain access to personal workspaces. For agent gateways, get_prompt_capsule exposes a deterministic, read-only projection of canonical core or project entries. It emits slots in fixed order, skips malformed entries, and reports ambiguous slots instead of selecting one silently.

Trade-offs & Limitations

Compared with assembling MCP, storage, embeddings, and a retrieval pipeline around a general-purpose vector database, Second Brain ships a usable memory product with editing, history, export, and sharing. The tradeoff is that its operational path and retrieval design are tied to Cloudflare primitives. Self-hosting here means deploying into an account you control, not running offline or on arbitrary infrastructure. A local-first store is a better starting point if offline operation is mandatory; a bespoke stack is a better fit if storage, ranking, or tenancy must be independently controlled.

Each brain currently supports one shared team. The optional team parameter and list_teams tool do not imply that the dashboard can create or switch between multiple teams. Without the Vectorize workspace metadata index, recall searches the broader candidate pool before applying access limits. Unauthorized records are not returned, but they can crowd eligible records out of the nearest matches. Treat free-tier fit as workload-dependent: traffic and migration backfills consume managed-service allowance, and a full re-embed uses Workers AI allowance for every memory.

Hardware & Deployment Guide

The desktop installer, Deploy to Cloudflare flow, and manual CLI path provision the same application in your Cloudflare account. The manual path uses Node/npm and Wrangler tooling: run npm install, npm run vectors:create, then npm run deploy. The documented Vectorize settings are 384 dimensions and cosine similarity. Connect MCP clients at /mcp, using OAuth where supported or a strong randomly generated AUTH_TOKEN in an Authorization: Bearer header for static clients. Query-string token authentication was removed in v3.

vectors:create also creates the workspace_id metadata index. When adding it to an existing deployment, check /health for workspaceFilter.supported and plan the documented reset and re-embedding steps together: adding the index without re-embedding can remove older records from semantic recall. The installer-v4.0.7 release provides macOS .dmg and Windows .exe downloads, with separate update artifacts. Existing deployments should be upgraded to 4.0.4 or later before December 5, 2026, to avoid the older behavior where client connections stop working 90 days after setup.

Runtime: One TypeScript Cloudflare Worker serves REST and MCP, backed by D1, Vectorize, Workers AI, and KV.
Retrieval resilience: Captures and indexed keyword recall remain available when Vectorize is down; existing deployments build the full-text index through nightly runs.
Temporal memory: recall supports as-of queries, history exposes previous text, and undo can restore trashed memories.
Workspace boundaries: Private-by-default capture and one shared team per brain; sharing moves the canonical record rather than duplicating it.
Gateway context: Prompt Capsules emit canonical entries in a fixed slot order and omit ambiguous slots while reporting them.
Vector provisioning: Manual setup uses a 384-dimensional cosine index; workspace_id metadata filtering is important for team recall.
Best For

Individuals and single teams that want several AI clients to recall the same decisions, preferences, and project history from a Cloudflare deployment they control.

Skip If

You need offline or on-premises operation, multiple independently administered teams in one instance, or a retrieval stack with replaceable storage and ranking components.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

MCPSelf-HostedAPI
npm install
npm run vectors:create
npm run deploy

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
second-brain-cloudflare ★886+8TypeScriptMITA Cloudflare Worker memory layer shared by AI clients over MCP and REST.
claude-mem121.7k+1.4kTypeScriptApache-2.0Hook-driven memory and hybrid search for coding agents that need cross-session r
Scrapling108k+1.5kPythonBSD-3-ClausePython HTTP and browser crawlers that turn websites into RAG-ready Markdown
hindsight64.9k+1.1kPythonMITA bank-based memory service that turns agent interactions into durable knowledge

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/rahilp/second-brain-cloudflare.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

rahilp/second-brain-cloudflare Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about second-brain-cloudflare

How do multiple clients connect to the same memory store?

Point compatible AI clients at https://YOUR-WORKER-URL/mcp. Use OAuth where supported or an Authorization: Bearer header for static clients. REST provides a separate integration surface. The clients share state because they connect to the same Worker; they do not synchronize copies of the database with one another.

Do I need a GPU, and what determines runtime overhead?

No local inference GPU is part of the Cloudflare deployment path. Workers AI generates embeddings, Vectorize stores and searches them, and D1 backs memory storage and keyword retrieval. Size the deployment around capture and query volume, Worker concurrency, data growth, and embedding usage. Budget separately for backfills, since re-embedding consumes Workers AI allowance for every memory.

Can we use it commercially, and does self-hosting satisfy compliance requirements?

The repository is MIT-licensed, which permits commercial use subject to retaining the required copyright and license notices. The supported deployment runs in your Cloudflare account; it is not an on-premises or offline deployment. Review Cloudflare service terms, data-processing requirements, and what connected AI clients receive before onboarding sensitive workloads.

How does it compare with building on a vector database or using local-first notes?

Choose it over a bare vector store when you want ready-made MCP memory tools, history, explicit sharing, and a dashboard. Choose the database-and-retrieval approach when the application must control the schema, ranking, or tenancy. A local-first notes system is a better fit when offline access and local storage matter more than giving several AI clients one live memory endpoint.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining rahilp/second-brain-cloudflare? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature rahilp/second-brain-cloudflare on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare