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-mcprecall what we discussed about authentication"
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 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 | 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.
Related MCP server: Claude Memory MCP
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 SummaryEpisodes: 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 |
| Start a new episode |
| Close and archive current episode |
| Get current active episode |
| Add a knowledge entity |
| Confirm a detected entity candidate |
| Reject a false detection |
| Mark an entity as outdated |
| List pending entity candidates |
| Semantic search across episodes and entities |
| Search entities by type |
| Get full episode details |
| List all episodes chronologically |
| Get system statistics |
| Check vector encoder status |
| Manually cache a message |
| Clear message cache |
| Clean up old cached messages |
Entity Types
Type | Level | Description |
| Project | Technical decisions for this project |
| Project | Architecture designs |
| Project | Important file descriptions |
| User | Personal preferences (shared across projects) |
| User | General concepts |
| 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.shThen 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.serverLicense
MIT License - see LICENSE file for details.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/chenxiaofie/memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server