Skip to main content
Glama
palimpsest-labs

memory-mcp

README.md
# 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](https://github.com/palimpsest-labs) 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`

## 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.

TDQS

A3.9/5.0

Scored across 12 tools

Disambiguation5/5

Each tool addresses a distinct operation: entity/relation/observation CRUD is clearly separated, and the query tools (search_nodes, open_nodes, read_graph, traverse, recent, search_similar) each serve a unique retrieval use case. Even similar-sounding searches like search_nodes and search_similar are differentiated by 'token match' vs 'fuzzy name similarity'. No two tools appear to perform the same function.

Naming Consistency4/5

Most tools follow a clear verb_noun pattern (create_entities, delete_observations, read_graph, open_nodes). However, 'traverse' is a bare verb and 'recent' is a time-filter command rather than verb_noun, breaking the pattern slightly. Overall, the naming is readable and predictable enough for an agent to infer tool purposes.

Tool Count5/5

With 12 tools, the server covers the full knowledge graph lifecycle (create, add, delete) plus a diverse set of query and traversal operations. This is a well-scoped count that is neither too sparse nor overwhelming. Each tool earns its place for a memory system.

Completeness4/5

The surface includes CRUD for entities, relations, and observations, plus retrieval via search, open, full-graph read, traversal, and recent-time filtering. The only notable gap is lack of an 'update entity' or 'update relation' operation, though this can be worked around with delete+create or add_observations. Overall, the domain coverage is strong.

Maintenance

ActivitySlowing
ResponsivenessNo issues