Second Brain

Second Brain

A persistent memory server for AI tools like Claude, ChatGPT, and Cursor, enabling shared context across platforms.

Category
访问服务器

README

Second Brain

MyPeople read-only pilot: this branch adds a bounded, project-scoped MCP recall service for MyPeople. It is intentionally not the upstream capture-everything configuration. See MyPeople Pilot Operations before deploying or connecting a client.

One shared memory for Claude, ChatGPT, Cursor, Codex, and every other AI tool you use.

License: MIT Built with Cloudflare Workers MCP Compatible

You use Claude for some things, ChatGPT for others, and Cursor for code. But your context, including your projects, decisions, and preferences, does not move with you. You end up explaining yourself again and again.

Second Brain gives every AI tool access to the same persistent memory.

Unlike memory built into a single app, this memory belongs to you. It runs in your own Cloudflare account, stays under your control, and cannot be locked inside one AI platform.

The easiest way to get started is the desktop app. It sets everything up for you in about two minutes — no terminal, no accounts to wire together, no technical steps.

⬇ Download for Mac or Windows

Prefer to run it yourself? Use the one-click Deploy to Cloudflare button, or follow the manual steps. See the Quick Start for all three options.

#3 Product of the Day on Product Hunt

<a href="https://www.producthunt.com/products/second-brain-cloudflare?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-second-brain-for-ai" target="_blank" rel="noopener noreferrer"><img alt="Second Brain for AI: Persistent memory for Claude, ChatGPT, and Cursor" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1151393&theme=light&period=daily&t=1780357463637"></a>

What's new in v2

  • Memory graph. Memories now connect to each other — automatically as you save, or explicitly with the new link and connections tools. Recall can follow those connections (the hops option) to surface related context that a plain search would miss, and the dashboard has a new Graph tab to explore your memory visually.

  • Notion sync. Connect your Notion workspace from Settings → Integrations in the dashboard. Pages you share with the connection sync into memory, stay updated as they change in Notion, and surface in recall alongside everything else. Nightly automatic sync, or on demand with Sync now.

  • Graceful degradation. If the Vectorize index is missing, recall now falls back to keyword search with a clear notice instead of failing, a new /health endpoint reports index status, and the dashboard shows a banner with the exact fix.

See it in action

Second Brain Demo

How it works

Connect Second Brain to the AI tools you already use, then save information as it comes up.

Second Brain retrieves memories by meaning rather than exact wording. Asking:

What did I decide about the pricing model?

can surface the correct memory even when the original note used completely different words.

Memory tools

Tool What it does
remember Store ideas, decisions, preferences, and project context
append Add an 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
forget Permanently delete a memory

Save from anywhere

Memory is most useful when capturing information is easy. Second Brain connects to the tools and moments where context already exists.

  • AI clients: Use remember directly within Claude, ChatGPT, Cursor, Codex, and other MCP clients.

  • Command line: Run brain remember, brain recall, and other commands from your terminal.

    npm install -g second-brain-cf-cli
    
  • Notion: Connect your Notion workspace from Settings → Integrations in the web dashboard. Create an internal connection in the Notion developer portal (a connection, not a personal access token — only connections appear in a page's Connections menu), share the pages you want remembered with it, and paste its secret — shared pages sync into memory automatically (nightly, or on demand with Sync now) and stay updated as they change in Notion.

  • Obsidian: Automatically sync notes using the Second Brain Sync plugin, also available through Obsidian Community Plugins.

  • Browser extension: Capture a page or highlighted text using the Chrome extension.

  • iPhone and iPad: Use the Brain Dump, Text Brain Dump, and Save to Brain shortcuts in integrations/ios-shortcuts/.

  • Bookmarklet: Use the lightweight bookmarklet in integrations/bookmarklet.js.

Quick Start

Pick the option that fits you. They all deploy the same Second Brain into your own Cloudflare account — the difference is only how much setup you do by hand.

Option 1 — Desktop app (recommended, no technical steps)

The lowest-friction way to get started. Download the Second Brain desktop app for Mac or Windows, open it, and it walks you through setup in about two minutes: you pick a password, sign in to (or create) a free Cloudflare account, and it builds your Second Brain in your own private space and connects your AI tools for you. After setup it becomes the app you open your dashboard with every day.

Nothing to install beyond the app itself — no terminal, no git, no configuration values to copy. Developers: see installer/ for how it works and how to build it.

The Mac build is signed and notarized by Apple. The Windows build is not yet code-signed, so Windows may show a SmartScreen "unrecognized app" notice on first launch — click More info → Run anyway. (Code signing for Windows is in progress.)

Option 2 — One-click Cloudflare deploy

Prefer to deploy the Worker yourself without the app? Set it up in three steps.

1. Choose an authentication token

Your AUTH_TOKEN is the password used to access your Second Brain.

Use either:

  • A memorable phrase, such as coffee-lover-2026

  • A randomly generated token:

    openssl rand -base64 32
    

Save this token somewhere secure. You will need it when authorizing clients and testing your deployment.

2. Deploy to Cloudflare

Click Deploy to Cloudflare and follow the prompts.

Enter the following values during setup:

FIELD VALUE
Dimensions 384
Metric cosine
AUTH_TOKEN The token you created in step 1

Cloudflare will provision the required resources and deploy your Worker automatically.

When deployment finishes, copy your Worker URL. It will look similar to:

https://your-worker-name.your-subdomain.workers.dev

3. Connect your AI clients

Choose the instructions for the clients you use.

Claude Code or Codex CLI

Run the command for your operating system, replacing YOUR-WORKER-URL with the Worker URL from step 2.

macOS, Linux, WSL, or Git Bash

curl -fsSL https://raw.githubusercontent.com/rahilp/second-brain-cloudflare/main/scripts/connect-ai-clients.sh | bash -s -- https://YOUR-WORKER-URL

Windows PowerShell

iex "& { $(irm https://raw.githubusercontent.com/rahilp/second-brain-cloudflare/main/scripts/connect-ai-clients.ps1) } -WorkerUrl https://YOUR-WORKER-URL"

The setup script configures the MCP connection and global instructions using OAuth. Your authentication token is not passed to the script.

ChatGPT or Claude desktop and web apps

These clients require two manual setup steps:

  1. Add the provided custom instructions to the app's personalization settings.

  2. Add the following URL as a custom MCP connector:

    https://YOUR-WORKER-URL/mcp
    

Follow the client-specific instructions in the wiki for the exact menus and settings.

Your Second Brain is now ready to use across every connected client.

Optional: Verify the deployment

Replace YOUR-WORKER-URL and YOUR-TOKEN with your own values:

curl -X POST https://YOUR-WORKER-URL/capture \
  -H "Authorization: Bearer YOUR-TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"second brain is working","source":"test"}'

A successful response will look like:

{"ok":true,"id":"..."}

<details> <summary><strong>How OAuth authentication works</strong></summary>

The /mcp endpoint supports OAuth 2.0 discovery and dynamic client registration.

When you add the following URL as an MCP connector:

https://YOUR-WORKER-URL/mcp

a compatible client will:

  1. Detect the authentication requirement.
  2. Register itself with your Worker.
  3. Open the hosted login page in your browser.
  4. Ask you to enter your AUTH_TOKEN.
  5. Store the resulting OAuth authorization.

This means your authentication token does not need to be placed in the client configuration or included in the connector URL.

The following clients support this flow:

  • ChatGPT
  • Claude.ai
  • Claude Code
  • Codex CLI

You can also configure supported command-line clients manually:

claude mcp add --transport http second-brain https://YOUR-WORKER-URL/mcp
codex mcp add second-brain --url https://YOUR-WORKER-URL/mcp

Clients that cannot open a browser, such as mcp-remote in a headless environment, can use static token authentication:

Authorization: Bearer YOUR-AUTH-TOKEN

OAuth requires the OAUTH_KV namespace for client registrations and tokens. The Deploy to Cloudflare button provisions it automatically.

</details>

Option 3 — Manual deployment

For developers who want full control from the command line. Requires Node.js and a Cloudflare account.

npm install
npm run vectors:create
npm run deploy

npm run vectors:create creates the Vectorize index (384 dimensions, cosine). Wrangler then provisions the remaining Cloudflare resources automatically and fills in the required values in wrangler.jsonc. Then connect your AI clients using the same steps as Option 2, step 3.

Documentation

Technology

Second Brain is built with:

  • Cloudflare Workers
  • D1 SQLite
  • Cloudflare Vectorize
  • Workers AI
  • Cloudflare KV
  • Model Context Protocol
  • TypeScript

It runs within Cloudflare's free tier at personal scale.

Your data stays in your own Cloudflare account.

Code signing policy

Windows builds of the Second Brain desktop app are code-signed.

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

Team and roles:

Role Members
Authors Rahil P (@rahilp)
Reviewers Rahil P (@rahilp)
Approvers Rahil P (@rahilp)

All release binaries are built from this repository's source by GitHub Actions (installer-release.yml). Every signing request is reviewed and manually approved by an approver before a signed release is published.

Privacy statement: This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it. Second Brain is self-hosted by design: during setup the desktop app talks to Cloudflare only to create resources inside your own Cloudflare account, and afterwards it communicates exclusively with your own private Second Brain. Your memories and credentials are never sent to the project maintainers or any other third party.

Star History

<a href="https://www.star-history.com/?repos=rahilp%2Fsecond-brain-cloudflare&type=date&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=rahilp/second-brain-cloudflare&type=date&theme=dark&legend=top-left" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=rahilp/second-brain-cloudflare&type=date&legend=top-left" /> <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=rahilp/second-brain-cloudflare&type=date&legend=top-left" /> </picture> </a>

MIT License · Discussions

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选