
Memory Mcp
- 11 repo stars
- Updated July 26, 2026
- chenxiaofie/memory-mcp
io.github.chenxiaofie/memory-mcp is a MCP server that provides episodic and entity persistent memory for Claude Code over stdio.
About
io.github.chenxiaofie/memory-mcp is a stdio Model Context Protocol service that adds情景 (episodic) and实体 (entity) memory on top of Claude Code. Developers juggling multiple features benefit when the agent can recall prior conversations, named entities, and project-specific facts instead of losing state after each compaction. Install via the PyPI identifier chenxiaofie-memory-mcp at version 0.2.1, set CLAUDE_PROJECT_ROOT to your repository root when you want filesystem-scoped recall, and register the server in Claude Code MCP settings. It sits squarely in agent tooling: not a replacement for git or docs, but a practical layer for operate-style continuity while you are still shipping iterations. Pair it with clear human-written ADRs for anything compliance-critical; treat MCP memory as acceleration, not the sole source of truth.
- Episodic plus entity memory model for long-running Claude Code projects
- PyPI package chenxiaofie-memory-mcp v0.2.1 with stdio transport
- Optional CLAUDE_PROJECT_ROOT env scopes memory to a repo path
- Targets 为 Claude Code 提供持久化记忆—persistent memory as first-class MCP
- stdio local server—memory stays tied to your project machine layout
Memory Mcp by the numbers
- Data as of Jul 26, 2026 (Skillselion catalog sync)
claude mcp add --env CLAUDE_PROJECT_ROOT=YOUR_CLAUDE_PROJECT_ROOT chenxiaofie-memory-mcp -- uvx chenxiaofie-memory-mcpAdd your badge
Show developers this MCP server is listed on Skillselion. Paste this into your README.
| repo stars | ★ 11 |
|---|---|
| Package | chenxiaofie-memory-mcp |
| Transport | STDIO |
| Auth | None |
| Last updated | July 26, 2026 |
| Repository | chenxiaofie/memory-mcp ↗ |
What it does
Give Claude Code episodic and entity memory across sessions so your agent remembers project decisions, people, and tasks without re-pasting context every time.
Who is it for?
Best when you're living in Claude Code and want local stdio memory MCP without building a custom vector store.
Skip if: Skip if you need enterprise audit trails, multi-user shared memory with RBAC, or memory without Python MCP hosting.
What you get
Claude Code can read and write durable episodic and entity memory scoped to your project root, shrinking onboarding cost each session.
- Running stdio memory MCP wired into Claude Code
- Reusable episodic and entity memory records across agent sessions
By the numbers
- Version 0.2.1 on PyPI registry
- stdio transport; one documented optional env CLAUDE_PROJECT_ROOT
- Dual memory model: episodic (情景) + entity (实体) per description
README.md
Memory MCP Service
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/
Alternative: Install from source
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
License
MIT License - see LICENSE file for details.
Recommended MCP Servers
How it compares
Project-scoped agent memory MCP, not a general documentation search or RAG pipeline skill.
FAQ
Who is io.github.chenxiaofie/memory-mcp for?
Claude Code users who need episodic and entity memory persisted across sessions on a single project.
When should I use io.github.chenxiaofie/memory-mcp?
Use it during build (and ongoing operate work) when context reuse matters—multi-week agents, recurring entities, and repeated stack explanations.
How do I add io.github.chenxiaofie/memory-mcp to my agent?
Install chenxiaofie-memory-mcp from PyPI, configure stdio in Claude Code MCP, optionally set CLAUDE_PROJECT_ROOT to your repo, then restart Claude Code.