Skip to main content
Glama
memory-mcp

memory-mcp

by jmars

memory-mcp

Persistent knowledge graph MCP server with SQLite backend. Drop-in replacement for the off-the-shelf mcp-server-memory (npm) — same tool signatures, but with graph traversal, fuzzy search, temporal queries, and timestamps.

Part of the Palimpsest intelligence fusion toolkit.

Why

The npm mcp-server-memory stores everything in a flat JSONL file. Every operation reads the entire file into memory. No timestamps, no graph queries, keyword-only search.

This replaces it with SQLite (WAL mode) while maintaining JSONL export compatibility. Adds:

  • Graph traversal — traverse("shen-meta", depth=2) finds 46 connected nodes across 112 relations

  • Fuzzy search — trigram similarity for entity names (no more exact-case matching)

  • Temporal queries — recent(hours=24) shows everything added or modified

  • Timestamps — every entity, observation, and relation has created_at/updated_at

  • Case-insensitive search — search_nodes("project") matches ProjectX

Related MCP server: server-memory

Tools

CRUD (backward compatible)

  • create_entities, create_relations, add_observations

  • delete_entities, delete_observations, delete_relations

  • search_nodes, open_nodes, read_graph

New

  • traverse(start_node, depth) — graph walk from a node, returns all entities within N hops

  • recent(hours) — entities/relations created or updated in the last N hours

  • search_similar(name, threshold) — trigram fuzzy matching for entity names

Usage

pip install -e .

Reads from MEMORY_FILE_PATH (default: ~/.vibe/memory.jsonl). Stores in SQLite at MEMORY_DB_PATH (default: ~/.vibe/memory.db). On first run, auto-migrates existing JSONL into SQLite. All writes go to both stores.

Available Tools

12 tools
add_observationsA

Add new observations to existing entities in the knowledge graph.

Each item must have: entityName (str), contents (list[str]).

Inputs: observations (required). Returns: result

create_entitiesA

Create multiple new entities in the knowledge graph.

Each entity must have: name (str), entityType (str), observations (list[str]).

Inputs: entities (required). Returns: result

create_relationsA

Create multiple new relations between entities in the knowledge graph.

Each relation must have: from (str), to (str), relationType (str).

Inputs: relations (required). Returns: result

delete_entitiesA

Delete multiple entities and their associated relations from the knowledge graph.

Inputs: entityNames (required). Returns: result

delete_observationsA

Delete specific observations from entities in the knowledge graph.

Each item must have: entityName (str), observations (list[str] — exact content match).

Inputs: deletions (required). Returns: result

delete_relationsA

Delete multiple relations from the knowledge graph.

Each relation must have: from (str), to (str), relationType (str). If relationType is omitted, all relations between from and to are deleted.

Inputs: relations (required). Returns: result

open_nodesB

Open specific nodes in the knowledge graph by their names.

Returns full entity details including all observations and timestamps.

Inputs: names (required). Returns: result

read_graphA

Read the entire knowledge graph.

Returns all entities with observations and all relations. Note: loads the full graph into memory — may be large.

Inputs: no named parameters. Returns: result

recentA

Return entities, relations, and observations created or updated in the last N hours.

Args: hours: Look-back window in hours (default 24, max 720)

Inputs: hours. Returns: result

search_nodesA

Search for nodes in the knowledge graph.

Case-insensitive token match across entity names, types, and observation content. Returns matching entities with their observations.

Inputs: query (required). Returns: result

search_similarA

Fuzzy search for entity names using trigram similarity.

Args: name: Name to search for (fuzzy matched) threshold: Minimum similarity score 0.0–1.0 (default 0.3)

Inputs: name (required), threshold. Returns: result

traverseA

Traverse the graph from a starting node, returning all entities within N hops.

Args: start_node: Entity name to start from depth: Number of hops to traverse (default 1, max 3)

Inputs: start_node (required), depth. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool targets a distinct operation: create/delete entities, add/delete observations, create/delete relations, search via token match vs fuzzy name match, open specific nodes vs read full graph vs traverse vs recent. The descriptions clearly differentiate similar-sounding tools like search_nodes and search_similar.

    Naming Consistency4/5

    The naming predominantly follows a verb_noun snake_case pattern (create_entities, delete_relations, search_nodes). Minor deviations exist with 'recent' and 'traverse' which are single-word verbs, but they are still descriptive and do not disrupt overall consistency.

    Tool Count5/5

    With 12 tools, the server is well-scoped for a knowledge graph memory system. Each tool serves a clear purpose, and the count is within the ideal range for a domain-specific MCP server.

    Completeness5/5

    The tool set provides comprehensive coverage for managing a knowledge graph: create/delete entities, add/delete observations, create/delete relations, multiple retrieval methods (specific, full graph, traversal, recent, search), and fuzzy search. Update operations are supported via add/delete observations and create/delete relations, covering the full lifecycle without dead ends.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A Knowledge Graph MCP server optimized for LLM context efficiency through compact JSON and SQLite persistence. It enables full graph management including node/edge CRUD operations, full-text search, and subgraph traversal.
      -
    • A
      license
      A
      quality
      C
      maintenance
      A local-first MCP server for durable agent memory using SQLite and FTS5, enabling knowledge graph storage, search, and recall for AI agents.
      20
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Persistent knowledge graph MCP server with SQLite backend. Enables graph traversal, fuzzy search, temporal queries, and timestamps for entity management.
      12
      MIT