Server facts
second-brain-cloudflare MCP Server
GitHub stars
884
Last commit
Nov 30, 2026
Runtime
typescript
License
MIT
Project
- Author
- rahilp
- Website
- www.thesecondbrain.dev
- License
- MIT
- Category
- Memory & Knowledge
Tech
- Runtime
- typescript
- Transports
- streamable-http
- Remote access
- Yes
- Authentication
- OAuth or Authorization: Bearer token (AUTH_TOKEN)
Activity
- GitHub stars
- 884
- Last commit
- Data as of
Tags
- Claude
- Cloudflare
- Self Hosted
- Semantic Search
- ai
- mcp
- memory
- vectorize
Overview
Individuals and teams exploring `second brain cloudflare mcp` (`rahilp/second-brain-cloudflare`, MIT license) can run a private TypeScript memory backend on Cloudflare Workers, D1 SQLite, Vectorize (384-dimension cosine index), Workers AI, and KV—sized to fit within Cloudflare's free tier for personal usage. Setup supports a code-signed macOS/Windows desktop app that provisions the Worker and links AI clients without terminal steps, a Deploy to Cloudflare button, or manual CLI provisioning via `npm` (`vectors:create` followed by `deploy`), plus an offline local QA harness (`npm run dev:local`). Remote MCP clients—including Claude, ChatGPT, Cursor, Codex, Claude Code, VS Code Copilot, and Gemini CLI—connect to `https://YOUR-WORKER-URL/mcp` via OAuth or an `Authorization: Bearer` `AUTH_TOKEN` header (query-string tokens were removed in v3).
Across its 20 memory tools (`remember`, `recall`, `append`, `update`, `brief`, `resolve`, `digest`, `history`, `list_projects`, `get_prompt_capsule`, `link`, `share`, and more), the Worker combines semantic Vectorize retrieval with full-text ranking, point-in-time `as_of` recall, duplicate/contradiction checks, named Projects, and Team Edition isolation separating `personal` workspaces from a shared `company` team layer. Deterministic KV-cached Prompt Capsules (`get_prompt_capsule`, capped at 12,000 characters with ETag revalidation) feed stable core or project prefixes to gateways, while Obsidian, Notion, Chrome, CLI, iOS Shortcuts, and IDE session hooks capture context from daily workflows. Note the README alert to upgrade older installs to 4.0.4 before December 5, 2026 so 90-day client connections do not lapse.
Install & configure
Requirements
- Cloudflare account (Workers, D1, Vectorize with 384-dim cosine index, Workers AI, and KV — runs within free tier at personal scale)
- macOS/Windows Desktop app, Deploy to Cloudflare button, or Node.js CLI (`npm install && npm run vectors:create && npm run deploy`)
- Strong `AUTH_TOKEN` passphrase/secret (e.g., `openssl rand -base64 32`) or OAuth for remote `/mcp` client authentication
npm install && npm run vectors:create && npm run deployDeploy via the signed Desktop app, Deploy to Cloudflare button, or CLI (`npm run vectors:create` followed by `npm run deploy`), then connect MCP clients to `https://YOUR-WORKER-URL/mcp` using OAuth or an `Authorization: Bearer` header. Append `?client=` to label activity in the dashboard.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
A supported configuration example is not available for this client and transport. Check the client documentation for its connection flow; do not substitute an undocumented JSON format.
Read the Claude Desktop setup guideConfig file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"second-brain": {
"url": "https://your-worker-url/mcp"
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"second-brain": {
"type": "http",
"url": "https://your-worker-url/mcp"
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"second-brain": {
"serverUrl": "https://your-worker-url/mcp"
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"second-brain": {
"type": "http",
"url": "https://your-worker-url/mcp"
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| remember | Store decisions, preferences, ideas, and project context with optional validity dates, tags, workspace, and project. |
| append | Attach a timestamped update to an existing stored memory. |
| update | Replace the content or tags of an existing memory and optionally record when a fact stopped being true. |
| recall | Retrieve memories by semantic meaning and full-text relevance, with optional `as_of` point-in-time filtering. |
| brief | Surface due items, open commitments, stale memories, and pending insights. |
| resolve | Mark a tracked task, date, insight, or stale fact as resolved. |
| digest | Read the latest automatic summary generated for a specific project or tag. |
| history | Inspect recorded historical revisions of a memory along with prior text. |
| list_recent | Browse recently captured memories. |
| list_teams | List shared team workspaces you belong to (wired for future multi-team support; v3.0.0 supports a primary team). |
| list_projects | List registered projects in scope with display names, descriptions, and memory counts. |
| get_prompt_capsule | Fetch a deterministic core or project prompt prefix projection cached in KV with strong ETag support. |
| get | Read an individual memory record by its ID. |
| forget | Move a memory to the trash (recoverable via `undo`). |
| undo | Revert the latest change to a memory or restore a trashed memory. |
| set_status | Mark a memory as `canonical`, `draft`, or `deprecated`. |
| link | Create an explicit relationship edge between memories. |
| unlink | Remove an explicit relationship edge between memories. |
| connections | List all memories linked to a specified memory. |
| share | Move a canonical memory between the private Personal workspace and the Shared team (`company`) layer. |
Use cases
- Recall architectural decisions, personal preferences, and past project updates consistently across Claude, ChatGPT, Cursor, and Codex without re-explaining context.
- Share team-wide engineering policies on the `company` layer via `share` while keeping individual draft notes private in each member's `personal` workspace.
- Serve deterministic, KV-cached Prompt Capsules (`get_prompt_capsule`) as stable system-prompt prefixes for custom AI gateways.
- Auto-capture and recall session context via Claude Code, Codex CLI, Cursor, VS Code Copilot, and Gemini CLI hooks alongside Obsidian, Notion, and iOS Shortcuts.
Strengths
- Full data sovereignty: D1 rows, Vectorize embeddings, KV cache, and credentials stay inside your own Cloudflare account within personal free-tier limits.
- Rich 20-tool memory engine combining semantic + full-text search, `as_of` temporal recall, explicit graph links, revision history, and deterministic Prompt Capsules.
- Team Edition keeps private `personal` workspaces isolated from admins while enabling canonical sharing on the `company` layer in the same Worker.
- Broad capture ecosystem spanning remote MCP, CLI, web PWA with push reminders, Chrome extension, Obsidian, Notion, iOS Shortcuts, and coding-agent hooks.
Limitations
- Requires a Cloudflare account and deploying a Worker (with Vectorize metadata indexing and re-embedding if upgrading older team brains).
- Team Edition v3.0.0 currently supports a single shared team per brain; multi-team creation and switching are not yet exposed in the dashboard.
- Session-start hooks are not yet available for Windsurf, OpenCode, or Oh My Pi, and pre-4.0.4 installs must update before December 5, 2026 to keep existing AI tool connections active.
second-brain-cloudflare setup notes
- second-brain-cloudflare's example uses http, while its catalog transports are streamable-http; use the example's connection type.