# Memory Engine MCP [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/SimoneB79/memory-engine-mcp  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/memory-engine-mcp

## Description
Local-first graph memory for AI assistants with SQLite, semantic search, and MCP tools.

## Tools
Capabilities this server exposes over MCP:

- **remember** — Create or update an atom
- **recall** — Smart hybrid recall with graph expansion
- **working_set** — Build a task-oriented context pack
- **semantic_search** — Pure semantic search
- **get_atom** — Read one atom with bonds
- **list_atoms** — Browse atoms by domain/type/status
- **merge_atoms** — Merge duplicate atoms
- **export_atom** — Export one atom as markdown
- **link** — Create or remove typed bonds
- **search_graph** — Traverse the graph from one atom
- **suggest_bonds** — Suggest bonds for one atom
- **suggest_bonds_all** — Suggest or create bonds in bulk
- **curator_run** — Conservative curation pass
- **cognitive_status** — Graph and memory health metrics
- **learning_run** — Detect contradictions, weak atoms, merge candidates, gaps
- **ask_pending** — Human-in-the-loop clarification
- **decay_run** — Run decay cycle
- **cleanup_sessions** — Remove expired session atoms
- **cleanup_duplicates** — Remove duplicate session atoms
- **reindex_embeddings** — Rebuild embeddings
- **error_check** — Check past failures before doing a task
- **error_log** — Record a mistake and the correction
- **error_list** — Browse unresolved/resolved errors
- **preference_search** — Search structured preferences
- **import_markdown** — Import markdown notes into atoms
- **memory_summary** — 3-level summary: global → domain → detail
- **stats** — Database statistics
- **version** — Server version
- **recall_session** — Search one OpenClaw session
- **session_summary** — Summarize one OpenClaw session
- **memory_contradict** — Supersede an old atom with a newer contradictory one
- **list_contradictions** — List explicit contradiction/supersession records
- **classify_memory_tier** — Infer the 3-tier class (episodic/semantic/procedural)
- **memory_impact** — Impact analysis: what depends on this atom
- **backup_database** — Create, list, verify, or clean up SQLite snapshots
- **restore_database** — Restore from a backup (with automatic safety backup)
- **export_all** — Export all memory data as portable JSON
- **import_data** — Import from JSON (merge or replace mode)

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/SimoneB79/memory-engine-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Start the server:

```sh
docker compose up -d
```

2. Install:

```sh
git clone https://github.com/SimoneB79/memory-engine-mcp.git
```

3. Run:

```sh
cd memory-engine-mcp
```

4. Configure:

```sh
cp docker-compose.yml docker-compose.local.yml
```

5. Start the server:

```sh
docker compose -f docker-compose.local.yml up -d --build
```

6. Configure:

```sh
python -m venv .venv
```

## Documentation

## What Memory Engine MCP does

Memory Engine MCP stores assistant memory as structured atoms connected by typed bonds. An atom can represent a fact, decision, event, preference, log, procedure, or note, with fields such as a title, body, domain, confidence, weight, tags, and optional expiration. The underlying database is SQLite, with FTS5 indexes, JSON metadata, and version information.

The server is designed for local-first, long-term memory. It can preserve relationships between memories rather than treating each note as an isolated text record. It also includes facilities for contradictions, memory tiers, impact analysis, error history, preferences, session data, backups, and portable import or export.

## How it works

Memory Engine combines SQLite full-text search with optional local embeddings from Ollama using the `nomic-embed-text` model. Hybrid recall considers semantic similarity alongside confidence, recency, and weight, then can expand results through related graph bonds. Pure semantic search is available separately when graph expansion is not wanted.

The memory workflow includes tools for creating or updating atoms, reading and filtering them, merging duplicates, linking related items, and assembling task-oriented working sets. Maintenance tools can identify contradictions, weak memories, merge candidates, gaps, duplicate session atoms, and expired session data. A curator pass is intended for conservative, non-destructive maintenance.

OpenClaw session tools can search and summarize individual sessions. Session ingestion supports an OpenClaw SQLite database with schema 17 and a legacy JSONL fallback. Markdown notes can be imported into atoms without replacing the original human-readable files.

## Setup and configuration

The server can run from Python or Docker. A local Python setup creates a virtual environment, installs `requirements.txt`, and starts `server.py`. Docker Compose can use the published image or build from the repository. The default SSE endpoint is `http://localhost:8085/sse`.

Configuration is stored in `config.json`, with environment variables for database location, markdown imports, bind address, port, optional API authentication, OpenClaw sources, and session digest output. `MEMORY_DB_PATH` defaults to `/data/memory.db`, while `MEMORY_HOST` defaults to `127.0.0.1` and `MEMORY_PORT` to `8085`. `MEMORY_API_TOKEN` enables optional token authentication.

Ollama must be reachable from the server process for semantic embeddings. Set the Ollama feature off when local embeddings are not needed; full-text recall remains available. The optional web UI can run on port 6000 and provides graph exploration, atom inspection, contradiction browsing, impact analysis, and statistics.

## Tools and capabilities

- Capture and retrieve memory with `remember`, `recall`, `working_set`, `semantic_search`, `get_atom`, and `list_atoms`.
- Build and inspect relationships with `link`, `search_graph`, `suggest_bonds`, and bulk bond suggestions.
- Maintain memory with curation, learning, decay, duplicate cleanup, session cleanup, and embedding reindexing tools.
- Track mistakes and preferences through error logging, error checks, error lists, and structured preference search.
- Inspect contradictions, classify memory tiers, analyze atom impact, and generate summaries or statistics.
- Back up and restore SQLite data, or exchange memory through JSON and markdown import/export.

## Limitations and notes

Semantic search depends on Ollama and its configured embedding model; disabling Ollama leaves SQLite FTS-based recall available. The default service bind address is local-only, while remote deployments can configure the host and optional API token. OpenClaw-specific session features depend on the supported SQLite or JSONL session sources. Database snapshots, restore operations, and data imports should be treated as operational tasks because they modify persistent memory.

_Full upstream README: https://allmcps.com/mcp/memory-engine-mcp/readme_

