madb-mcp-server
Persistent causal memory for Claude Code — causal chains, composite-scored recall, and a built-in Memory-ROI meter.
madb-mcp-server gives Claude Code (and any MCP-compatible client) a real database backend for agent memory: causal chains, composite-scored recall, a tamper-evident integrity chain, 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"
}
}
}
}
Tool discovery
The table below describes selected tools, not the complete active profile.
Use MCP list_tools or capabilities(output_format="json") for the active
tool names and count. Advanced tools may be hidden by the selected profile.
0.2.15 candidate recall contract
recall returns a versioned JSON packet, including in the default output mode.
The standard wheel enables Candle, with runtime initialization/fallback depending
on configuration and model availability. Recall admission uses experimental lexical
content coverage. Shared tags, importance and recency do not establish relevance.
memory_context uses the same admission rule. admission_mode="ranked" retains
diagnostic candidate access; raw search is also available.
Context records retain payload, event ID, timestamp and causal parents; they omit engine diagnostics and vectors. The context default is now 1,500 estimated tokens (also the preview profile maximum) to accommodate the complete receipt envelope.
The complete packet is bounded by a conservative UTF-8 byte estimate (one byte
per estimated token), including metadata. Records that do not fit are omitted;
budgets smaller than the receipt envelope return budget_exhausted. This can
return fewer records than the previous payload-only estimator.
temporal_axis="effective" preserves the legacy as_of_ms semantics.
temporal_axis="knowledge" uses an explicit supersession timestamp. Legacy
supersessions without that timestamp fail explicitly when encountered. This
does not restore forgotten records or promise complete MVCC history. A downgrade
to an older writer may discard the added timestamp; retain a backup before an
upgrade and do not mix old and new writers when relying on knowledge history.
Integrity hashes also preserve their original timestamp independently of lifecycle
overlays; older writers do not understand this field. Existing corrupted chains
are not silently repaired or relinked by this change.
Model identity is reported separately from verified health. An unknown model does not establish semantic readiness or vector-index compatibility. The semantic admission thresholds and broader held-out quality gates remain pending.
| 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 (run the
analyticstool to see your session's ratio)
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 |
MADB_API_KEY |
(unset) | If set, every tool call must pass a matching api_key |
MADB_TELEMETRY |
(on) | Set to off to disable anonymous usage telemetry |
MADB_SKIP_UPDATE_CHECK |
(unset) | Set to 1 to disable the daily PyPI version check |
Privacy & Telemetry
Your memory content never leaves your device — all data is stored locally
under MADB_DATA_DIR (~/.madb by default).
To improve the product, the server sends anonymous usage telemetry:
- What is sent: an opaque random install id, the package version, the host OS/Python version, the MCP runtime (e.g. claude-code), and counts — tool-call totals, distinct tools used, recall hits, sessions.
- What is never sent: memory content, queries, payloads, tenant names, file paths, usernames, or hostnames. "We measure how much, never what."
- When: an
activationevent on first connect and aheartbeatat most once per day. Fire-and-forget; it never blocks or delays a tool call. - Opt out completely: set
MADB_TELEMETRY=off.
A one-time notice is printed on first launch. On first run the server also
copies a bundled Claude Skill into ~/.claude/skills (existing files are left
untouched) and checks PyPI for updates (MADB_SKIP_UPDATE_CHECK=1 to disable).
How It Works
MADB is an agent-native database built in Rust with 5 novel primitives:
- Causal DAG — every memory links to what caused it, forming an evidence chain
- Composite-scored recall — vector similarity + recency + causal proximity + importance
- Storage-layer policy — scope and retention rules enforced at the engine level
- Partitioned WAL — per-tenant write-ahead log for crash safety
- Time-bucketed HNSW — vector index organized by time for recency-aware search
License
Meta-Agents.AI Proprietary License v1.0. Install-and-use is permitted for end-users of the published wheels; source access, OEM embedding, and hosted-service rights are reserved for separately-negotiated agreements. Patent pending.
Metadata
Release files for madb-mcp-server 0.2.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 11.2 MB
Release files / madb_mcp_server-0.2.15-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madb_mcp_server-0.2.15-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
18fbb7e3a74b5eef8627ee49fa3548ff666da7876f09da85b68265b0c6d655d5
|
|
BLAKE2b-256 checksum How to use checksums |
ce595e55af62b3de7b77ea9a21e364c03c2d0ce45a9650a521efaf181c847ff0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | madb_mcp_server-0.2.15-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 962.5 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
8f396e2682723f95794a70ed5a2031cc2a758a7b3274965abf9ba316f2b84be7
|
|
BLAKE2b-256 checksum How to use checksums |
7205bf8afad7a84acb8698d3c72b70604410240bdf35bb5dfa7107e4609bcef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | madb_mcp_server-0.2.15-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 965.0 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6fcd878a3fd32a3cd366a204b9d347536630533e1f3b6c3bc62d802eac91cf18
|
|
BLAKE2b-256 checksum How to use checksums |
5a8dd656e841d90bf7e9691b94a015c53b319761fa6768869fa52aa30762cd49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madb_mcp_server-0.2.15-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
54dcbb1490c23dc7b90866d7233599128de3096dd2bf2eaf20540d1fbfa446cd
|
|
BLAKE2b-256 checksum How to use checksums |
08ed4cc5e8c83c781f658cbcb560978a627ebbe89f7d5fca1c74d7d3570551ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | madb_mcp_server-0.2.15-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 963.5 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
50ccfd2bf65d332d4d46e48f724eebb9f0d2691e8d549e277aa9fdc09c6a9803
|
|
BLAKE2b-256 checksum How to use checksums |
531d1f2d48638c20990e5e3247fedbfaf09c28a195ae022bafcb51894999c50a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | madb_mcp_server-0.2.15-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 940.0 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8ac5f6d6b16737116588a990d9887ffa83e23d5aa0e643c4a4311fec84fd2d7a
|
|
BLAKE2b-256 checksum How to use checksums |
ad053a518317769a8dffcf96d67a31098bd5ff198a6d9a10db817db566790794
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madb_mcp_server-0.2.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 921.1 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
674065dad027a55f06c18ad2c72279e4002987bf07d0e3bdd5f820576b4e6028
|
|
BLAKE2b-256 checksum How to use checksums |
ec54813a5758a5c874a181e58746cf22b407d2ff501722b21651fedf7866f3ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | madb_mcp_server-0.2.15-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 811.8 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
b8cc2263dc2a952a7e7c99ea2c192013e508b96fb5bb161668e3e168d83a6f0a
|
|
BLAKE2b-256 checksum How to use checksums |
a62b8cb2b33f6d7fdf5b0c895e0a0fb060ca9c5cec79a28d5c12c62db0409377
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | madb_mcp_server-0.2.15-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 819.3 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ffe41106fa78f22cb1cde06db67d21ae6a7eab1c7ca8ae3902e957cfe83fc779
|
|
BLAKE2b-256 checksum How to use checksums |
d90a5b44f14b28824ad8266b02c4643923e4533ef39fa68b57cd3a54ed7ab08c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madb_mcp_server-0.2.15-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 949.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
810dbb5f4eb57f112f89841f008a288f463802a585342772128ccb46138d8232
|
|
BLAKE2b-256 checksum How to use checksums |
35b4fc370e9e598bac82f4eeafc18dbf171c7688e4b261489e0e2bde7c3b454e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | madb_mcp_server-0.2.15-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 829.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
acebde715f9936a7bd4b886cdfd9065a814624c42af3a5a499b55f33186390be
|
|
BLAKE2b-256 checksum How to use checksums |
d6b9175af78477456b17256fd3021f1aae1d043d244c1a42708240302880bae2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / madb_mcp_server-0.2.15-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | madb_mcp_server-0.2.15-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 867.2 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eaa67f205c60cac34b6784243f8889491a519103be38741b4ed6cdb07267a9c0
|
|
BLAKE2b-256 checksum How to use checksums |
daed696aa6c61b41427e6dc1e4e1d2d0f548c80a2a1f199e84cd0075af665c2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for madb-mcp-server 0.2.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.