Sync your Obsidian notes to your self-hosted Second Brain MCP server on Cloudflare Workers. Search your brain from inside Obsidian.
Sync your Obsidian notes to your self-hosted Second Brain MCP server on Cloudflare Workers. Search your brain from inside Obsidian.
You need a running Second Brain Worker. Deploy one at: → https://github.com/rahilp/second-brain-cloudflare
# 1. Clone into your vault's plugins folder
cd /path/to/your/vault/.obsidian/plugins
git clone https://github.com/rahilp/second-brain-obsidian second-brain-sync
cd second-brain-sync
# 2. Install dependencies and build
npm install
npm run build
# 3. Enable in Obsidian
# Settings → Community Plugins → toggle on "Second Brain Sync"
Search for "Second Brain Sync" in Settings → Community Plugins → Browse.
https://second-brain.yourname.workers.dev)AUTH_TOKEN secret you set in Cloudflare)brain)Tag any note for sync by adding to its frontmatter:
---
tags:
- brain
---
Then either:
Click the search icon in the ribbon or run "Open Second Brain search" from the command palette. A sidebar panel opens with a search box that queries your Worker's semantic search.
| Setting | Description | Default |
|---|---|---|
| Worker URL | Your Cloudflare Worker URL | — |
| Auth token | Your AUTH_TOKEN secret | — |
| Sync tag | Frontmatter tag that marks a note for sync | brain |
| Auto-sync on save | Sync tagged notes automatically on save | Off |
| Chunk size | Max characters per chunk (~400 tokens = 1600 chars) | 1600 |
| Chunk overlap | Overlap between chunks to preserve context | 200 |
| Show sync status | Show last sync time in status bar | On |
Long notes are split into overlapping segments before being sent to the Worker. Each segment gets its own embedding in Vectorize so long notes don't produce diluted search results.
Short notes (under the chunk size) are stored as a single entry — no change in behavior.
The overlap ensures that sentences at chunk boundaries don't lose context.
npm run dev # Watch mode — rebuilds on changes
npm run build # Production build
Copy main.js and manifest.json to your vault's plugin folder after building.