MCP-Memory
An OKF-backed MCP server that gives AI agents persistent, long-term memory with SQLite FTS5 search, namespace isolation, and human-readable Markdown storage.
At a Glance
Fully free and open-source under the MIT License. Clone, use, modify, and distribute freely.
Engagement
Available On
Alternatives
Listed Aug 2026
About MCP-Memory
MCP-Memory is an open-source Model Context Protocol (MCP) server written in Python that equips AI agents with persistent, long-term memory across sessions. It stores memory records using the Open Knowledge Format (OKF v0.2) standard and indexes them in a local SQLite database with FTS5 full-text search for fast lookups, tag filtering, and keyword queries. The project is authored by Erfan Reed (fellowgeek) and released under the MIT License.
What It Is
MCP-Memory solves a core limitation of stateless AI agents: the inability to remember context, preferences, or progress between sessions. By acting as an MCP server, it exposes a set of tools that agents like Claude Desktop, Cursor, Windsurf, Antigravity, and Codex can call to store, retrieve, search, and delete structured memory snippets. Each memory is a self-describing OKF v0.2 Markdown document with YAML frontmatter, persisted both as a human-readable .md file on disk and as a row in a local SQLite index.
Dual-Layer Architecture
The server maintains two synchronized representations of every memory record:
- Human-Browseable OKF Directory: Every memory is written to a
memory/folder in the project root as a raw.mdfile. A hierarchicalindex.mdprovides progressive disclosure, and alog.mdtracks update history. - High-Performance SQLite Index: An FTS5-enabled SQLite database (
.mcp_memory/memories.db) supports sub-20ms key lookups and instant keyword searches via automatic triggers.
This dual-layer design means developers can inspect and edit memories directly in their file system while agents benefit from fast programmatic access.
MCP Tools Exposed
The server registers six tools that agents can invoke over the MCP stdio transport:
memory_store– Creates or updates a memory record with rich OKF metadata (type, key, namespace, tags, status, stale_after, sources, verified, generated_by).memory_retrieve– Fetches a specific memory by key and namespace.memory_search– Full-text and tag-filtered search across all stored memories.memory_get_last– Session-start directive: retrieves the last checkpoint so an agent knows where work was left off.memory_update_last– Milestone directive: updates the canonical session checkpoint whenever significant progress is made.
Setup and Deployment
MCP-Memory is designed for zero-boilerplate local deployment:
- Clone the repository and run
python3 setup.py— an interactive wizard auto-detects installed MCP clients (Antigravity, Claude, Cursor, Windsurf, Codex) and writes the correct configuration. - After setup, the AI client launches
mcp-memoryautomatically viarun.sh; no persistent server process needs to be managed manually. - Manual JSON or TOML configuration is also supported for clients that require it.
- Storage paths are configurable via environment variables (
MCP_MEMORY_PROJECT_ROOT,MCP_MEMORY_DB_PATH,MCP_MEMORY_DIR), enabling either per-project isolation or a single global memory store.
OKF Standard Compliance
Every memory record strictly follows the OKF v0.2 specification defined in the project's SPEC.md and OKF_RULES.md. Frontmatter fields include type, key, namespace, tags, generated, sources, verified, status, and stale_after. This standardization means memories are portable, inspectable, and interoperable with any tooling that understands the OKF format.
Current Status
The repository was created in August 2026 and had accumulated 171 stars and 10 forks within days of its initial push, according to the GitHub project metadata. The project is actively maintained on the main branch with 2 open issues at the time of indexing. The current memory format version is OKF v0.2, and the server self-identifies as mcp-memory/0.2.0 in generated metadata.
Community Discussions
Be the first to start a conversation about MCP-Memory
Share your experience with MCP-Memory, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open-source under the MIT License. Clone, use, modify, and distribute freely.
- Persistent agent memory via MCP
- OKF v0.2 standard compliance
- SQLite FTS5 full-text search
- Human-readable Markdown file storage
- Namespace isolation
Capabilities
Key Features
- Persistent memory across AI agent sessions
- OKF v0.2 standard compliance with YAML frontmatter
- SQLite FTS5 full-text search with sub-20ms key lookups
- Human-readable Markdown file storage with hierarchical index
- Namespace isolation for contextual memory separation
- Tag-based filtering and keyword search
- Session checkpoint tools (memory_get_last / memory_update_last)
- Interactive setup wizard for Claude, Cursor, Windsurf, Antigravity, Codex
- Per-project or global memory store via environment variables
- Automated test suite for OKF serialization and SQLite operations
- MIT licensed open-source
