MMAGEarly alpha

Local-first memory for MCP clients

Switch AI tools.
Keep the context.

MAG gives your configured AI tools one shared, local memory for decisions, fixes and handoffs. One Rust binary. One SQLite file. No MAG account.

$ curl -fsSL https://raw.githubusercontent.com/George-RD/mag/main/install.sh | sh
Inspect the source →

Tested primarily on macOS and Linux. The first semantic query downloads the local embedding model.

~/.mag/memory.dblocal
decision · project:apiUse exponential backoff with jitter.
bugfix · project:workerCancelled task leaked a socket.
handoff · project:migrationVerify schema changes against fixtures.
query How should retries work?
match backoff with jitter · 0.94

Your tools forget in different places.

Built-in memory stays inside one product. Notes require the agent to know where to look. A raw vector database still needs a memory model, retrieval rules and an MCP surface.

Product memory

Useful, but captive.

Context saved in one assistant does not automatically follow you to another.

Project notes

Readable, but passive.

Files work when the right instruction loads the right file at the right moment.

DIY retrieval

Flexible, but unfinished.

Similarity search is only one part of memory lifecycle, provenance and maintenance.

One store. Three retrieval signals.

MCP clients call MAG. MAG preserves the source record in SQLite, then combines exact text, local semantic matching and linked context. Weak matches can return nothing.

MCP clients connect to MAG, which stores memories locally and retrieves them with full-text, semantic and relationship signals.
Storage~/.mag/memory.db
EmbeddingsLocal ONNX by default
InterfaceCLI + 19 MCP tools
Core telemetryNone

Evidence, with the edges left visible.

The public benchmark is useful evidence for retrieval. It is not a promise that every workload or end-to-end generated answer will score the same.

MAG scored 90.1 percent and AutoMem reported 90.5 percent in a LoCoMo retrieval-only comparison.
90.1%

LoCoMo retrieval-only recall

Measured across 1,986 questions on 28 March 2026. AutoMem reports 90.5% under a similar retrieval-only word-overlap method.

Dataset, command, commit, category results and limitations are documented in the repository.

What you gain.

  • Shared context across configured MCP clients on one machine.
  • No MAG cloud account in the core path.
  • A portable and inspectable SQLite file.
  • Hybrid retrieval with explain mode and abstention.
  • Public code, benchmark method and roadmap.

What you accept.

  • Early-alpha interfaces and internals may change.
  • Cross-device sync is not ready.
  • The database is plaintext; sensitive work needs disk encryption.
  • First use downloads a model and runtime memory is about 180 MB.
  • Windows builds exist, but field testing is limited.

Roadmap in dependency order.

No dates are promised. Each phase is blocked until the evidence and architecture beneath it are good enough.

  1. Stabilise the production path.

    Audit live callers, dead code and competing composition paths. Choose one root before adding more behaviour.

    In progress
  2. Build a local evaluation gate.

    Version the test set and measure extraction, retrieval, reranking, latency, RAM and offline success.

    Blocked by audit
  3. Wire the local 1.2B baseline.

    Use LFM2.5 1.2B through the selected production path with explicit fallback and observable failure.

    Planned
  4. Add provenance-preserving memory intelligence.

    Test facts, relationships, contradictions and summaries without replacing raw memories.

    After evidence
  5. Add service and cross-device modes.

    Reuse the same contracts for authentication, sync and tenancy while keeping local mode independent.

    Later

Use MAG when

You use more than one MCP client, project decisions matter beyond one session, and local control matters more than managed convenience.

Wait when

You need managed sync, application-level encryption, an enterprise SLA or a stable long-term public API today.

Keep the next session from starting at zero.

Install MAG, run setup, then tell your agent which decisions, fixes and handoffs are worth keeping.

$ curl -fsSL https://raw.githubusercontent.com/George-RD/mag/main/install.sh | sh