DEV Community

Cover image for How to give Claude Code persistent memory with 51 MCP tools
Fex Beck
Fex Beck

Posted on

How to give Claude Code persistent memory with 51 MCP tools

The Problem

Claude Code uses MEMORY.md files for persistence. 200-line limit, no search, no validation, no multi-agent support. After months of fighting this, I built BrainDB.

Setup (2 minutes)

Clone, configure, start:

git clone https://github.com/beckfexx/BrainDB.git
cd BrainDB && cp .env.example .env
bun install && bun run start
Enter fullscreen mode Exit fullscreen mode

Add to your MCP config (Claude Code settings):

{
"mcpServers": {
"braindb": {
"command": "bun",
"args": ["run", "src/mcp-client.ts"],
"env": { "BRAINDB_URL": "http://localhost:3197" }
}
}
}
Enter fullscreen mode Exit fullscreen mode




What you get (51 tools)

Smart Context — Claude loads relevant memories based on CWD and git branch.

Decisions that stick — Authoritative memories that supersede conflicting old ones.

Session Handovers — Pass context to the next session seamlessly.

Contradiction Detection — Flags conflicting stored facts automatically.

Nightly Self-Learning — Validates memories against web sources overnight.

MEMORY.md vs BrainDB

Feature MEMORY.md BrainDB
Search None FTS5 + embeddings
Capacity 200 lines Unlimited
Validation None Nightly fact-checking
Multi-agent File conflicts Claims + handovers
Contradictions Manual Auto-detected

The 51 Tools grouped

  • Memory (15): remember, recall, forget, decide, context, validate, learn...
  • Search (5): semantic-search, hybrid-search, embeddings...
  • Agents (8): heartbeat, claim, release, handover, inbox...
  • Graph (10): entities, relations, contradictions...
  • System (8): health, stats, backup, capabilities...
  • Inception (5): dream, decay, inception findings...

Every tool Claude Code needs for real persistent memory. No more MEMORY.md limitations.

GitHub: beckfexx/BrainDB — AGPL-3.0, TypeScript.

Top comments (0)