Memory MCP server
io.github.chenxiaofie/memory-mcp·v0.2.1·11 stars情景+实体记忆 MCP 服务,为 Claude Code 提供持久化记忆能力
11 stars
Reviews
Write oneNobody has reviewed Memory yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Memory tools (17)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
memory_add_entity添加一个实体(Decision/Preference/Concept/Habit/File/Architecture)
memory_cache_message缓存一条消息到记忆系统(自动检测实体候选)
memory_cleanup_messages清理超过指定天数的消息缓存,保留最近 N 天的消息
memory_clear_cache清空消息缓存日志(message_cache.jsonl)。警告:此操作不可逆!
memory_close_episode关闭当前情景,生成摘要并归档
memory_confirm_entity确认一个待确认的实体候选
memory_deprecate_entity废弃一个过时的实体
memory_encoder_status查询向量编码器状态。返回编码器是否已就绪,以及哪些操作当前可用。
memory_get_current_episode获取当前活跃的情景信息
memory_get_episode_detail获取情景详情(包含消息和关联实体)
memory_get_pending获取所有待确认的实体候选
memory_list_episodes列出所有历史情景(按时间排序,不依赖语义搜索)。当用户要查看'所有历史情景'时使用此工具,避免语义搜索遗漏。
memory_recall综合检索记忆(情景+实体)。【重要】当用户询问'我是谁'、身份信息、个人偏好、历史决策、之前讨论过的内容时,应主动调用此工具检索相关记忆,而不是凭空回答。
memory_reject_candidate拒绝一个误判的实体候选
memory_search_by_type按类型检索实体
memory_start_episode开始一个新的情景(任务/功能开发会话)
memory_stats获取记忆系统统计信息
Public scan report
scanner v0.1.10 · 2026-09-28 · same rubric, same numbers if you re-run it
- Code scan12 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 65 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Memory compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 75% of 48,255 servers
- Tools
- 17
- the typical server has 7
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 11
- more than 88% of 28,688 servers
What its tools let an agent do: 17 read
Install Memory in Claude Code, Cursor or VS Code
claude mcp add memory-mcp -- uvx chenxiaofie-memory-mcp
What the publisher says
From the Memory repository's README, as published. We do not edit it. Read it on GitHub
Memory MCP Service
<!-- mcp-name: io.github.chenxiaofie/memory-mcp -->
English | 中文
A persistent memory MCP service for Claude Code. Automatically saves conversations and retrieves relevant history across sessions.
What it does: Every time you chat with Claude Code, your conversation context (decisions, preferences, key discussions) is saved and automatically recalled in future sessions — so Claude always has the background it needs.
Quick Start
Prerequisites
Install uv (Python package runner):
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Mac/Linux
curl -LsSf https://astral.sh/uv/install.sh | shRequires Python 3.10 - 3.13 (chromadb is not compatible with Python 3.14+).
1. Initialize (First Time Only)
Download the vector model (~400MB, one-time):
uvx --from chenxiaofie-memory-mcp memory-mcp-init2. Add MCP Server to Claude Code
claude mcp add memory-mcp -s user -- uvx --from chenxiaofie-memory-mcp memory-mcp3. Configure Hooks (Recommended)
Hooks enable fully automatic message saving. Without hooks, you need to manually call memory tools.
Add the following to ~/.claude/settings.json:
{
"hooks": {
"SessionStart": [{
"matcher": ".*",
"hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-session-start" }]
}],
"UserPromptSubmit": [{
"matcher": ".*",
"hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-auto-save" }]
}],
"Stop": [{
"matcher": ".*",
"hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-save-response" }]
}],
"SessionEnd": [{
"matcher": ".*",
"hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-session-end" }]
}]
}
}4. Verify
claude mcp listYou should see memory-mcp: ... - ✓ Connected.
That's it! Start a new Claude Code session and your conversations will be automatically saved and recalled.
How It Works
Session Start ──► Create Episode ──► Monitor Process (background)
│
User Message ──► Save Message ──► Recall Related Memories ──► Inject Context
│
Claude Reply ──► Save Response │
│
Session End ──► Close Signal ──► Archive Episode + Generate Summary- Episodes: Each conversation session is an "episode" with auto-generated summaries
- Entities: Key knowledge extracted from conversations (decisions, preferences, concepts)
- Dual-layer storage: User-level (shared across projects) + Project-level (isolated per project)
- Semantic search: Vector-based retrieval finds relevant past context
Usage
Automatic Mode (With Hooks)
Once hooks are configured, everything is automatic. Claude will see relevant history from past sessions as context.
Manual Mode
You can also call memory tools directly in Claude Code:
# Start a new episode
memory_start_episode("Login Feature Development", ["auth"])
# Record a decision
memory_add_entity("Decision", "Use JWT + Redis", "For distributed deployment")
# Search history
memory_recall("login implementation")
# Close episode
memory_close_episode("Completed JWT login feature")Hooks Reference
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Memory: common questions
- Is Memory MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the Memory safety report
- How do I install Memory?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Memory need an API key?
- No secret keys are declared. It reads 1 setting from the environment.
- Is Memory maintained?
- The last commit was 101 days ago (2026-07-26). The latest release is v0.2.1.
- How does Memory compare with other MCP servers?
- safety score 88/100 (higher than 75% of 48,255 servers); tools 17 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.