memory-mcp
A scenario + entity memory MCP service that provides persistent memory capabilities for Claude Code.
Install / Use
claude mcp add chenxiaofie -- npx -y github:chenxiaofie/memory-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of memory-mcp
memory-mcp scores 80/100 on our quality scale, 3558th of 4,588 Development & Engineering skills we index.
Its MCP Server is 6.5 KB long, well organised into 27 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so memory-mcp is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (2 minor notes below). An AI review of the same text found nothing harmful.
- noteInstalls by piping a downloaded script into a shellline 23
powershell -c "irm https://astral.sh/uv/install.ps1 | iex" - noteInstalls by piping a downloaded script into a shellline 26
curl -LsSf https://astral.sh/uv/install.sh | sh
AI review by kimi-k2.7-code on 2026-10-08. Automated pattern scan on 2026-10-08. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
memory-mcp compared with similar skills
All 4 of these similar skills score higher than memory-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| memory-mcp (this skill)by chenxiaofie | 80 | 10 | 2mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 93.2k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.6k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.3k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 45.2k | 2d ago | CLAUDE.md |
Frequently asked questions
- How do I install memory-mcp?
- Run
claude mcp add chenxiaofie -- npx -y github:chenxiaofie/memory-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does memory-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is memory-mcp safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (2 minor notes below). An AI review of the same text found nothing harmful. It is MIT-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is memory-mcp still maintained?
- The repository was last updated about 2 months ago, so memory-mcp is actively maintained.
Skill content
View source on GitHubMemory MCP Service
<!-- mcp-name: io.github.chenxiaofie/memory-mcp -->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 | sh
Requires 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-init
2. Add MCP Server to Claude Code
claude mcp add memory-mcp -s user -- uvx --from chenxiaofie-memory-mcp memory-mcp
3. 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 list
You 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
| Hook | What it does | Timing | |------|-------------|--------| | SessionStart | Creates a new episode | ~50ms | | UserPromptSubmit | Saves user message + retrieves related memories | ~1-2s | | Stop | Saves assistant response | ~1s | | SessionEnd | Signals episode closure | ~50ms |
Tools Reference
| Tool | Description |
|------|-------------|
| memory_start_episode | Start a new episode |
| memory_close_episode | Close and archive current episode |
| memory_get_current_episode | Get current active episode |
| memory_add_entity | Add a knowledge entity |
| memory_confirm_entity | Confirm a detected entity candidate |
| memory_reject_candidate | Reject a false detection |
| memory_deprecate_entity | Mark an entity as outdated |
| memory_get_pending | List pending entity candidates |
| memory_recall | Semantic search across episodes and entities |
| memory_search_by_type | Search entities by type |
| memory_get_episode_detail | Get full episode details |
| memory_list_episodes | List all episodes chronologically |
| memory_stats | Get system statistics |
| memory_encoder_status | Check vector encoder status |
| memory_cache_message | Manually cache a message |
| memory_clear_cache | Clear message cache |
| memory_cleanup_messages | Clean up old cached messages |
Entity Types
| Type | Level | Description |
|------|-------|-------------|
| Decision | Project | Technical decisions for this project |
| Architecture | Project | Architecture designs |
| File | Project | Important file descriptions |
| Preference | User | Personal preferences (shared across projects) |
| Concept | User | General concepts |
| Habit | User | Work habits |
Storage Locations
- User-level:
~/.claude-memory/ - Project-level:
{project-root}/.claude/memory/
If you need to run from source (e.g., for development):
git clone https://github.com/chenxiaofie/memory-mcp.git
cd memory-mcp
# Windows:
install.bat
# Mac/Linux:
chmod +x install.sh && ./install.sh
Then configure MCP server with the venv Python:
# Windows:
claude mcp add memory-mcp -s user -- "C:\path\to\memory-mcp\venv310\Scripts\python.exe" -m memory_mcp.server
# Mac/Linux:
claude mcp add memory-mcp -s user -- /path/to/memory-mcp/venv310/bin/python -m memory_mcp.server
</details>
Author
陈佳俊 (Jiajun Chen) — front-end engineer based in Hangzhou, China. GitHub @chenxiaofie · feifeichen1999@gmail.com
本项目由陈佳俊(GitHub: chenxiaofie)开发并维护。
License
MIT License - see LICENSE file for details.
Related Skills
Agent-Reach
93.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.6kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.3kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
ai-job-search
45.2kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
