Model Context Protocol · Persistent memory
An MCP server that gives Claude Code, claude.ai and Codex Obsidian-style persistent memory — Markdown notes with [[wiki-links]], full-text search and backlinks, isolated per user with Row-Level Security in Supabase. Native OAuth 2.1 login for claude.ai; bearer PATs for every other client. Status: LIVE.
MCP AI Brain is a hosted Model Context Protocol server that gives Claude real access to its own note space — Markdown with [[wiki-links]], tags, backlinks and full-text search, stored behind per-user Row-Level Security in Supabase Postgres.
On claude.ai, the server implements its own OAuth 2.1 Authorization Server so the native "Add custom connector" flow works end to end. In clients without built-in OAuth — Claude Code CLI, for instance — you connect with a Personal Access Token via the Authorization: Bearer header.
[[note]] creates automatic backlinksSave a note with [[another note]] in the body and the link is resolved, with the backlink appearing on the other side — just like Obsidian. brain_recall returns the full note together with its outbound links and backlinks, so context connects itself.
v1 in production, hosted at mcp-ai-brain.vercel.app — Supabase Postgres with per-user Row-Level Security, a dashboard SPA with email-OTP login to issue and revoke Personal Access Tokens and browse a graph view of your notes.
5 tools grouped by function — from saving a brand-new note to deleting it for good. Everything below is implemented and live.
title, content_md, tags?, overwrite?) and automatically resolves any [[wiki-link]] in the content.title and content_md, with context snippets (query, tags?, limit?).title or id, along with its outbound links and backlinks.tag, with a configurable limit.title or id. Idempotent by design — calling it twice never errors or has a side effect.From draft to recalled context: brain_store saves it → brain_search or brain_recall brings it back → brain_list shows what's most recent — [[wiki-links]] connect everything on their own.
Persistent memory is only useful if it's private — so per-user isolation is enforced at the database, not just trusted to the application layer.
Isolation via Row-Level Security
Every note belongs to a single user in Postgres, with no query exception — isolation is guaranteed by the database, not left to the application layer.
PATs stored as SHA-256 hashes
Personal Access Tokens are never stored in plain text — only the hash. A database leak doesn't expose usable tokens.
OAuth 2.1 with mandatory PKCE S256
The claude.ai flow requires PKCE S256 and audience binding (RFC 8707) — the issued token is only valid for that specific resource.
Rotating refresh tokens
Every refresh issues a new token and invalidates the previous one. Reusing an already-rotated refresh token revokes the entire family — a signal of a stolen token.
brain_delete is idempotent
Deleting the same note twice never errors or has a side effect — safe for automations that might retry the call.
Full-text search only runs in your space
brain_search and brain_list never cross accounts — the same database-level Row-Level Security applies to reads and writes alike.
Hosted server, zero setup: add the connector, authorize with the email you purchased with, and Claude can already save and recall context across sessions.
Recommended for claude.ai and any other MCP client with native OAuth support. Nothing to install; the login runs entirely on the server's own consent screen.
# Connector URL https://mcp-ai-brain.vercel.app/mcp
brain_store, brain_search and the rest of the tools. The same flow works on any other MCP client with native OAuth.For clients without a built-in OAuth flow — like the Claude Code CLI — generate a Personal Access Token in the dashboard and add the server with the Authorization: Bearer <PAT> header.
# you, in the chat: "Save this to my memory with the tag 'onboarding': ..." # → brain_store
"What have I already noted about
[topic]?"
# → brain_search / brain_recall"List my most recent notes
about [tag]"
# → brain_listStill have a question? Write to bruno@b2tech.io.
[[wiki-links]], tags, backlinks and full-text search, stored in Supabase Postgres behind per-user Row-Level Security. Claude can save and recall context across sessions instead of forgetting everything at the start of every new conversation.mcp-ai-brain.vercel.app) with the same email used at purchase to unlock access. Not a student yet? Check out the training at claude-code.b2tech.io.https://mcp-ai-brain.vercel.app/mcp, and log in with the email you purchased with (a 6-digit OTP code sent by the server's own consent screen). For clients without native OAuth, generate a Personal Access Token in the dashboard and use the Authorization: Bearer header.Markdown notes with [[wiki-links]], full-text search and backlinks — isolated per user with Row-Level Security, with native OAuth 2.1 login on claude.ai or a bearer PAT on any other MCP client.
5 tools · OAuth 2.1 or PAT login · per-user Row-Level Security