Skip to content

rahilp/second-brain-cloudflare

Repository files navigation

Second Brain — MCP Server on Cloudflare Workers

Second Brain — MCP Server on Cloudflare Workers

A personal memory layer that works across every AI tool you use.
Self-hosted on Cloudflare's free tier. Truly one-click deploy — no manual setup required.

🔑 Before you deploy: You'll be asked to set an AUTH_TOKEN during deployment.
Quick option: Use a memorable phrase like coffee-lover-2026
Secure option: Run openssl rand -base64 32 in your terminal and paste the result
Save it! You'll need this token to connect AI clients.

Deploy to Cloudflare

License: MIT Built with Cloudflare Workers MCP Compatible


Every AI conversation starts from zero. Second Brain fixes that — give Claude, ChatGPT, Cursor, and any MCP-compatible client a shared memory layer that actually remembers what you tell it.

Five tools. One brain. Every AI client.

Tool Description
remember Store anything — ideas, decisions, project context
append Add updates to existing entries without creating duplicates
recall Semantic search with recency bias — finds things by meaning, prioritizes fresh info
list_recent Browse recent memories chronologically
forget Delete an entry and all its chunks

Quickstart

  1. Click Deploy — Cloudflare provisions D1, Vectorize, and the Worker automatically
  2. Choose your token — During deploy, enter a memorable token (like coffee-lover-2026) or generate a secure one with openssl rand -base64 32. Save it!
  3. That's it! — Schema auto-creates on first request. Your Worker is ready at https://<your-worker-url>/
  4. Connect to Claudeinstructions →
# Test it's working (use your token from step 2)
curl -X POST https://<your-worker-url>/capture \
  -H "Authorization: Bearer coffee-lover-2026" \
  -H "Content-Type: application/json" \
  -d '{"content": "second brain is working", "source": "test"}'
# → {"ok":true,"id":"..."}

Documentation


Stack

Cloudflare Workers · D1 SQLite · Vectorize · Workers AI · MCP TypeScript SDK · MIT License

All free tier at personal scale.


Integrations


MIT License · Discussions