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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

madb_mcp_server-0.2.1-cp312-cp312-win_amd64.whl (269.2 kB view details)

Uploaded CPython 3.12Windows x86-64

madb_mcp_server-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

madb_mcp_server-0.2.1-cp312-cp312-macosx_11_0_arm64.whl (305.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

madb_mcp_server-0.2.1-cp311-cp311-win_amd64.whl (281.2 kB view details)

Uploaded CPython 3.11Windows x86-64

madb_mcp_server-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

madb_mcp_server-0.2.1-cp311-cp311-macosx_11_0_arm64.whl (316.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

madb_mcp_server-0.2.1-cp310-cp310-win_amd64.whl (279.4 kB view details)

Uploaded CPython 3.10Windows x86-64

madb_mcp_server-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

madb_mcp_server-0.2.1-cp310-cp310-macosx_11_0_arm64.whl (319.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file madb_mcp_server-0.2.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2244b513d88287ad116e1d597fa7f7a1e578e95b3ee1f3d659abe87e9e0a8b2e
MD5 6960743b819d4d6442346192746b0db2
BLAKE2b-256 9f2401bbf2f111ca8bfb5572946d6f5d0eb8417cc52312c5d1739e5d6d1d83db

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp312-cp312-win_amd64.whl:

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

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.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3e50b7c88524106ebb8aa0ee221397770afd7f9cbf4032aa875f646b8c5cb6c
MD5 5865237fc4288ad75d471e227344f99c
BLAKE2b-256 1b2594e434d93480f17dc2327660587a0af5941fac9ee696c7939a15b04c44d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

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

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.2.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 110dbe8260202cd894ba543420a444029c06c80faa34aff3b0c03bd712c8e0b8
MD5 d308f9fa528d6fbb7c2ad54b54ce2662
BLAKE2b-256 1395eef0fb7df2fbb3231d1dc08e7742349bf22836a6f24c195c18510f8e7a6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp312-cp312-macosx_11_0_arm64.whl:

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

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.2.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5de9604db373b0b934e91374e4c166d1b1ad9b2f06de2e0011ec6958e4fd6c91
MD5 eb21da08a43c480dff31b4b49fa33fa4
BLAKE2b-256 031f8db4ba9c268446bea169727ad0980b9943c76df44c4db8e3f32d070effdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp311-cp311-win_amd64.whl:

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

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.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 724b97064084b3bfe6637a7fdcb431e0feb1897eb4cf2256ad3d5270d2321a73
MD5 06ca3022798337a7173097e18b3eeaac
BLAKE2b-256 af832c24787425a8aada505f77309613055c6766b859d07a4388121da93aff19

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

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

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.2.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 05ada5fe3cb3090f3859bbcf43691f1e93488eac04cfeeb7da6eb91e29d80006
MD5 5416a3a85f17b5a925957cd5d47207f2
BLAKE2b-256 7992053fac8d68c2404a1c431afc0a9d7b059dcfb26c31378598e68e1fac360a

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp311-cp311-macosx_11_0_arm64.whl:

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

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.2.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 110efab3c9cb387ebff76d1e7574216697c78b801b182e59a027cbe96bcac18c
MD5 05c06c3d4edcaafde2893cc05361fd3c
BLAKE2b-256 a87276a98c286120ea792c270cd93291f4421c357cee9cd57b2b90dd61156303

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp310-cp310-win_amd64.whl:

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

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.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 812eb745b089007c5e004a89dd93d5c5fd2254407f7b494e0f3ee85fdb8d1328
MD5 c6068528d9a7e1c99f60e46cfc9b5aaa
BLAKE2b-256 7b8807df3d5e5da36fd8ea06e0baba9d5913a7a3fe9be1a39ccb33216dfebc00

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

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

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.2.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68781c506826f3c37ffb26a0ec3ea65a2ad2eb4cb8f6ba6fee372481b1cfbc79
MD5 37ed336d7e95928c341176716e2c83ad
BLAKE2b-256 dc2c4407d5f3315de96229df473316d59d4ad0997b18cd77884153196918ae93

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.1-cp310-cp310-macosx_11_0_arm64.whl:

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

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