Memory Engine MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Memory Engine MCPRecall my project preferences from last week."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Why Memory Engine?
Most MCP memory servers are either simple key-value stores or plain text search wrappers.
Memory Engine is different: it models memory as typed atoms connected by typed bonds, then retrieves context with a hybrid ranking pipeline that combines:
full-text search (SQLite FTS5)
semantic similarity via local Ollama embeddings
confidence, recency, and weight
graph expansion from related memories
The goal is not just storage. The goal is a memory system that can recall, connect, decay, curate, and learn over time.
Related MCP server: sostenuto
Highlights
Local-first — SQLite database, optional local embeddings via Ollama, no required cloud API.
MCP-native — exposes 35 tools through FastMCP.
Graph-aware recall — expands top hits through bidirectional bonds for richer context.
Semantic search — meaning-based retrieval with
nomic-embed-text.Markdown coexistence — import existing notes one-way without replacing your human-readable memory.
Error memory — remembers mistakes and corrections, with auto-promotion to preferences after repeated failures.
Cognitive curator — non-destructive maintenance pass for compaction, bond suggestions, duplicate detection, and isolated atom classification.
Session watcher — optional OpenClaw JSONL ingestion with short-lived raw messages and permanent session digests.
Backup & restore — full SQLite snapshots, JSON export/import, verified restores with automatic safety backups.
Auth & hardening — optional API token, secure bind, input validation, rate limiting.
Test suite — 135 tests covering CRUD, ranking, migrations, auth, backup, concurrency.
Benchmark — CLI recall quality suite with Precision@K, MRR, latency percentiles.
Architecture
AI assistant / MCP client
│
▼
FastMCP server — 35 tools
│
▼
Memory engine — hybrid ranking, graph recall, decay, learning
│
├── SQLite — atoms, bonds, FTS5, JSON metadata, versions
├── Ollama — optional local embeddings
├── Curator — conservative maintenance
└── Session watcher — optional OpenClaw session ingestionMCP Tools
Memory
Tool | Purpose |
| Create or update an atom |
| Smart hybrid recall with graph expansion |
| Build a task-oriented context pack |
| Pure semantic search |
| Read one atom with bonds |
| Browse atoms by domain/type/status |
| Merge duplicate atoms |
| Export one atom as markdown |
Knowledge graph
Tool | Purpose |
| Create or remove typed bonds |
| Traverse the graph from one atom |
| Suggest bonds for one atom |
| Suggest or create bonds in bulk |
Learning and maintenance
Tool | Purpose |
| Conservative curation pass |
| Graph and memory health metrics |
| Detect contradictions, weak atoms, merge candidates, gaps |
| Human-in-the-loop clarification |
| Run decay cycle |
| Remove expired session atoms |
| Remove duplicate session atoms |
| Rebuild embeddings |
Error memory and preferences
Tool | Purpose |
| Check past failures before doing a task |
| Record a mistake and the correction |
| Browse unresolved/resolved errors |
| Search structured preferences |
Import and introspection
Tool | Purpose |
| Import markdown notes into atoms |
| 3-level summary: global → domain → detail |
| Database statistics |
| Server version |
| Search one OpenClaw session |
| Summarize one OpenClaw session |
| Supersede an old atom with a newer contradictory one |
| List explicit contradiction/supersession records |
| Infer the 3-tier class (episodic/semantic/procedural) |
| Impact analysis: what depends on this atom |
Backup, restore & export
Tool | Purpose |
| Create, list, verify, or clean up SQLite snapshots |
| Restore from a backup (with automatic safety backup) |
| Export all memory data as portable JSON |
| Import from JSON (merge or replace mode) |
Web UI (optional)
Memory Engine includes an optional web UI for graph exploration, atom inspection, contradiction browsing, and impact analysis.
# In docker-compose.yml, add:
# environment:
# - MEM_UI_PORT=6000
# expose:
# - "6000"Or run standalone:
python3 web_ui.py
# Open http://localhost:6000Quick start with Docker
Option A — Use the pre-built image (recommended)
# docker-compose.yml
services:
memory-engine:
image: ghcr.io/simoneb79/memory-engine-mcp:1.7.0
ports:
- "8085:8085"
volumes:
- memory-data:/data
restart: unless-stopped
volumes:
memory-data:docker compose up -dPin the version. Use an explicit tag like
:1.7.0in production. Avoid:latest— it can change without notice.
Option B — Build from source
git clone https://github.com/SimoneB79/memory-engine-mcp.git
cd memory-engine-mcp
cp docker-compose.yml docker-compose.local.yml
# Edit volume paths in docker-compose.local.yml if needed
docker compose -f docker-compose.local.yml up -d --buildDefault endpoint:
http://localhost:8085/sseExample MCP client config:
{
"mcpServers": {
"memory-engine": {
"url": "http://localhost:8085/sse",
"transport": "sse"
}
}
}See docs/INSTALL.md for Docker, local Python, Claude Desktop, Cursor, and OpenClaw examples.
Local Python
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python server.pyConfiguration
Main configuration file: config.json
Important environment variables:
Variable | Default | Purpose |
|
| SQLite database path |
|
| Markdown directory for import |
|
| Server bind address (secure default) |
|
| SSE port |
| (none) | Optional API token for auth (see Security) |
|
| Optional OpenClaw sessions directory |
|
| Optional session digest output |
Semantic search requires Ollama reachable from the container or host. Default:
{
"ollama": {
"enabled": true,
"host": "http://ollama:11434",
"model": "nomic-embed-text"
}
}If you do not use Ollama, set ollama.enabled to false; FTS recall still works.
Memory model
Atoms have:
titlebodytype:fact,decision,event,preference,log,procedure,note, etc.domain: project or topic namespaceconfidenceweighttagsoptional TTL
Bonds connect atoms with relation types:
is_a · part_of · depends_on · contradicts · refines · derived_from · detail_of · related_toExample usage
remember(
title="Use PostgreSQL for analytics",
body="SQLite is kept for local memory, PostgreSQL is used for multi-user analytics.",
type="decision",
domain="project:analytics",
confidence=0.9,
tags=["database", "architecture"]
)recall(query="what database did we choose for analytics?", limit=5)working_set(
query="continue the analytics backend work",
domain="project:analytics",
limit=8,
graph_depth=1
)Security
By default, Memory Engine runs in open mode (no auth) — safe for stdio or trusted local environments.
To enable API token auth:
// config.json
{
"security": {
"api_token": "your-secret-token",
"allow_remote": false
}
}Or via environment variable:
MEMORY_API_TOKEN=your-secret-tokenWhen auth is enabled:
MCP SSE requests must include
Authorization: Bearer <token>Web UI API endpoints require
?token=<token>or Bearer headerServer binds to
127.0.0.1unlessallow_remote: trueInput validation (title/body size limits) and rate limiting are always active
See CHANGELOG.md for the full list of security features.
Publishing and registries
This repository is prepared for MCP discovery:
MCP Registry name:
io.github.simoneb79/memory-engine-mcpRegistry metadata:
server.jsonDocker/OCI verification label: included in
DockerfileClient config example:
mcp.json
See docs/PUBLISHING.md for the publication checklist.
Repository status
Public GitHub repository: https://github.com/SimoneB79/memory-engine-mcp
Existing listing: https://mcpmarket.com/server/memory-engine
License: MIT
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
Alicense-qualityBmaintenanceEnables persistent memory storage and retrieval for MCP clients, allowing AI assistants to remember facts and context across conversations.10MIT- Alicense-qualityBmaintenanceProvides a selective persistent memory layer for AI companions, enabling structured recall, reinforcement, and time-decayed retrieval through an MCP interface.10MIT
- Alicense-qualityDmaintenanceGives AI agents persistent memory with semantic search, automatic extraction, and memory decay, accessible via MCP protocol.7MIT
- Alicense-qualityCmaintenanceEnables persistent memory for AI agents, combining episodic and semantic memory with LLM reasoning, accessible via MCP.2MIT
Related MCP Connectors
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Cross-vendor AI memory over MCP. One semantic store, readable and writeable from every MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SimoneB79/memory-engine-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server