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

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

LevelHow
TenantMEMALYZE_TENANT / tenant_id on each call
Scopescope per call (e.g. crm, support)
Per-user authNot 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.

Deployment

Limits

Request a two-week pilot →