Memory MCP Server
Persistent knowledge graph memory system that maintains context across Claude Code sessions. Stores entities, relationships, and observations as a graph that persists to disk, enabling long-term project memory.
MCP Server Configuration
{ "mcpServers": { "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] } } }
Optionally specify a custom storage path:
{ "mcpServers": { "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"], "env": { "MEMORY_FILE_PATH": "/path/to/memory.json" } } } }
Available Tools
| Tool | Description |
|---|---|
create_entities | Add new entities to the knowledge graph |
create_relations | Create relationships between entities |
add_observations | Add observations/facts to existing entities |
delete_entities | Remove entities and their relationships |
delete_observations | Remove specific observations from entities |
delete_relations | Remove relationships between entities |
read_graph | Read the entire knowledge graph |
search_nodes | Search for entities by name or content |
open_nodes | Retrieve specific entities by name |
Example Usage
# Store project architecture knowledge
create_entities: [
{ name: "AuthService", entityType: "service", observations: ["Handles JWT tokens", "Uses bcrypt for passwords"] },
{ name: "UserRepository", entityType: "repository", observations: ["PostgreSQL backed", "Has caching layer"] }
]
# Create relationships
create_relations: [
{ from: "AuthService", to: "UserRepository", relationType: "depends_on" }
]
# Later, search for context
search_nodes: { query: "authentication" }
Setup
- Add the configuration to
.claude/settings.json - No API keys required
- Memory persists to
~/.claude/memory.jsonby default - Set
MEMORY_FILE_PATHfor project-specific memory
Use Cases
- Project knowledge β Store architecture decisions, conventions, gotchas
- User preferences β Remember coding style, preferred libraries, workflow
- Entity relationships β Map service dependencies, data flows, team ownership
- Session continuity β Pick up context from previous sessions automatically
Security Notes
- Data stored locally in a JSON file β not sent to any external service
- Memory file may contain sensitive project details β treat it like code
- Add the memory file to
.gitignoreif it contains private information - No network access β purely local storage
- File is human-readable JSON β can be manually inspected and edited
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.