claude-brain
Provides persistent memory storage using Supabase Postgres, allowing agents to save message exchanges, perform full-text search across stored history, retrieve recent messages, and list conversation sessions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-brainsearch my memory for what we discussed about the API design"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-brain
A persistent memory layer for Claude. Every prompt/response exchange is logged to a Postgres database (Supabase), and an MCP server exposes tools so Claude itself can save and recall that history on demand — with full-text search.
Why
LLM conversations are ephemeral by default — close the session and the context is gone. This project gives Claude a durable, queryable memory: a database it can write to and search through the Model Context Protocol, plus (in progress) a web interface for browsing that history as a human.
Related MCP server: SharedMemory MCP Server
Architecture
flowchart LR
A[Claude Desktop / Claude Code] -- "MCP (stdio)" --> B[claude-brain server]
B -- "@supabase/supabase-js" --> C[(Supabase Postgres)]
D[Web interface, Claude Design] -.planned.-> Csrc/server.ts— the MCP server, built on@modelcontextprotocol/sdk. Registers four tools:Tool
Purpose
save_memoryStore one message (role, content, model, metadata) under a session id
search_memoryFull-text search across everything ever stored
get_recent_memoryMost recent messages, optionally scoped to a session
list_conversationsList known sessions
supabase/migrations/0001_init.sql— schema:conversations(one row per session) andprompt_logs(one row per message, with a generatedtsvectorcolumn powering search).src/tools/— one module per tool, thin and independently testable wrappers around the Supabase client.tests/— Vitest suite covering input validation (Zod schemas) for every tool.
Tech stack
TypeScript · Node.js · Model Context Protocol SDK · Supabase (Postgres) · Zod · Vitest · GitHub Actions
Setup
Create a Supabase project at supabase.com.
Run the migration in
supabase/migrations/0001_init.sqlagainst it (via the SQL editor, orsupabase db pushif you link the project with the Supabase CLI).Copy
.env.exampleto.envand fill in your project's URL and service role key (Project Settings → API).Install, build, and run:
npm install npm run build npm run dev
Testing
npm run typecheck # tsc --noEmit
npm test # vitest — schema/validation coverage
npm run build # compiles to dist/
npm run smoke-test # spawns the real server over MCP and exercises every tool against SupabaseThe first three run in CI on every push (see .github/workflows/ci.yml). smoke-test
needs a real .env and isn't run in CI, but is the fastest way to sanity-check a
deployment end-to-end.
Connecting to Claude
Add this server to your MCP client config (e.g. Claude Desktop's
claude_desktop_config.json, or a Claude Code MCP config):
{
"mcpServers": {
"claude-brain": {
"command": "node",
"args": ["C:/Users/admin/projects/claude-brain/dist/server.js"],
"env": {
"SUPABASE_URL": "https://your-project-ref.supabase.co",
"SUPABASE_SERVICE_ROLE_KEY": "your-service-role-key"
}
}
}
}Run npm run build first so dist/server.js exists.
Roadmap
Deploy a read/search web interface (Vercel) designed with Claude Design
Auto-log every Claude Code/Desktop session without manual tool calls
Tagging / categorization of stored memories
Row-level security policies if the interface is ever exposed beyond local use
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
FlicenseNot gradedqualityDmaintenanceGives Claude Desktop, Cursor, Cline, and other MCP-compatible AI tools persistent memory, enabling them to store and recall information seamlessly across sessions.141- AlicenseAqualityDmaintenanceGives Claude Code, Claude Desktop, Cursor, VS Code Copilot, and other MCP-compatible tools persistent memory.18661MIT
- AlicenseAqualityDmaintenanceEnables Claude to remember conversations and learn over time by storing and recalling messages, memory abstracts, and recent history using a local SQLite database.42172MIT
- AlicenseNot gradedqualityDmaintenanceGives AI persistent personal memory with hybrid search, temporal decay, and knowledge graph. Works with Claude and any MCP client.1227MIT
Related MCP Connectors
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Cross-AI personal memory. Save once in ChatGPT, recall in Claude, Mistral, Grok, or any MCP client.
One memory, every AI: Claude, ChatGPT, Perplexity, Gemini, Cursor, OpenClaw, Hermes, any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/s4239994/claude-brain'
If you have feedback or need assistance with the MCP directory API, please join our Discord server