# Memory Genome Engine

> Local-first structured memory engine for AI agents with binary storage, CLI/TUI, MCP-ready JSON-RPC, SDKs, and optional encrypted stores.

- **Type:** MCP server
- **Install:** `agentstack add mcp-ecd5a-memory-genome-engine`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ECD5A](https://agentstack.voostack.com/s/ecd5a)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [ECD5A](https://github.com/ECD5A)
- **Source:** https://github.com/ECD5A/Memory-Genome-Engine

## Install

```sh
agentstack add mcp-ecd5a-memory-genome-engine
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Memory Genome Engine

  
  
  
  
  
  
  
  
  Русская версия

Memory Genome Engine gives AI agents durable, local-first project memory they can recall across sessions without requiring a cloud service or vector database. It stores typed `MemoryCell` records, describes them with `MarkerGenome`, moves cold memory into sealed binary pages, and returns task-relevant `ContextPacket` output.

  

## What It Does

- Remembers facts, decisions, preferences, notes, and agent observations.
- Keeps recent memory in fast L1 Hot RAM with durable binary persistence.
- Seals older memory into immutable binary pages with candidate indexes.
- Supports focused, broad, and full-scope recall.
- Versions contradictory facts and decisions through explicit, history-preserving supersession.
- Imports existing Markdown notes as one-time migration input and supports soft memory status maintenance.
- Provides CLI, TUI, an MCP-compatible stdio server, Python SDK, and TypeScript SDK.
- Supports opt-in encrypted stores for hot payloads, snapshots, and sealed page payloads.
- Uses binary runtime storage; JSON is protocol/debug report output only.

## Why MGE

MGE treats agent memory as an inspectable local subsystem rather than an opaque chat-history or hosted-search feature:

- `MarkerGenome` keeps scope, kind, status, trust, sensitivity, subject, and custom markers explicit.
- The hot-to-sealed lifecycle combines immediate RAM recall with durable, validateable binary storage.
- `ContextPacket` returns ranked memory together with constraints, warnings, and score details for agent workflows.
- CLI, MCP-compatible stdio, and thin SDKs expose the same Rust engine without requiring a cloud service, embedding model, or vector database.

Marker-first retrieval is deterministic and lightweight, but it is not universal semantic search. Query anchors and ingestion quality matter, and default recall ranks candidates rather than automatically abstaining. Agent hosts that prefer silence over weak matches can opt in with `--min-score` / `min_score`. The [measured evidence and limitations](docs/RELEASE.md#external-retrieval-evidence) are documented separately.

## Measured Evidence

Local release-mode retrieval runs use strict top-5 scoring and official dataset files supplied outside the repository:

| Dataset / default Exact focused path | Memories | Hit@5 | Recall@5 | MRR@5 |
|---|---:|---:|---:|---:|
| LongMemEval Oracle | 4,578 | 0.972 | 0.877 | 0.775 |
| LongMemEval-S | 85,253 | 0.896 | 0.782 | 0.701 |
| LoCoMo | 5,881 | 0.531 | 0.487 | 0.393 |

These measure retrieval from deterministic adapters, not final LLM answer quality or superiority over another product. Dataset revisions, checksums, ingestion rules, BM25 diagnostics, context-budget measurements, and limitations are in [Release](docs/RELEASE.md#external-retrieval-evidence).

## Quick Start

Install a checksummed release using the [Quickstart](QUICKSTART.md), then initialize a store and optionally connect a local agent host:

```bash
mge setup
mge setup codex
mge setup claude-code
mge setup cursor
mge remember "User prefers concise technical answers" --kind user_preference --scope global --trust user_confirmed
mge supersede 1 "User now prefers detailed answers" --kind user_preference --scope global
mge recall "How should the agent answer technical questions?"
mge seal
mge compact                 # dry-run only
mge compact --apply         # physically prune confirmed obsolete memory
mge validate --deep
```

`supersede` fixes the active version seen by recall. `compact` later removes confirmed superseded, deprecated, and rejected payloads plus completed hot-log archives. Temporary memory is retained unless an explicit age threshold is supplied.

`mge setup codex`, `mge setup claude-code`, and `mge setup cursor` register the local `mge-mcp-server` for those hosts. `mge setup generic-mcp` prints a portable stdio configuration for other tools.

Terminal UI:

```bash
mge tui
mge setup --help
```

## Encrypted Store

```bash
export MGE_PASSPHRASE="use-a-real-secret"
mge init --encrypted --passphrase-env MGE_PASSPHRASE
mge remember "private memory" --passphrase-env MGE_PASSPHRASE
mge recall "private memory" --passphrase-env MGE_PASSPHRASE
mge seal --passphrase-env MGE_PASSPHRASE
mge validate --deep --passphrase-env MGE_PASSPHRASE
```

Payload encryption protects hot records, snapshots, and sealed page payloads. Metadata such as marker dictionary, indexes, catalog summaries, Markdown export, and process memory while unlocked remains plaintext by design. See [Security](docs/SECURITY.md).

## Agent Integration

Agents can use the same local store through CLI commands, the MCP-compatible stdio server, or thin SDK wrappers.

CLI recall:

```bash
mge recall "project context" --mode broad --scope my_project
```

MCP stdio server for any compatible host:

```bash
mge-mcp-server --store .memory-genome
```

SDK examples:

```bash
python examples/python_agent_host.py
node examples/typescript_agent_host.ts
```

See [Integration](docs/INTEGRATION.md) for encrypted host setup, schemas, structured errors, and SDK details.

## Documentation

- [Quickstart](QUICKSTART.md)
- [Architecture](docs/ARCHITECTURE.md)
- [Security model](docs/SECURITY.md)
- [Integration / MCP / SDK](docs/INTEGRATION.md)
- [Release checks](docs/RELEASE.md)

## Community

- [General feedback](https://github.com/ECD5A/Memory-Genome-Engine/issues/new?template=general_feedback.yml)
- [Ideas and questions](https://github.com/ECD5A/Memory-Genome-Engine/discussions)
- [License](LICENSE)
- [Notice](NOTICE)
- [Security policy](SECURITY.md)
- [Contributing](CONTRIBUTING.md)
- [Code of conduct](CODE_OF_CONDUCT.md)

## Donate

If Memory Genome Engine is useful to your work, you can support the project here:

- Bitcoin (BTC): `1ECDSA1b4d5TcZHtqNpcxmY8pBH1GgHntN`
- USDT (TRC20): `TUF4vPdB6QkjCvZq18rBL4Qj4dK5ihCN75`

## Contact

For commercial integration, support, collaboration, and partnership inquiries:

  
  &nbsp;
  
  &nbsp;

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ECD5A](https://github.com/ECD5A)
- **Source:** [ECD5A/Memory-Genome-Engine](https://github.com/ECD5A/Memory-Genome-Engine)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ecd5a-memory-genome-engine
- Seller: https://agentstack.voostack.com/s/ecd5a
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
