dbrain
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., "@dbrainremember that I prefer dark mode in apps"
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.
Every AI conversation starts from zero. Switch machines, switch apps, and your AI forgets everything. dbrain fixes that.
Install it once, connect every AI you use — Claude Code at home, Claude Code at work, Gemini on your phone. All share the same identity, the same memories, the same knowledge.
[Home] Claude Code ──MCP──┐
[Work] Claude Code ──MCP──┤ ┌─────────────────────────────────┐
[Mobile] Gemini ──REST──────┼────→│ dbrain (your mind) │
[Server] OpenClaw ──REST────┤ │ identity + memory + knowledge. │
[Other] Custom AI ──API────┘ └─────────────────────────────────┘Not an AI agent. Not an assistant. Not a model. Just memory — structured, searchable, persistent.
Quick Start
npm install -g dbrain
dbrain init # interactive wizard — creates DB, config, identity
dbrain start # starts API on :7878 + dashboard on :7879Then connect Claude Code from any machine:
dbrain connect claudeThe wizard asks for the brain URL and token (shown during init):
┌ dbrain — Connect to a brain
│
◇ Brain URL
│ http://localhost:7878
│
◇ Access token
│ sk-dbr_...
│
◇ Brain found
│
● Brain: dBrain — 2 entities, 0 facts
│
◇ Claude Code configured
│
◇ Files updated ──────────────────────────────────────────────╮
│ │
│ ~/.claude.json MCP server registered │
│ ~/.claude/settings.json Permissions granted │
│ ~/.claude/CLAUDE.md Behavioral instructions installed │
│ │
├──────────────────────────────────────────────────────────────╯
│
└ Connected. Restart Claude Code to activate.Restart Claude Code and it will start using the brain. You can also skip the wizard:
dbrain connect claude http://your-server:7878 --token=sk-dbr_...Docker
git clone https://github.com/ivncmp/dbrain.git
cd dbrain
cp .env.example .env # edit token, names, port
docker compose up -dThen from any client machine:
dbrain connect claude http://your-server:7878How It Works
The brain has 4 layers:
Layer | What | How |
Identity | Who is the AI? Who is the user? How should it behave? |
|
Conversations | Raw chat history from every AI session |
|
Knowledge | Structured facts organized by PARA |
|
Recall | Full-text search over all facts | FTS5 with OR logic for multi-language queries |
Memory Tiers
Memories fade if you don't use them — like a real brain.
Tier | Rule |
hot | Accessed in the last 7 days, or accessCount >= 10 |
warm | 8–30 days since last access |
cold | > 30 days — fading, candidate for archival |
Every search bumps accessed facts back to hot. The brain stays sharp on what matters.
MCP Tools
Available to any MCP client (Claude Code, etc.):
Tool | Purpose |
| Search memory + get identity (primary tool) |
| Save a fact to an entity |
| Read entity with all its facts |
| List entities by category or type |
| Create a new entity |
| Touch a memory to keep it hot |
| Send conversation messages for storage |
| Full identity load |
| Brain stats |
REST API
All endpoints require Authorization: Bearer <token> except /health.
Method | Endpoint | Purpose |
|
| Brain pulse |
|
| Client config (MCP, permissions, instructions) |
|
| Identity documents |
|
| Knowledge entities |
|
| Add facts to an entity |
|
| Bump a memory (keep it hot) |
|
| Chat history |
|
| Full-text search over all facts |
|
| Overview: entities x tiers |
CLI Commands
Command | Where | Purpose |
| Server | Create a new brain (DB, config, identity) |
| Server | Start the API server + dashboard |
| Client | Connect a client to a running brain |
| Server | Check brain status |
init runs on the server (creates the brain). connect runs on the client (configures Claude Code). The brain serves its own client config via GET /connect.
Dashboard
Web dashboard on port 7879. Shows brain stats, entities with PARA categories, fact tiers, conversations, and full-text search. Single-file React app — no build step.
Stack
Layer | Technology |
Language | Node.js + TypeScript |
API | Fastify |
DB | SQLite + FTS5 (better-sqlite3) |
MCP | @modelcontextprotocol/sdk (HTTP transport) |
Validation | Zod |
CLI | @clack/prompts |
Dashboard | React 18 (CDN, no build step) |
Development
git clone https://github.com/ivncmp/dbrain.git
cd dbrain
npm install # installs deps + builds (prepare script)
npx dbrain init # create a brain (only needed once)
npm run dev # starts the server with file watchingScript | What it does |
| Dev server with file watching (tsx) |
| Compile TypeScript + copy dashboard HTML |
| Start the compiled server from |
| Run tests with vitest |
| ESLint check |
| ESLint auto-fix |
| Prettier format |
| Lint + format + build (full pipeline) |
Environment Variables
For non-interactive setup (Docker, CI):
Variable | Default | Purpose |
|
| Data path |
|
| API port |
|
| Bind address |
| Auto-generated | Access token |
|
| AI identity name |
|
| Owner name |
| Auto-detected | Owner timezone |
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.
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/ivncmp/dbrain'
If you have feedback or need assistance with the MCP directory API, please join our Discord server