mcp-memory
Click on "Deploy 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., "@mcp-memory Where did I leave off on this project?"
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.
MCP-Memory: OKF-Backed Agent Memory Server
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.
Memory records are formatted using the Open Knowledge Format (OKF v0.2) standard and indexed with a local SQLite instance (supporting FTS5 full-text search) for fast key-value lookups, tag filtering, and content search.
Fast Track: Jump directly to Quick Start
Key Features
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,key,namespace,tags,generated,sources,verified,status,stale_after), adhering strictly toSPEC.mdandOKF_RULES.md.Dual-Layer Architecture:
Human-Browseable OKF Directory: Automatically dumps and syncs every memory to disk as a raw
.mdfile inside thememory/bundle directory with hierarchicalindex.mdprogressive disclosure files (rootindex.mdversioned withokf_version: "0.2") andlog.mdupdate history tracking.High-Performance SQLite Indexing: SQLite FTS5 (Full-Text Search) and automatic triggers for sub-20ms key lookups and instant keyword searches.
Namespace Isolation: Supports contextual separation (e.g.
user/preferences,project/architecture,default).Zero Boilerplate Setup: Quick setup wizard (
python3 setup.py) auto-configures installed MCP tools (Antigravity, Claude, Cursor, Windsurf, Codex).
Related MCP server: context-vault
MCP Tools
The server exposes six MCP tools to interacting agents:
1. memory_store
Stores or updates a memory record in OKF v0.2 format.
Parameters:
key(string, required): Unique identifier or path for the memory (e.g.user/preferences/coding_styleorproject/architecture).content(string or object, required): Core information to store.project_root(string, required): Absolute path to the active project root directory (e.g./Users/user/Projects/my-app).tags(array of strings, optional): Classification tags for filtering.namespace(string, optional, default:"default"): Scope/namespace.concept_type(string, optional, default:"Agent Memory"): OKF concept type (e.g.Metric,Playbook,Attested Computation).title(string, optional): Display name.description(string, optional): One-line summary.resource(string, optional): Canonical URI of underlying asset.status(string, optional, default:"stable"): Lifecycle state (draft|stable|deprecated).stale_after(string, optional): ISO date (YYYY-MM-DD).sources(array of objects, optional): Provenance sources[{resource, id, title, author, usage_count, last_modified}].verified(array of objects or object, optional): Verification events[{by, at}].generated_by(string, optional): Actor identifier following actor convention (<producer>/<version>,human:<id>,process:<id>).
2. memory_retrieve
Retrieves a specific memory by its key and namespace.
Parameters:
key(string, required): The memory key to look up.project_root(string, required): Absolute path to the active project root directory.namespace(string, optional, default:"default"): Scope/namespace.
3. memory_search
Finds memories matching keywords, tags, or namespace filters.
Parameters:
project_root(string, required): Absolute path to the active project root directory.query(string, optional): Keyword search query across keys, frontmatter, and content.tags(array of strings, optional): Filter by specific tags.namespace(string, optional): Scope search to a namespace.limit(integer, optional, default: 10): Maximum number of results.
4. memory_delete
Removes a specific memory record by its key and namespace, from both the SQLite index and the memory/ bundle on disk.
Parameters:
key(string, required): The key of the memory to remove.project_root(string, required): Absolute path to the active project root directory.namespace(string, optional, default:"default"): Scope/namespace.
5. memory_get_last
AGENT DIRECTIVE (Session Start): Retrieves the last recorded session checkpoint (system/last_memory) so the AI agent immediately knows where work was left off when opening a project or starting a session.
Parameters:
project_root(string, required): Absolute path to active project root directory.namespace(string, optional, default:"default"): Scope/namespace.
6. memory_update_last
AGENT DIRECTIVE (Milestones & Progress): Updates the canonical session checkpoint (system/last_memory) whenever completing a milestone, making key changes, or pausing work.
Parameters:
content(string or object, required): Brief note or structured dictionary summarizing progress and referencing key memory files.project_root(string, required): Absolute path to active project root directory.namespace(string, optional, default:"default"): Scope/namespace.summary(string, optional): One-sentence description of the milestone achieved.
OKF (Open Knowledge Format) Structure
Every stored memory strictly adheres to the OKF v0.2 specification (SPEC.md & OKF_RULES.md):
---
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.Quick Start
1. Clone the Repository
git clone https://github.com/fellowgeek/mcp-memory
cd mcp-memory2. Interactive Setup Wizard
Run setup.py to auto-detect and register mcp-memory with your AI tools:
python3 setup.pyNote: Once
setup.pyfinishes configuring your tools, your AI client will launchmcp-memoryautomatically in the background whenever needed. You do not need to manually start or keep a server process running in your terminal.
3. Run Manually via CLI (Optional / Debugging)
If you want to manually verify startup, inspect stdio output, or pre-initialize the virtual environment (.venv), you can run run.sh directly:
./run.shManual Client Configuration
If you prefer to configure your MCP client manually, add the "memory" server entry pointing to run.sh:
JSON Configuration (Antigravity, Claude Desktop, Cursor, Windsurf)
Add to your client's mcp_config.json or claude_desktop_config.json:
{
"mcpServers": {
"memory": {
"command": "/ABSOLUTE/PATH/TO/run.sh"
}
}
}TOML Configuration (Codex Desktop)
Add to ~/.codex/config.toml:
[mcp_servers.memory]
command = "/ABSOLUTE/PATH/TO/run.sh"CLI Configuration
Claude Code CLI:
claude mcp add --scope user memory -- /ABSOLUTE/PATH/TO/run.shCodex CLI:
codex mcp add memory -- /ABSOLUTE/PATH/TO/run.sh
Testing
Run the automated test suite to verify OKF serialization, SQLite database operations, and FastMCP tool execution:
python3 test_memory.pyStorage & Environment Variables
By default, mcp-memory creates project-isolated memory stores inside each project's root directory:
OKF Markdown Files (Human-readable):
memory/folder in project root.SQLite Database (Hidden index):
.mcp_memory/memories.dbin project root.
You can customize this behavior using environment variables:
MCP_MEMORY_PROJECT_ROOT: Project root directory (default: process current working directorycwd).MCP_MEMORY_DB_PATH: SQLite database file path (default:.mcp_memory/memories.dbrelative to project root).MCP_MEMORY_DIR: Directory for Open Knowledge Format (OKF).mdfiles (default:memoryrelative to project root).
Tip: If you prefer a single global memory store shared across all projects, set
MCP_MEMORY_DB_PATH=~/.mcp_memory/memories.dbandMCP_MEMORY_DIR=~/.mcp_memory/memoryin your client's MCP configuration.
Available Tools
6 toolsmemory_deleteB
Removes a specific memory entry.
Parameters: key: The key of the memory to remove. project_root: REQUIRED. Absolute path to active project root directory. namespace: Logical namespace (default: 'default').
Inputs: key (required), project_root (required), namespace. Returns: result
memory_get_lastA
AGENT DIRECTIVE - SESSION INITIALIZATION: Call this tool FIRST when starting work or opening a project session to retrieve the last recorded session checkpoint ('system/last_memory') and understand where work was left off.
Parameters: project_root: REQUIRED. Absolute path to active project root directory. namespace: Logical namespace (default: 'default').
Inputs: project_root (required), namespace. Returns: result
memory_retrieveA
Retrieves a specific memory record by key.
Parameters: key: The exact memory key to look up (e.g. 'system/last_memory' for session checkpoint). project_root: REQUIRED. Absolute path to active project root directory. namespace: Logical namespace (default: 'default').
Inputs: key (required), project_root (required), namespace. Returns: result
memory_searchA
Searches persistent memories matching keywords, tags, or namespace patterns.
Parameters: project_root: REQUIRED. Absolute path to active project root directory. query: Search string for full-text search across keys, frontmatter, and content. tags: Optional list of tags to filter by. namespace: Optional namespace filter. limit: Maximum number of results to return (default: 10).
Inputs: project_root (required), tags, limit, query, +1 more. Returns: result
memory_storeA
Stores or updates a persistent memory record in Open Knowledge Format (OKF v0.2).
Parameters: key: Unique identifier or path for the memory (e.g. 'user/preferences/coding_style' or 'system/last_memory'). content: The core information to store (string text or structured dictionary). project_root: REQUIRED. Absolute path to active project root directory. tags: Optional classification tags for filtering (e.g. ['preferences', 'user']). namespace: Logical separation for contexts or users (default: 'default'). concept_type: OKF concept type (default: 'Agent Memory'). Options: 'Agent Memory', 'Checkpoint', 'Metric', 'Playbook', etc. title: Human-readable display name. description: Single-sentence summary of the concept. resource: Canonical URI for the underlying asset. status: Lifecycle status ('draft' | 'stable' | 'deprecated'). Default: 'stable'. stale_after: ISO date ('YYYY-MM-DD') when memory becomes stale. sources: Provenance sources list [{resource, id, title, author, usage_count, last_modified}]. usage_window: Sources usage window framing {from, to}. verified: Verification events list or mapping [{by, at}]. generated_by: Actor identifier string following actor convention ('/', 'human:', 'process:'). runtime: For Attested Computation concepts ('bigquery', 'postgres', 'dbt', 'python'). parameters: For Attested Computation concepts [{name, type, required}]. executor: For Attested Computation concepts {resource, receipt}. attester: For Attested Computation concepts {resource}. computation: Path to external computation file.
Inputs: key (required), content (required), project_root (required), tags, +16 more. Returns: result
memory_update_lastA
AGENT DIRECTIVE - MILESTONE & SESSION CHECKPOINTING: Call this tool whenever completing a milestone, making key project changes, or pausing work to update the canonical project checkpoint ('system/last_memory') so future sessions know where work was left off.
Parameters: content: Brief note or structured dictionary summarizing progress and referencing key memory files (e.g. 'Goal Progress'). project_root: REQUIRED. Absolute path to active project root directory. namespace: Logical namespace (default: 'default'). summary: Optional one-sentence description of the milestone achieved.
Inputs: content (required), project_root (required), summary, namespace. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
memory_get_last and memory_retrieve overlap because both can retrieve the same system/last_memory record, and memory_update_last similarly overlaps with memory_store for that key. The AGENT DIRECTIVE text helps clarify intended usage, but the boundaries between generic and session-specific operations are not fully crisp.
All tools share a consistent memory_ prefix and snake_case formatting, following a readable memory_<verb> pattern. Minor synonym inconsistency between retrieve/get and store/update keeps it from being perfectly uniform.
Six tools is well-scoped for a memory server: generic CRUD plus session checkpointing. Each tool has a distinct role, and the specialized checkpoint pair adds clear value without bloating the surface.
The set covers the full memory lifecycle: store, retrieve, search, delete, and session checkpoint read/write. There are no obvious dead ends for the stated domain of persistent project memory.
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory for AI agents: add, search, update, and delete long-term memories.
Persistent memory for AI agents: save, search and connect context across tools and sessions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides persistent long-term memory for AI assistants with tag-based retrieval, wiki-style linking, and source references, storing memories as markdown files with SQLite index.2MIT
- FlicenseNot gradedqualityBmaintenancePersistent memory for AI agents enabling saving, searching, and managing knowledge across sessions with local markdown files.-
- AlicenseAqualityDmaintenanceAn MCP server that provides LLMs with full read/write access to an Open Knowledge Format (OKF) knowledge bundle, enabling structured, persistent long-term memory.11MIT
- AlicenseAqualityDmaintenanceEnables AI agents to maintain a persistent, queryable memory stored as user-owned Markdown files, with dual-channel retrieval (FTS5 and optional semantic search) and an audited write pipeline.11MIT