Skip to content
Conduit

mcp server

brain-kit-mcp

Open-source MCP memory server. pgvector + Supabase. Companion to dashbuilds.dev/brain-kit.

resourcehub40-create/brain-kit-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 23, 2026

Brain Kit MCP

an open-source MCP memory server. pgvector, supabase, runs for like $0/mo if you're frugal.

gives your AI tools (Claude, Cursor, Windsurf, ChatGPT, whatever's hot this week) a persistent semantic memory so you stop re-explaining your life every session.

self-host this for free, or grab the polished kit if you'd rather not spend a saturday wiring it up.

AI client (claude / cursor / chatgpt / etc)
        │
        │ MCP over HTTP
        ▼
Supabase Edge Function (this repo)
        │
        ├─→ Postgres + pgvector  (semantic search)
        └─→ OpenRouter           (embeddings + metadata)

what's in here

  • supabase/functions/brain-mcp/index.ts — the actual mcp server. 4 tools: search_thoughts, list_thoughts, thought_stats, capture_thought. plus a REST endpoint for webhook capture cause sometimes you just want to curl something.
  • supabase/migrations/20260307_init.sql — thoughts table, hnsw vector index, match_thoughts() rpc, RLS.
  • .env.example — env vars. fill them in.
  • examples/claude-code.md — connect it to claude code. that's the only client guide in here, on purpose (see below).

no setup script, no bookmarklet, no ios shortcut, no other client guides. this is the engine. you bring the rest.

quick start (manual, mildly painful)

you'll need supabase cli, an openrouter key, and ~30 min where you don't get distracted.

# 1. clone, fill env
git clone https://github.com/resourcehub40-create/brain-kit-mcp.git
cd brain-kit-mcp
cp .env.example .env
# edit .env: SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, OPENROUTER_API_KEY, MCP_ACCESS_KEY
# generate the access key with: openssl rand -hex 32

# 2. make a supabase project at supabase.com/dashboard, link it
supabase link --project-ref YOUR_PROJECT_REF

# 3. push the schema
supabase db push

# 4. push secrets to the edge function
supabase secrets set --env-file .env

# 5. deploy
supabase functions deploy brain-mcp --no-verify-jwt

# 6. connect a client. see examples/claude-code.md

if any of that broke, congrats, you've earned the right to consider the $29 version.

ok but i want the version that just works → Brain Kit, $29

this repo is the engine. the Brain Kit is the engine plus the rest of the car.

whatthis repo (free)Brain Kit ($29)
the mcp serveryepyep
the postgres schemayepyep
connect to claude codeyepyep
one-command ./setup.sh deploynopeyep
browser bookmarklet (capture any page in 1 click)nopeyep
ios shortcut (capture from your phone in 3 sec)nopeyep
configs for claude desktop, chatgpt, cursor, windsurfnopeyep
slack + zapier integration guidenopeyep
REST/webhook integration guidenopeyep
updates as new clients show upnopeyep

self-hosting is great if you have the time. if you don't, $29 is cheaper than the saturday afternoon you'd otherwise lose to "wait why isn't claude desktop seeing the server."

the tools

search_thoughts

semantic search. "what did i decide about the database" finds the right capture even if the word "database" isn't in it.

list_thoughts

browse with filters: type, topic, person, days.

thought_stats

totals, type breakdown, top topics, people mentioned. for when you want to feel productive without doing anyhting.

capture_thought

save a thought. it auto-generates an embedding and pulls out metadata (topics, people, action items, dates, type). no tagging required.

each tool is also reachable over HTTP at https://YOUR_PROJECT.supabase.co/functions/v1/brain-mcp with header x-brain-key: YOUR_ACCESS_KEY.

REST capture endpoint, in case you wanna curl from a script:

curl -X POST "https://YOUR_PROJECT.supabase.co/functions/v1/brain-mcp?action=capture" \
  -H "x-brain-key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "remember to refactor the auth flow next sprint"}'

cost

thingcost
supabase free tier (db + edge fn)$0
openrouter embeddings (text-embedding-3-small)~$0.02 / 1M tokens
openrouter metadata (gpt-4o-mini)~$0.15 / 1M input tokens
realistic monthlylike $0.10–0.30

heads up: supabase free-tier projects pause after 7 days of inactivity. either use it regularly, upgrade to pro ($25/mo), or run a tiny keepalive cron (the Brain Kit has one).

architecture-ish notes

  • embeddings: 1536 dim via openai's text-embedding-3-small through openrouter. swap models in index.ts around line 25, just remmber to update vector(1536) in the migration if you change dimensions.
  • vector index: hnsw with cosine distance. hnsw beats ivfflat at this scale (sub-100k rows) for both query speed and not having to rebuild after every insert.
  • single-user by default. RLS is service-role-only. for team setups, add supabase auth and per-user policies on thoughts.user_id. fair warning, you're on your own there.
  • privacy: everything runs in your supabase project. embedding/metadata calls go to openrouter, which has zero data retention.

license

MIT. go nuts.

related

↑↓ navigate openesc close