情景+实体记忆 MCP 服务,为 Claude Code 提供持久化记忆能力
Valid MCP server (3 strong, 1 medium validity signals). 4 known CVEs in dependencies (0 critical, 3 high severity) Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.
5 files analyzed · 5 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: CLAUDE_PROJECT_ROOT
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-chenxiaofie-memory-mcp": {
"env": {
"CLAUDE_PROJECT_ROOT": "your-claude-project-root-here"
},
"args": [
"chenxiaofie-memory-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
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.

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+).
Download the vector model (~400MB, one-time):
uvx --from chenxiaofie-memory-mcp memory-mcp-init
claude mcp add memory-mcp -s user -- uvx --from chenxiaofie-memory-mcp memory-mcp
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" }]
}]
}
}
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.
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
Once hooks are configured, everything is automatic. Claude will see relevant history from past sessions as context.
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")
| 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 |
| 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 |
| 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 |
~/.claude-memory/{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
MIT License - see LICENSE file for details.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.