# MADB — Agent Memory Database [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/spshkar84/madb-meta-agents-db  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/madb-agent-memory-database

## Description
Durable causal memory for AI agents — semantic recall, causal lineage, and skills. Local-first.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "madb-agent-memory-database": {
    "command": "uvx",
    "args": ["madb-mcp-server"]
  }
}
```

## Documentation

## What MADB — Agent Memory Database does

MADB — Agent Memory Database gives MCP-compatible agents a local persistence layer for memories, causal relationships, and reusable skills. The database engine uses a hybrid LSM design, a causal directed acyclic graph, composite scoring for recall, importance-based forgetting, and HLC-ordered MVCC. Data is stored locally under `~/.madb`, rather than in a hosted service.

The project distributes compiled Python wheels. The MCP package includes the server and a bundled Claude Skill that instructs Claude to use MADB for persistent memory instead of creating ad hoc files, tables, or conversation-history structures. A separate Python package provides an Anthropic SDK shim that automatically persists calls made through the wrapped client.

## How it works

An agent can write a memory with optional tags, importance, and a link to the memory that caused it. Recall ranks results using several signals: semantic similarity, recency, causal proximity, importance, and tag overlap. Memories can also be retrieved by event ID, searched using structured tenant, scope, and tag filters, or listed in newest-first order.

Causal lineage remains available after a memory is soft-deleted because `forget` creates a tombstone instead of removing the node from the graph. The `trace_cause` tool walks the graph forward or backward from a selected memory. Skills use a separate save and recall flow, with idempotent storage by name and protection from garbage collection.

Multiple Claude Code sessions can use one store through a local daemon. The first session starts it on demand, later sessions reuse it, and the daemon exits after an idle period. A token-guarded loopback HTTP connection separates MCP clients from the single store owner. The embedded mode restores direct single-session access, while daemon mode treats daemon failures as fatal.

## Setup and configuration

For Claude Code, install the MCP server with `claude mcp add madb -- uvx madb-mcp-server`. The packages can also be installed with `pip install madb-mcp-server` or run through `uvx madb-mcp-server`. Claude Desktop users can install the supplied `.mcpb` extension. The first launch can install the bundled memory Skill into `~/.claude/skills/madb-memory/`.

No external database service is required. The optional `MADB_TELEMETRY=off` setting disables anonymous usage telemetry. `MADB_MODE=embedded` selects direct single-session operation; `MADB_MODE=daemon` requires the daemon path; and `MADB_DAEMON_IDLE_SEC` changes the idle timeout, with values at or below zero disabling that timeout.

## Tools and capabilities

The free tier exposes 13 memory tools:

- `remember`, `recall`, `get_memory`, `forget`, `search`, and `list_recent` manage and retrieve memories.
- `save_skill`, `recall_skill`, and `list_skills` store and find reusable patterns.
- `trace_cause` follows causal lineage, while `summarize` condenses selected memories.
- `stats` reports engine metrics, and `capabilities` reports workspace capabilities and entitlement information.

The MCP resource `madb://memories/{event_id}` exposes an individual memory as a URI. MADB — Agent Memory Database also includes an onboarding Skill that detects an empty store and offers a guided first-run tour. Developers using the raw Anthropic API can use the `madb-anthropic` package and replace the standard client import with its `Anthropic` wrapper.

## Limitations and notes

MADB is distributed under the Meta-Agents.AI Proprietary License. The license permits installation and use in an organization’s infrastructure, including production use for its own users, but does not permit redistribution, reverse engineering, hosted-service offerings, or embedding in a commercial product sold to third parties. Source code is not public. Source access, OEM rights, and hosted-service rights require separate written agreements.

The bundled memory Skill has separate CC-BY-ND 4.0 terms. Earlier versions of some portions may remain available under Apache 2.0 for the specific versions released under that license; new releases use the proprietary license. The store is designed around a single owner, with the local daemon coordinating concurrent sessions.

_Full upstream README: https://allmcps.com/mcp/madb-agent-memory-database/readme_

