memory-mcp
Click on "Install 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., "@memory-mcpremember that the user prefers Rust for new CLI tools"
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.
memory-mcp
A local MCP server that manages an agent's long-term memory. Memory is treated not as something to "store and retrieve" but as a lifecycle in which it is born, recalled, amended, judged, and sinks.
Core idea
An agent's memories are of two kinds. Memories with ground truth (such as code indexes) can rely on hash synchronization, but assertion memories without ground truth — user utterances, decisions, and lessons — need state, version, confidence, and a verdict gate. memory-mcp combines the two with a dual structure:
source — human-readable markdown files managed with git (
<store>/memories/*.md, frontmatter metadata). Lifecycle state, supersede chains, and confidence live here.derivatives — a SQLite index (FTS, ranking, conflict ledger). It can be discarded at any time and rebuilt entirely from the source with a single
memory_reindexcall.
Designed by analyzing three sources (evidence trails in §12 of docs/design/architecture.md):
Source | What was adopted |
source–derivative separation, stat-gate → hash → partial reindexing, coverage honesty, store = directory isolation | |
token economy (return path and excerpt only), confidence attached to derived links, path containment | |
state machine + archived staging layer, non-destructive supersede version chain, trust × state × heat ranking | |
AX workspace memory lifecycle policy | verdict gate (no automatic overwrite), pair-hash idempotency, latest-wins signal, distillation-first compaction, entity dictionary |
Related MCP server: cardloom-mcp
How it works
remember ──► active ◄─────────── 본문 수정 시 자동 복귀
│ supersede 되면 자동
▼
archived ──forget(deprecate, reason 필수)──► deprecated
│ │
└────────── forget(purge, confirm 필수) ──────┘
(파일 삭제 — git 이력이 백스톱)Conflict gate: when
memory_rememberdetects neighboring memories, it returns the verdict material (shared entity, time gap,latest_wins_eligible) in the response. The verdict belongs to the calling agent (and the user) — no automatic overwrite without a verdict. Surfaced pairs are recorded by pair-hash so they are not presented again.Weathering: old, unused memories are not deleted but sink in the ranking —
score = text × trust × state × (1 + freshness + heat). Whenmemory_statusproposes aging episodes as compaction candidates, the agent summarizes them into aknowledgememory and supersedes the originals.reconcile: no daemon. At the entry of every tool invocation, a stat-gate (mtime + size) → sha256 → only the changed parts are reindexed. Manually edited files also converge on the next invocation. If the body of an archived memory is edited directly, it automatically returns to active (latest intent wins).
Korean search: without embeddings, a query planner combines word FTS (prefixes absorb postpositional variants) + trigram FTS (phrases) + a LIKE fallback for unterminated 2-char or smaller queries. So "보안을 끄는" ↔ "보안을 끄고" match.
Honesty: recall/status always report index freshness, unparseable files, and unresolved conflicts. A lack of report ≠ completeness.
Tools (7)
Tool | Role |
| Create a memory (with supersedes). Duplicates are idempotent, conflicts are returned as verdict material. |
| Hybrid search — path, pay-TM*, and score components only (no body injection). |
| Full text by id/path, supersede chain, conflict history. |
| edit / supersede / set_state / link / resolve_conflict. |
| archive / deprecate (reason required) / purge (confirmation required). No automatic deletion. |
| aggregates, unresolved conflicts, reviews due, compaction candidates, unparseable files, index freshness. |
| full derivative rebuild (disaster recovery) / conditional re-hash audit of everything. |
Installation
Node ≥ 22.5 (node:sqlite built-in — no external native dependencies).
pnpm install && pnpm buildRegister via Claude Code:
claude mcp add memory-mcp -- node /path/to/memory-mcp/dist/main.jsOr via .mcp.json:
{
"mcpServers": {
"memory-mcp": {
"type": "stdio",
"command": "node",
"args": ["/path/to/memory-mcp/dist/main.js"],
"env": { "MEMORY_MCP_ROOT": "/path/to/your/store" }
}
}
}The default store is ~/.memory-mcp/default (replace with the MEMORY_MCP_ROOT env var, or per-store invocation). If you manage the store in git, the git history becomes the backstop for purge.
Memory file format
---
id: 01JD2K3A9FZQ4W8XVBH5T6N7RM
type: fact | preference | decision | episode | reference | knowledge
state: active | archived | deprecated
trust: user-stated | agent-inferred | imported
entities: [ads-genisys, pacing]
source: "2026-08-24 세션, 사용자 교정"
created: 2026-08-24T14:03:00Z
updated: 2026-08-24T14:03:00Z
review_after: 2026-11-01
---
# 제목 한 줄
본문. 첫 문단이 recall 발췌로 쓰인다.Adding a <store>/dictionary.md normalizes entity notation (- 정식명: 설명 (aka: 동의어, 약어)).
Development
pnpm typecheck # tsc --noEmit
pnpm test # node --test (29 tests)
pnpm lint # biome
pnpm build # dist/Documentation
Design: docs/design/architecture.md — principles, state machine, source → decision trace table
Analysis: codebase-memory-mcp hands-on · Codebase-Memory paper · MemOS paper
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides long-lived, cross-project technical memory for AI agents via markdown cards stored in git and indexed by SQLite, enabling search, retrieval, and human-reviewed knowledge management.ISC
- AlicenseAqualityCmaintenanceProvides a hybrid memory architecture with a thin SQLite index and Markdown cold storage, enabling AI agents to write, query, link, and rebuild long-term memories via MCP tools, model-agnostic and zero third-party dependencies.7MIT
- AlicenseNot gradedqualityAmaintenanceProvides AI agents with persistent, long-term memory via OKF-formatted markdown and SQLite indexing, enabling stateful storage, retrieval, and search across sessions.188MIT
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/drakejin/memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server