mcp-brain
Provides persistent storage for a knowledge graph using Supabase as the backend database, enabling cross-instance memory sharing.
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., "@mcp-brainstore that Alice knows Bob and they work on project X"
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.
MCP Brain
A cognitive memory system implemented as an MCP server that stores data in Supabase. It provides persistent storage across different Claude installations for knowledge graphs with support for entities and relations.
Notice
This is very much a work in progress, so don't expect it to work flawlessly without some tweaking. I was using the MCP Memory Server but I wanted it to work on Claude installed on different computers at the same time. I hacked together a transfer process and decided that was stupid, so I moved it to Supabase. It works once you get it running, but the installation isn't as polished as it should be. I strongly recommend setting it up in VSC with Cline Dev or something similar first instead of trying to make it work in Claude Desktop first. I have been able to get Claude Desktop, VSC on 2 different laptops and on a VPS, all sharing the same Supabase db.
Related MCP server: MCP DuckDB Knowledge Graph Memory Server
Features
Persistent storage using Supabase
Knowledge graph structure with entities and relations
Database-level locking for safe concurrent access
Cross-platform support (macOS, Linux, Windows)
Automatic table initialization
Debug logging support
Prerequisites
Node.js and npm
VSCode with Claude extension
One of the following:
A new Supabase account and project (for primary installation)
Supabase credentials from an existing installation (for secondary installations)
Installation Types
Choose the appropriate installation type:
Primary Installation: Set up mcp-brain with a new Supabase project. This is for the first machine that will use the brain.
Secondary Installation: Install mcp-brain on additional machines using the same Supabase database. This allows multiple machines to share the same knowledge graph.
Installation
The installation process involves building the project and configuring it with your Supabase credentials. You can do this either automatically using the provided script, or manually.
Primary Installation
For your first installation of mcp-brain:
Create a new Supabase project at https://supabase.com
Get your project URL and API key from Project Settings > API
Follow either the automated or manual installation steps below
Save your Supabase credentials for use in secondary installations
Secondary Installation
For installing mcp-brain on additional machines:
Get the Supabase URL and API key from your primary installation
Follow either the automated or manual installation steps below
Use the same credentials to ensure all instances share the same knowledge graph
Option A: Automated Installation
Clone and build the project:
git clone https://github.com/gtrusler/mcp-brain.git cd mcp-brain npm install npm run buildRun the configuration script:
npm run configureYou will be prompted to enter your Supabase URL and API key. The script will automatically:
Create or update the MCP settings file for your OS
Configure the correct paths to the built files
Preserve any existing MCP server configurations
Option B: Manual Installation
Clone and build the project:
git clone https://github.com/gtrusler/mcp-brain.git cd mcp-brain npm install npm run buildLocate your MCP settings file:
macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonLinux:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonWindows:
%APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Add or update the mcp-brain configuration in the settings file:
{ "mcpServers": { "mcp-brain": { "command": "node", "args": ["path/to/mcp-brain/dist/index.js"], "env": { "SUPABASE_URL": "your-project-url", "SUPABASE_KEY": "your-api-key", "DEBUG": "false" } } } }Replace:
path/to/mcp-brainwith the absolute path to where you cloned and built the repositoryyour-project-urlwith your Supabase project URLyour-api-keywith your Supabase API key
Note: If the settings file already exists, make sure to preserve any existing MCP server configurations. Only add or update the mcp-brain section within the mcpServers object.
Your Supabase credentials can be found in your Supabase project settings under Project Settings > API.
Applying Changes
After installation or any configuration changes:
If VSCode is open:
Close all Claude conversations
Run the "Developer: Reload Window" command (Cmd/Ctrl + Shift + P, then type "reload")
If VSCode is closed:
Simply start VSCode and the new configuration will be loaded automatically
Verifying the Installation
After reloading VSCode, verify the setup by:
Creating a new conversation with Claude
Running a command like
Can you use your brain?to test the connectionThe brain should respond with information about its capabilities
Usage
The brain provides three main tools through the MCP protocol:
read_graph: Read the entire knowledge graphcreate_entities: Store new memories as entitiescreate_relations: Create connections between memories
These tools can be used through Claude to store and recall information persistently.
Development
npm run build- Build the TypeScript projectnpm run configure- Configure Supabase credentialsnpm start- Start the MCP server directly (not typically needed)
Architecture
Uses TypeScript and @modelcontextprotocol/sdk
Stores data in Supabase tables:
entities: Nodes in the knowledge graph
relations: Edges connecting entities
locks: Database-level locking for concurrent access
Automatic table creation on first run
Platform-independent configuration
License
MIT
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.
Latest Blog Posts
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/TouristShaun/mcp-brain'
If you have feedback or need assistance with the MCP directory API, please join our Discord server