logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

Show HN: MCP Memory – Fast Agent Memory Using Google's OKF and SQLite FTS5

Original article
github.com|46 points|22 comments|by pcbmaker20|Aug 13, 2026

🧠 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.

MCP Memory Concept


🚀 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 in SPEC.md and OKF_RULES.md.
  • Hybrid Storage Engine:
    1. Human-Readable Layer: A memory/ directory containing raw .md files, organized via index.md (versioned with okf_version: "0.2") and a log.md for audit trails.
    2. Performance Layer: An SQLite FTS5 index enabling lightning-fast lookups.

🛠️ 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 latency<20ms\text{latency} < 20\text{ms}latency<20ms.

Memory Management Tools

ToolPurposeKey Parameters
memory_storeCreates or updates an OKF recordkey (req), content (req), project_root (req), tags, namespace, concept_type, status, sources, verified, generated_by
memory_retrieveFetches a specific recordkey (req), project_root (req), namespace
memory_searchKeyword/Tag discoveryproject_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_memory checkpoint 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_memory record 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.