M

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.

MCPAnthropicdevelopmentv1.0.0MIT
0 views0 copies

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

ToolDescription
create_entitiesAdd new entities to the knowledge graph
create_relationsCreate relationships between entities
add_observationsAdd observations/facts to existing entities
delete_entitiesRemove entities and their relationships
delete_observationsRemove specific observations from entities
delete_relationsRemove relationships between entities
read_graphRead the entire knowledge graph
search_nodesSearch for entities by name or content
open_nodesRetrieve 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

  1. Add the configuration to .claude/settings.json
  2. No API keys required
  3. Memory persists to ~/.claude/memory.json by default
  4. Set MEMORY_FILE_PATH for 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 .gitignore if it contains private information
  • No network access β€” purely local storage
  • File is human-readable JSON β€” can be manually inspected and edited
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates