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 (9)

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
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.0.tar.gz (14.2 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.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: madb_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 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.0.tar.gz
Algorithm Hash digest
SHA256 389fcc468a5138e0202ddbd33c07e22c15500410983799cb1573e0c05a96914f
MD5 d0fca6fd7d054073b681037c11bd0fc1
BLAKE2b-256 afdd71b002cbc36951e90f212dc007f9fb48fafac80ea27d5597b4592edd7c11

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: madb_mcp_server-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8fc6b4755114a14b4c08c8b4fee134670f22b5849d1fbde7460c7edfe503216
MD5 06e5e99933571398ef4f377f513ff3e4
BLAKE2b-256 7fd2a0f479867d7e0c5c669ca1b339701909d060e2cbaec9a47533abb3944b6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.1.0-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