LogoVibeCodingHunt

MCP Server

Memory MCP Server

Official reference implementation providing persistent memory through a local knowledge graph with entities, relations, and observations stored in JSONL format

Knowledge Management
Memory
STDIO

What is Memory MCP Server?

The Memory MCP Server is a reference implementation that enables AI assistants to maintain persistent knowledge about users across conversation sessions through a local knowledge graph. The server models information as entities (nodes with names, types, and observations), relations (directed connections in active voice), and observations (atomic facts attached to entities). All data is persisted to a JSONL file (default: memory.jsonl in the server directory, configurable via MEMORY_FILE_PATH environment variable) with each mutation appending an operation line for durability. The server exposes 10 tools including create_entities, create_relations, add_observations for graph construction, delete_entities, delete_observations, delete_relations for cleanup, and read_graph, search_nodes, open_nodes for retrieval. A knowledge-graph MCP Resource at memory://knowledge-graph provides the full graph as JSON with automatic notifications/resources/updated broadcasts when mutation tools modify the graph. This enables clients subscribing to the resource to maintain synchronized views of the knowledge state.

Key capabilities

Knowledge Graph with Entities, Relations, and Observations

Models persistent memory as a directed graph where entities are typed nodes with unique names, relations are active-voice connections between entities, and observations are atomic facts, all stored in a structured JSONL format for durability.

JSONL-Based Persistence with Append-Only Operations

Writes each mutation (create, add, delete) as a new JSONL line to the memory file, providing durability and audit trail while allowing the graph to be reconstructed by replaying operations from the file on server initialization.

MCP Resource with Automatic Update Notifications

Exposes the knowledge graph as a memory://knowledge-graph Resource with MIME type application/json, broadcasting notifications/resources/updated after each mutation tool invocation so subscribed clients can refresh their views.

Search and Retrieval with Node Opening and Graph Queries

Provides search_nodes for text search across entity names, types, and observations, open_nodes for retrieving specific entities and their relations, and read_graph for full graph dump, enabling flexible knowledge retrieval patterns.

Use cases

User Preference Persistence Across Sessions

AI assistants can create entities for users, store observations about preferences, work patterns, or project context, and recall this information in future conversations without requiring users to repeat background information each time.

Project Context Tracking with Entity Relations

Developers can have AI assistants track project entities (repositories, team members, dependencies) and their relationships (works_on, depends_on, maintained_by), building a queryable graph of project knowledge that persists across coding sessions.

Conversational Context Accumulation

As users interact with AI assistants, the server accumulates observations about discussed topics, decisions made, and action items, creating a growing knowledge base that improves contextual understanding over time.

Docker Volume Persistence for Containerized Deployments

When running in Docker with a volume mount to /app/dist, the JSONL file persists across container restarts, allowing knowledge graphs to survive deployments while maintaining isolation from the host filesystem.

MCP capabilities

Tools

create_entities

create_relations

search_nodes

Resources

memory://knowledge-graph

Connection and auth

Local stdio
  • Node.js runtime for NPX execution or Docker for containerized deployment
  • Writable filesystem location for JSONL storage (configurable via MEMORY_FILE_PATH)
  • MCP client supporting Resource subscriptions for live graph updates

Client configuration

Claude Desktop

{ "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-memory" ] }

FAQs