🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

madb-mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

madb-mcp-server

MCP server for Meta-AgentsDB — persistent causal memory for AI agents

pipPyPI
Version
0.2.11
Weekly downloads
1.9K
Maintainers
1

madb-mcp-server

Persistent causal memory for Claude Code — causal chains, composite-scored recall, and a built-in Memory-ROI meter.

madb-mcp-server gives Claude Code (and any MCP-compatible client) a real database backend for agent memory: causal chains, composite-scored recall, a tamper-evident integrity chain, and built-in analytics.

Install

pip install madb-mcp-server

Or run directly with uvx (no install needed):

uvx madb-mcp-server

Claude Code Setup

claude mcp add madb -- uvx madb-mcp-server

Or add to your project's .mcp.json:

{
  "mcpServers": {
    "madb": {
      "command": "uvx",
      "args": ["madb-mcp-server"],
      "env": {
        "MADB_DATA_DIR": "~/.madb/data",
        "MADB_TENANT_ID": "default"
      }
    }
  }
}

Claude Desktop Setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "madb": {
      "command": "uvx",
      "args": ["madb-mcp-server"],
      "env": {
        "MADB_DATA_DIR": "~/.madb/data",
        "MADB_TENANT_ID": "default"
      }
    }
  }
}

Tools (12)

ToolDescription
rememberStore a memory with causal links, tags, and importance scoring
recallSemantic recall — vector similarity + recency + causal proximity + importance
get_memoryPoint lookup by event_id
forgetSoft-delete a memory (tombstone, preserved in causal chain)
searchStructured query by tenant + scope
list_recentLast N memories for a tenant
save_skillStore a reusable skill/pattern (GC-protected, idempotent by name)
recall_skillSemantic skill recall with structured output
list_skillsList all saved skills ranked by composite score
statsEngine metrics snapshot (writes, reads, flushes, compactions, WAL state)
trace_causeWalk the causal DAG forward or backward from any memory
analyticsMCP usage analytics — call counts, latencies, recall precision, Memory ROI

Memory ROI

MADB tracks how much value its memory provides to your Claude sessions:

  • Tokens served from recall — context delivered from memory instead of re-reading files
  • File reads avoided — estimated file re-reads saved by recalling from memory
  • Recall precision — hit rate and average relevance score
  • Write-to-read ratio — tokens recalled per token written (run the analytics tool to see your session's ratio)

Run the analytics tool at any time to see your session's Memory ROI.

Resources

URIDescription
madb://memories/{event_id}Read a single memory record

Environment Variables

VariableDefaultDescription
MADB_DATA_DIR~/.madb/dataDatabase storage directory
MADB_TENANT_IDdefaultDefault tenant for tool calls
MADB_API_KEY(unset)If set, every tool call must pass a matching api_key
MADB_TELEMETRY(on)Set to off to disable anonymous usage telemetry
MADB_SKIP_UPDATE_CHECK(unset)Set to 1 to disable the daily PyPI version check

Privacy & Telemetry

Your memory content never leaves your device — all data is stored locally under MADB_DATA_DIR (~/.madb by default).

To improve the product, the server sends anonymous usage telemetry:

  • What is sent: an opaque random install id, the package version, the host OS/Python version, the MCP runtime (e.g. claude-code), and counts — tool-call totals, distinct tools used, recall hits, sessions.
  • What is never sent: memory content, queries, payloads, tenant names, file paths, usernames, or hostnames. "We measure how much, never what."
  • When: an activation event on first connect and a heartbeat at most once per day. Fire-and-forget; it never blocks or delays a tool call.
  • Opt out completely: set MADB_TELEMETRY=off.

A one-time notice is printed on first launch. On first run the server also copies a bundled Claude Skill into ~/.claude/skills (existing files are left untouched) and checks PyPI for updates (MADB_SKIP_UPDATE_CHECK=1 to disable).

How It Works

MADB is an agent-native database built in Rust with 5 novel primitives:

  • Causal DAG — every memory links to what caused it, forming an evidence chain
  • Composite-scored recall — vector similarity + recency + causal proximity + importance
  • Storage-layer policy — scope and retention rules enforced at the engine level
  • Partitioned WAL — per-tenant write-ahead log for crash safety
  • Time-bucketed HNSW — vector index organized by time for recency-aware search

License

Meta-Agents.AI Proprietary License v1.0. Install-and-use is permitted for end-users of the published wheels; source access, OEM embedding, and hosted-service rights are reserved for separately-negotiated agreements. Patent pending.

Keywords

mcp

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts