Skip to main content

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

Project description

madb-mcp-server

Persistent causal memory for Claude Code — 4.65x recall ROI measured in production.

madb-mcp-server gives Claude Code (and any MCP-compatible client) a real database backend for agent memory: causal chains, composite-scored recall, policy-gated access, 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)

Tool Description
remember Store a memory with causal links, tags, and importance scoring
recall Semantic recall — vector similarity + recency + causal proximity + importance
get_memory Point lookup by event_id
forget Soft-delete a memory (tombstone, preserved in causal chain)
search Structured query by tenant + scope
list_recent Last N memories for a tenant
save_skill Store a reusable skill/pattern (GC-protected, idempotent by name)
recall_skill Semantic skill recall with structured output
list_skills List all saved skills ranked by composite score
stats Engine metrics snapshot (writes, reads, flushes, compactions, WAL state)
trace_cause Walk the causal DAG forward or backward from any memory
analytics MCP 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 (measured 4.65x in production)

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

Resources

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

Environment Variables

Variable Default Description
MADB_DATA_DIR ~/.madb/data Database storage directory
MADB_TENANT_ID default Default tenant for tool calls

How It Works

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

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

License

Apache-2.0 (patent pending)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

madb_mcp_server-0.1.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

madb_mcp_server-0.1.1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file madb_mcp_server-0.1.1.tar.gz.

File metadata

  • Download URL: madb_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for madb_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c137f4287038c620a4bdfc918f32d0fed36f39078d909ce2cc55c570c7e622a8
MD5 7d60a62a07919fec815d662aa23b3e3e
BLAKE2b-256 a34e6020cacc05f788b0c8a9ed2ac03df72f0b5f8588a2fbb5dc98104c8d5be9

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.1.1.tar.gz:

Publisher: mcp-server.yml on spshkar84/meta-agents-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file madb_mcp_server-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: madb_mcp_server-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for madb_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc66edb5e51a73b80eb9eda52a89cab5bfb9e0e9138672ec9434ce87cd4a0307
MD5 311b21baa0bec8ae286c8645617aa1ac
BLAKE2b-256 ecd6c41dc271403fbf686b7c5bc5b92f73d43f1e626071d8ba16ed6f110c1648

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.1.1-py3-none-any.whl:

Publisher: mcp-server.yml on spshkar84/meta-agents-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page