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:
- 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
Apache-2.0 (patent pending)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
389fcc468a5138e0202ddbd33c07e22c15500410983799cb1573e0c05a96914f
|
|
| MD5 |
d0fca6fd7d054073b681037c11bd0fc1
|
|
| BLAKE2b-256 |
afdd71b002cbc36951e90f212dc007f9fb48fafac80ea27d5597b4592edd7c11
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
madb_mcp_server-0.1.0.tar.gz -
Subject digest:
389fcc468a5138e0202ddbd33c07e22c15500410983799cb1573e0c05a96914f - Sigstore transparency entry: 1328171877
- Sigstore integration time:
-
Permalink:
spshkar84/meta-agents-db@1d67577203a3d25e993a0b251abd1d6754f593e4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/spshkar84
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mcp-server.yml@1d67577203a3d25e993a0b251abd1d6754f593e4 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8fc6b4755114a14b4c08c8b4fee134670f22b5849d1fbde7460c7edfe503216
|
|
| MD5 |
06e5e99933571398ef4f377f513ff3e4
|
|
| BLAKE2b-256 |
7fd2a0f479867d7e0c5c669ca1b339701909d060e2cbaec9a47533abb3944b6c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
madb_mcp_server-0.1.0-py3-none-any.whl -
Subject digest:
c8fc6b4755114a14b4c08c8b4fee134670f22b5849d1fbde7460c7edfe503216 - Sigstore transparency entry: 1328171882
- Sigstore integration time:
-
Permalink:
spshkar84/meta-agents-db@1d67577203a3d25e993a0b251abd1d6754f593e4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/spshkar84
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mcp-server.yml@1d67577203a3d25e993a0b251abd1d6754f593e4 -
Trigger Event:
push
-
Statement type: