Quickstart
Give your agent persistent memory in one command
MADB runs locally as an MCP server. Install it, store a memory, recall it, and trace why a decision was made — no account, no hosted service.
Step 1 — Install
Pick your agent
Claude Code
One line adds MADB and its memory tools to Claude Code:
claude mcp add madb -- uvx madb-mcp-serverpip / uvx
Install the server, or run zero-install with uvx:
pip install madb-mcp-serveruvx madb-mcp-serverAnthropic SDK
Drop-in shim — one import swap, existing code unchanged:
pip install madb-anthropicfrom madb_anthropic import Anthropic # memory is now automatic
Any MCP client (.mcp.json)
{ "mcpServers": { "madb": { "command": "uvx", "args": ["madb-mcp-server"],
"env": { "MADB_DATA_DIR": "~/.madb/data", "MADB_TENANT_ID": "default" } } } }MADB stores everything under
MADB_DATA_DIR on your machine. Memory never leaves your device.Step 2 — Use it
Store, recall, and trace
Once installed, your agent calls these automatically. You can also drive them directly:
# store a decision and what caused it remember(content="Refunded order #4471 ($4,200)", caused_by=["dispute_4471"], tags=["refund"], importance=0.8) # bring the right memory back — scored on more than similarity recall(query="refunds over $1000 last week", top_k=5) # answer "why did the agent do that?" trace_cause(event_id="refund_4471", direction="backward")
See every tool in the tool reference, or read how recall ranking works in recall.
Step 3 — Verify
Confirm MADB is live
Ask your agent to remember something, start a new session, and ask it to recall. It will. For a guided path by tool, see MADB for Claude Code or MADB for Codex.