{"slug": "show-hn-mcp-memory-fast-agent-memory-using-google-s-okf-and-sqlite-fts5", "title": "Show HN: MCP Memory – Fast Agent Memory Using Google's OKF and SQLite FTS5", "summary": "MCP-Memory, a Model Context Protocol server, provides AI agents with persistent memory using Google's Open Knowledge Format v0.2 and SQLite FTS5, enabling sub-20ms key lookups and full-text search. The server exposes four MCP tools for storing, retrieving, and searching memory records, and supports namespace isolation and automatic setup for tools like Claude Desktop, Cursor, and Codex.", "body_md": "**MCP-Memory** is a Model Context Protocol (MCP) server that equips AI agents (such as Claude Desktop, Cursor, Antigravity, Windsurf, or Codex) with persistent, long-term memory capabilities.\n\nMemory records are formatted using the [ Open Knowledge Format (OKF v0.2)](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md) standard and indexed with a local\n\n**SQLite** instance (supporting FTS5 full-text search) for fast key-value lookups, tag filtering, and content search.\n\nFast Track:[Jump directly to Quick Start]\n\n**Persistent State Across Sessions:** Enables AI agents to read, store, search, and delete stateful memory snippets that persist across chat turns and sessions.**OKF Standard Compliance:** Stores every memory item formatted as an OKF v0.2 Markdown document with YAML frontmatter (`type`\n\n,`key`\n\n,`namespace`\n\n,`tags`\n\n,`generated`\n\n,`sources`\n\n,`verified`\n\n,`status`\n\n,`stale_after`\n\n), adhering strictly toand`SPEC.md`\n\n.`OKF_RULES.md`\n\n**Dual-Layer Architecture:****Human-Browseable OKF Directory**: Automatically dumps and syncs every memory to disk as a raw`.md`\n\nfile inside the`memory/`\n\nbundle directory with hierarchical`index.md`\n\nprogressive disclosure files (root`index.md`\n\nversioned with`okf_version: \"0.2\"`\n\n) and`log.md`\n\nupdate history tracking.**High-Performance SQLite Indexing**: SQLite FTS5 (Full-Text Search) and automatic triggers for sub-20ms key lookups and instant keyword searches.\n\n**Namespace Isolation:** Supports contextual separation (e.g.`user/preferences`\n\n,`project/architecture`\n\n,`default`\n\n).**Zero Boilerplate Setup:** Quick setup wizard (`python3 setup.py`\n\n) auto-configures installed MCP tools (Antigravity, Claude, Cursor, Windsurf, Codex).\n\nThe server exposes four primary MCP tools to interacting agents:\n\nStores or updates a memory record in OKF v0.2 format.\n\n**Parameters:**`key`\n\n*(string, required)*: Unique identifier or path for the memory (e.g.`user/preferences/coding_style`\n\nor`project/architecture`\n\n).`content`\n\n*(string or object, required)*: Core information to store.`project_root`\n\n*(string, required)*: Absolute path to the active project root directory (e.g.`/Users/user/Projects/my-app`\n\n).`tags`\n\n*(array of strings, optional)*: Classification tags for filtering.`namespace`\n\n*(string, optional, default:*: Scope/namespace.`\"default\"`\n\n)`concept_type`\n\n*(string, optional, default:*: OKF concept type (e.g.`\"Agent Memory\"`\n\n)`Metric`\n\n,`Playbook`\n\n,`Attested Computation`\n\n).`title`\n\n*(string, optional)*: Display name.`description`\n\n*(string, optional)*: One-line summary.`resource`\n\n*(string, optional)*: Canonical URI of underlying asset.`status`\n\n*(string, optional, default:*: Lifecycle state (`\"stable\"`\n\n)`draft`\n\n|`stable`\n\n|`deprecated`\n\n).`stale_after`\n\n*(string, optional)*: ISO date (`YYYY-MM-DD`\n\n).`sources`\n\n*(array of objects, optional)*: Provenance sources`[{resource, id, title, author, usage_count, last_modified}]`\n\n.`verified`\n\n*(array of objects or object, optional)*: Verification events`[{by, at}]`\n\n.`generated_by`\n\n*(string, optional)*: Actor identifier following actor convention (`<producer>/<version>`\n\n,`human:<id>`\n\n,`process:<id>`\n\n).\n\nRetrieves a specific memory by its key and namespace.\n\n**Parameters:**`key`\n\n*(string, required)*: The memory key to look up.`project_root`\n\n*(string, required)*: Absolute path to the active project root directory.`namespace`\n\n*(string, optional, default:*: Scope/namespace.`\"default\"`\n\n)\n\nFinds memories matching keywords, tags, or namespace filters.\n\n**Parameters:**`project_root`\n\n*(string, required)*: Absolute path to the active project root directory.`query`\n\n*(string, optional)*: Keyword search query across keys, frontmatter, and content.`tags`\n\n*(array of strings, optional)*: Filter by specific tags.`namespace`\n\n*(string, optional)*: Scope search to a namespace.`limit`\n\n*(integer, optional, default: 10)*: Maximum number of results.\n\n**AGENT DIRECTIVE (Session Start):** Retrieves the last recorded session checkpoint (`system/last_memory`\n\n) so the AI agent immediately knows where work was left off when opening a project or starting a session.\n\n**Parameters:**`project_root`\n\n*(string, required)*: Absolute path to active project root directory.`namespace`\n\n*(string, optional, default:*: Scope/namespace.`\"default\"`\n\n)\n\n**AGENT DIRECTIVE (Milestones & Progress):** Updates the canonical session checkpoint (`system/last_memory`\n\n) whenever completing a milestone, making key changes, or pausing work.\n\n**Parameters:**`content`\n\n*(string or object, required)*: Brief note or structured dictionary summarizing progress and referencing key memory files.`project_root`\n\n*(string, required)*: Absolute path to active project root directory.`namespace`\n\n*(string, optional, default:*: Scope/namespace.`\"default\"`\n\n)`summary`\n\n*(string, optional)*: One-sentence description of the milestone achieved.\n\nEvery stored memory strictly adheres to the OKF v0.2 specification ([ SPEC.md](/fellowgeek/mcp-memory/blob/main/SPEC.md) &\n\n[):](/fellowgeek/mcp-memory/blob/main/OKF_RULES.md)\n\n`OKF_RULES.md`\n\n```\n---\ntype: Agent Memory\ntitle: Coding Style\nkey: user/preferences/coding_style\nnamespace: default\ntags:\n- preferences\n- style\nstatus: stable\ngenerated:\n  by: mcp-memory/0.2.0\n  at: '2026-08-12T19:23:35Z'\ncreated_at: '2026-08-12T19:23:35Z'\nupdated_at: '2026-08-12T19:23:35Z'\n---\n\nUser prefers functional programming style with explicit type annotations.\ngit clone https://github.com/fellowgeek/mcp-memory\ncd mcp-memory\n```\n\nRun `setup.py`\n\nto auto-detect and register `mcp-memory`\n\nwith your AI tools:\n\n```\npython3 setup.py\n```\n\nNote:Once`setup.py`\n\nfinishes configuring your tools, your AI client will launch`mcp-memory`\n\nautomatically in the background whenever needed. You do not need to manually start or keep a server process running in your terminal.\n\nIf you want to manually verify startup, inspect stdio output, or pre-initialize the virtual environment (`.venv`\n\n), you can run `run.sh`\n\ndirectly:\n\n```\n./run.sh\n```\n\nIf you prefer to configure your MCP client manually, add the `\"memory\"`\n\nserver entry pointing to `run.sh`\n\n:\n\nAdd to your client's `mcp_config.json`\n\nor `claude_desktop_config.json`\n\n:\n\n```\n{\n  \"mcpServers\": {\n    \"memory\": {\n      \"command\": \"/ABSOLUTE/PATH/TO/run.sh\"\n    }\n  }\n}\n```\n\nAdd to `~/.codex/config.toml`\n\n:\n\n```\n[mcp_servers.memory]\ncommand = \"/ABSOLUTE/PATH/TO/run.sh\"\n```\n\n**Claude Code CLI:**\n\n```\nclaude mcp add --scope user memory -- /ABSOLUTE/PATH/TO/run.sh\n```\n\n**Codex CLI:**\n\n```\ncodex mcp add memory -- /ABSOLUTE/PATH/TO/run.sh\n```\n\nRun the automated test suite to verify OKF serialization, SQLite database operations, and FastMCP tool execution:\n\n```\npython3 test_memory.py\n```\n\nBy default, `mcp-memory`\n\ncreates project-isolated memory stores inside each project's root directory:\n\n**OKF Markdown Files (Human-readable)**:`memory/`\n\nfolder in project root.**SQLite Database (Hidden index)**:`.mcp_memory/memories.db`\n\nin project root.\n\nYou can customize this behavior using environment variables:\n\n`MCP_MEMORY_PROJECT_ROOT`\n\n: Project root directory (default: process current working directory`cwd`\n\n).`MCP_MEMORY_DB_PATH`\n\n: SQLite database file path (default:`.mcp_memory/memories.db`\n\nrelative to project root).`MCP_MEMORY_DIR`\n\n: Directory for Open Knowledge Format (OKF)`.md`\n\nfiles (default:`memory`\n\nrelative to project root).\n\nTip:If you prefer a single global memory store shared across all projects, set`MCP_MEMORY_DB_PATH=~/.mcp_memory/memories.db`\n\nand`MCP_MEMORY_DIR=~/.mcp_memory/memory`\n\nin your client's MCP configuration.", "url": "https://wpnews.pro/news/show-hn-mcp-memory-fast-agent-memory-using-google-s-okf-and-sqlite-fts5", "canonical_source": "https://github.com/fellowgeek/mcp-memory", "published_at": "2026-08-13 13:57:47+00:00", "updated_at": "2026-08-13 14:12:29.341837+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "developer-tools"], "entities": ["Google", "MCP-Memory", "Claude Desktop", "Cursor", "Antigravity", "Windsurf", "Codex"], "alternates": {"html": "https://wpnews.pro/news/show-hn-mcp-memory-fast-agent-memory-using-google-s-okf-and-sqlite-fts5", "markdown": "https://wpnews.pro/news/show-hn-mcp-memory-fast-agent-memory-using-google-s-okf-and-sqlite-fts5.md", "text": "https://wpnews.pro/news/show-hn-mcp-memory-fast-agent-memory-using-google-s-okf-and-sqlite-fts5.txt", "jsonld": "https://wpnews.pro/news/show-hn-mcp-memory-fast-agent-memory-using-google-s-okf-and-sqlite-fts5.jsonld"}}