Show HN: MCP Memory – Fast Agent Memory Using Google's OKF and SQLite FTS5
🧠 MCP Memory: Persistent Agent Cognition via OKF & SQLite FTS5
MCP Memory is a specialized Model Context Protocol (MCP) server designed to grant AI agents—including Cursor, Claude Desktop, Windsurf, Codex, and Antigravity—the ability to maintain a persistent, long-term memory.
Instead of relying on volatile session contexts, this server utilizes the Open Knowledge Format (OKF v0.2) and a local SQLite database to ensure that critical information is stored, indexed, and retrievable across different chat sessions.
🚀 Core Capabilities
The system is built to eliminate forgetfulness memory loss in AI agents by providing:
- Cross-Session Persistence: Agents can save, recall, and modify stateful snippets that survive session restarts.
- Strict OKF Compliance: Every entry is a Markdown document following the OKF v0.2 standard, utilizing YAML frontmatter for metadata (including
type,key,namespace,tags, etc.), as defined inSPEC.mdandOKF_RULES.md. - Hybrid Storage Engine:
- Human-Readable Layer: A
memory/directory containing raw.mdfiles, organized viaindex.md(versioned withokf_version: "0.2") and alog.mdfor audit trails. - Performance Layer: An SQLite FTS5 index enabling lightning-fast lookups.
- Human-Readable Layer: A
🛠️ Architecture Overview
The following diagram illustrates how the server bridges the gap between the AI agent and the physical storage:
🧰 Available MCP Tools
The server provides five primary tools to the agent. The retrieval speed for key lookups is optimized to be .
Memory Management Tools
| Tool | Purpose | Key Parameters |
|---|---|---|
memory_store | Creates or updates an OKF record | key (req), content (req), project_root (req), tags, namespace, concept_type, status, sources, verified, generated_by |
memory_retrieve | Fetches a specific record | key (req), project_root (req), namespace |
memory_search | Keyword/Tag discovery | project_root (req), query, limit (default: 10) |
Session Continuity Tools (Agent Directives)
[!IMPORTANT] These tools are specifically designed for session lifecycle management.
memory_get_last:- Usage: Called at session start.
- Function: Retrieves the
system/last_memorycheckpoint so the agent knows exactly where the previous session ended. - Params:
project_root(req),namespace.
memory_update_last:- Usage: Called during milestones or session end.
- Function: Updates the
system/last_memoryrecord with a summary of progress. - Params:
content(req),project_root(req),namespace,summary.
📄 The OKF v0.2 Structure
All memories are stored as structured Markdown. Here is an example of a record following the SPEC.md guidelines:
---
type: Agent Memory
title: Coding Style
key: user/preferences/coding_style
namespace: default
tags:
- preferences
- style
status: stable
generated:
by: mcp-memory/0.2.0
at: '2026-08-12T19:23:35Z'
created_at: '2026-08-12T19:23:35Z'
updated_at: '2026-08-12T19:23:35Z'
---
User prefers functional programming style with explicit type annotations.
⚙️ Installation & Setup
Getting the server running is designed to be "zero-boilerplate."
- Step 1: Clone the repository
git clone https://github.com/fellowgeek/mcp-memory cd mcp-memory - Step 2: Run the Setup Wizard
python3 setup.py
Note: The setup.py script automatically detects your installed AI tools (e.g., Claude, Cursor) and registers the server so it launches in the background upon tool startup.