The Memory server allows Claude Code to store and retrieve information across sessions, providing persistent context, remembering project details, and maintaining user preferences.
Note: This MCP server is distinct from Claude Code's built-in auto memory (on by default since v2.1.59), which stores notes under
~/.claude/projects/<project>/memory/with aMEMORY.mdindex and is managed via the/memorycommand.
Install Memory globally for cross-project persistence:
claude mcp add memory -s user -- npx -y @modelcontextprotocol/server-memoryFor project-specific memory storage:
claude mcp add memory -s local -- npx -y @modelcontextprotocol/server-memoryOnce installed, the server exposes knowledge-graph tools that Claude calls when you ask it to remember or recall something. Usage is not automatic — to make it so, add an instruction to your CLAUDE.md (e.g., "Use the memory server to store and retrieve project context").
"Remember that the current project uses TypeScript"
Claude stores this information for future reference.
Later in the same or a new session:
"What programming language is used in the current project?"
Claude responds:
"TypeScript"
- Persistent context: Information persists across sessions
- Project-specific notes: Remember project details, conventions, and preferences
- User preferences: Store personal preferences and workflow habits
- On-request memory: Claude calls the server's knowledge-graph tools when you ask it to remember or recall
- Cross-session memory: Recall information from previous conversations
- Remember project-specific coding conventions
- Store frequently used commands or configurations
- Maintain context about ongoing tasks
- Track decisions made in previous sessions
- Remember team preferences and guidelines
Memory works seamlessly with other MCP servers:
- With Serena: Combines persistent memory with semantic code understanding
- With Sequential Thinking: Enhances reasoning with historical project context
- With Playwright: Remembers browser automation preferences and configurations
Tip: Global installation enables memory sharing across all projects, while local installation keeps project memories separate.
Verify Memory is connected:
claude mcp listExpected output:
memory: npx -y @modelcontextprotocol/server-memory - ✓ Connected
- Use global installation for cross-project memory and user preferences
- Use local installation for project-specific isolated memory
- Regularly test memory recall to ensure proper functioning
- Combine with Serena for enhanced project-aware context
If Memory fails to connect:
- Verify Node.js is installed:
node --version - Check
npxavailability:npx --version - Remove and reinstall:
claude mcp remove memory -s user claude mcp add memory -s user -- npx -y @modelcontextprotocol/server-memory
For more help, see the Troubleshooting Guide.