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.3-cp313-cp313-win_amd64.whl (138.3 kB view details)

Uploaded CPython 3.13Windows x86-64

madb_mcp_server-0.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (933.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

madb_mcp_server-0.2.3-cp313-cp313-macosx_11_0_arm64.whl (150.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

madb_mcp_server-0.2.3-cp312-cp312-win_amd64.whl (138.3 kB view details)

Uploaded CPython 3.12Windows x86-64

madb_mcp_server-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (945.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

madb_mcp_server-0.2.3-cp312-cp312-macosx_11_0_arm64.whl (152.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

madb_mcp_server-0.2.3-cp311-cp311-win_amd64.whl (141.7 kB view details)

Uploaded CPython 3.11Windows x86-64

madb_mcp_server-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (910.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

madb_mcp_server-0.2.3-cp311-cp311-macosx_11_0_arm64.whl (154.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

madb_mcp_server-0.2.3-cp310-cp310-win_amd64.whl (141.7 kB view details)

Uploaded CPython 3.10Windows x86-64

madb_mcp_server-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (858.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

madb_mcp_server-0.2.3-cp310-cp310-macosx_11_0_arm64.whl (156.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file madb_mcp_server-0.2.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cd4f0eaef556e1e85394ed0afc5f6774b71ee350133eb499d26830b4a08d5e5c
MD5 ea45bd6ece5cb897f54f0e5998b2d04b
BLAKE2b-256 a751fb6961b45ae6ca828cdc2fe174943bdbbc5695be945f16e9840060080485

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-cp313-cp313-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.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a82cb801126d234d894346cfcb24f6d989d3ddf266ec503f1ee3af97caa5d5b
MD5 8e62c72de0124d618fa5b1509759f618
BLAKE2b-256 4172ac3ad5a6e3e70b48e27b23d818ad5323d10119a196194be0d513709103df

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-cp313-cp313-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.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7487239c1504e66e527791f71bcde1485897f7553afb9eda61faa81e8382258
MD5 3b35e135487026bc295958768d9ed623
BLAKE2b-256 3545420d8efe172c548017bfb6f30c65edd427b92f89676d5f25ab5829fc5f3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-cp313-cp313-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.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dc0bdd5f5fd891f8e2235fabd6f9691541dcbbdf75c89c032eda49042669066c
MD5 d913c6725673009c5edce51561962d79
BLAKE2b-256 a3db1e2259e453c9a381cb7838f1fc6e3bdf27b17ce159adf382355efc6d9031

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7557c85cd8e267fc5c80fa5103e20c3c74ba5ea8e6e15a997b13f28cbfb0eb4b
MD5 dfb81554d51232aac2408382ac562586
BLAKE2b-256 95cf4de29308ca4e8de0c9be414ac7d791181080b46c679ecc7233a727916fea

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f01ba8b663ee9804d1589d0e916f895937fba0dd239c816bb09357d477d520c3
MD5 2f0154bd9b71fe576d2c0b0021f9ec2a
BLAKE2b-256 298c3b532835fbfc0ceb2a8ec648b4ccab9ebe3d8823904bf0d3230f271d342a

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c110ec0e0f8b3def92ff5b1d7ee7e68448c20b753a4aa81d0539564b6b0db48e
MD5 192223903a397e555f3d5efc84d842f2
BLAKE2b-256 60a683677de4f99bf2aef58372fc52a6e6a553f8f72395ca013570719795baca

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8fccfc5d08ee7801286be3e8dd92eca6c629e8341eea1219f5cbd6e55d2d902
MD5 2a5b12a92167daef1dbef88a957fd069
BLAKE2b-256 61836208c7509ec02e9c25b84d52a547880ad65c957468cdd4fdfcd320e2772d

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 43679379bbc32c8c8f01c6dfe6e6875a8c84301e4fd6ea846fd3b1ec96c0bd5a
MD5 02d77a8339916e60e9cbe1931726b0ea
BLAKE2b-256 40b7f5bd8de70475514b5a41ac294c705f47a1072e92bd99683ee0f8ea0928f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6110b1d4b8b3efdfddbff17407f11858da0935c04168894a659739a774689576
MD5 83c4aa2419b80ce07a361947ffe8ddd2
BLAKE2b-256 f480d92fa7b88afccf09a81fabfb6a046f6ced670aff398a308a66e8072a5b96

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa4d3a9d68a25913a102dbd9023049d793ac9e144a4a5c0e0f547237289ad943
MD5 957e7c885e9afd233c84bd240d2fa802
BLAKE2b-256 59f1eaf960fd24be294552f9bc4dd1e8e7f2738a5994a74c8e08b1c14149567d

See more details on using hashes here.

Provenance

The following attestation bundles were made for madb_mcp_server-0.2.3-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.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for madb_mcp_server-0.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be7766e72932638565149885bc290f8c73504eb4b7c4251a12286edefa99984d
MD5 98646f1e70ec79dc597280b49bfc35f7
BLAKE2b-256 4965c1952d0e7bb95fc759b946b4dfc39ae0549c052ebacb322c7f10afa45772

See more details on using hashes here.

Provenance

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