Integration notes
How memalyze fits as an optional memory backend. The short version: it is a normal MCP server, it can run per-tenant, and it fails closed when exposed off-loopback without a token.
What it is
- One static binary, MCP over stdio or Streamable HTTP, SQLite storage, Ollama local embeddings.
- Four tools:
memory_add,memory_search,memory_delete,echo. - Redaction runs before dedup/FTS/embedding; every read is appended to an audit table.
Option A — stdio MCP server
The simplest integration: the client spawns the binary.
{
"mcpServers": {
"memalyze": {
"command": "/usr/local/bin/memalyze",
"env": {
"MEMALYZE_DB": "/var/lib/memalyze/memalyze.db",
"MEMALYZE_TENANT": "acme"
}
}
}
}
Option B — HTTP backend
For containers or multiple clients. Binding a non-loopback address without MEMALYZE_HTTP_TOKEN is refused at startup.
MEMALYZE_HTTP_ADDR=127.0.0.1:8080 \
MEMALYZE_HTTP_TOKEN=$(openssl rand -hex 24) \
memalyze --http 127.0.0.1:8080
Tenancy and isolation
| Level | How |
|---|---|
| Tenant | MEMALYZE_TENANT / tenant_id on each call |
| Scope | scope per call (e.g. crm, support) |
| Per-user auth | Not implemented. One token per process = one trust boundary. |
For two teams that must not read each other's memories, run two processes with separate databases and tokens. That is the supported isolation model today.
Audit
Append-only table: timestamp, actor, tenant, scope, action, memory id, query SHA-256 + length, result count, degraded flag.
UPDATEis rejected by a trigger;DELETEis not blocked (SQL-level append-only, not WORM).- Export:
memalyze audit export --format csv. - For stronger guarantees, ship the CSV to object-lock or syslog storage.
Deployment
- Prebuilt binaries for Linux/macOS/Windows (amd64/arm64); no runtime.
- systemd unit and
memalyze backup(VACUUM INTO) are in the repo. - Ollama +
qwen3-embedding:0.6b(~640 MB). If Ollama is unavailable, search degrades to keyword in ≤3 s and returnsdegraded=true.
Limits
- Redaction is pattern matching (8 families + custom rules); no names/addresses/images.
- SQLite single writer; brute-force vectors suit ~10k memories per instance.
- No audit UI, retention policy, encryption at rest, or TLS termination.
- AGPL-3.0; commercial license available.