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.2-cp312-cp312-win_amd64.whl (278.6 kB view details)

Uploaded CPython 3.12Windows x86-64

madb_mcp_server-0.2.2-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.2-cp312-cp312-macosx_11_0_arm64.whl (315.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

madb_mcp_server-0.2.2-cp311-cp311-win_amd64.whl (290.6 kB view details)

Uploaded CPython 3.11Windows x86-64

madb_mcp_server-0.2.2-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.2-cp311-cp311-macosx_11_0_arm64.whl (326.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

madb_mcp_server-0.2.2-cp310-cp310-win_amd64.whl (288.8 kB view details)

Uploaded CPython 3.10Windows x86-64

madb_mcp_server-0.2.2-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.2-cp310-cp310-macosx_11_0_arm64.whl (329.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6061b3e9576cdb00c04e73f7199bb86c69238821050197ce3bea9375971c101f
MD5 fe2bc3df3eec7110a26f5183f7d4036e
BLAKE2b-256 aca344a79f07196adc6e7af54c4e430be0572dab96b435162cfaf6c10093ab74

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 707e6ddf01ba923ce41749f4d8cab402798a2707bd2cefd3d217c1d54e8dc450
MD5 69f545df2d8ac94037844ed51da43639
BLAKE2b-256 ef3c5aefef9de29975cd4c31c1854b0836fffc898e1d51e42a9e1abd2e8e414b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c266ddd5382dc4db0a2cfd831d7591789cff7d1cd50136404fb3e9fd35124be
MD5 a1322522dc50611425a89864ccfa0e71
BLAKE2b-256 8cd53d0ef9e022deecd4a6c21f0310e0cbc0eb8571011aa736742de5349f340c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 70648889f8fcc42ca416f04de7bf2ac31ff2d862ebfc7c17b5166ff8759089c2
MD5 bdce6c8aa89e0655f66dd975fe48f180
BLAKE2b-256 571fb74e63452c7fd6883cc15c9f751bb420e1177359e4f6e4fd48ff40f80555

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 699b5fc81b37c3697d6d35fa475f399ad9d2ec594f695c911732b56222dba57e
MD5 e31b29aadf88968c9bd86d758c4365f8
BLAKE2b-256 f3a40e8ab8d3ab1b0344791f63e6cf8d88fa950a50bb854e132256113d5fa6cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8026c75bcc20fe13fc21ec3a5067816701552905ec4b87eaef71b206771f2fc5
MD5 8ec96f15e6455574351e6d4afa808f13
BLAKE2b-256 e38cfeae280a51a78af433d526b300618fd2f39c16307c71e6eac9b5a046b568

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 031ca5912b80c30b90b18b4bbf7b99b3160a86da23b153d7ec5663be85b18e78
MD5 fb485fd4711a893a49df2dde3b901483
BLAKE2b-256 0d49a891b6eeabbed674ea51488f409f58a1d3ab22e3f0453980236b9712fc95

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 197dd502a951332267290d94682aa1e0af44fa01b42ba6e21e09fd87be127428
MD5 ce4998b6cb0a213de78b436af7fbd763
BLAKE2b-256 cd9b8e9b8c85413cf91012a26835ab4042cbfd7dcba2cc3f529b0cc96eaec2ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for madb_mcp_server-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cac5fdc77bdef5d5e64c83bd3097bde95090ceb4cad61cdf6864699f670bb2bf
MD5 bcd73ffc0bb9fc91d1a3a66a34ce7d43
BLAKE2b-256 773b05a2230493c5e0f81e48c6ef6660d4739927875edd0f77721e1c151042ba

See more details on using hashes here.

Provenance

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