Skip to main content
Glama

r3

npm version npm downloads License: MIT

Persistent memory for MCP clients (Claude Desktop, Claude Code, Cursor) that runs entirely on your machine, with no accounts, no API keys, and no cloud service required to start.

Memory persisting across two separate server processes

Quick start

npx @n3wth/r3

That single command starts an MCP server backed by an embedded Redis instance and a local vector index. There is no separate database to install and no signup step.

Related MCP server: Synapse Memory

How it works

MCP client (Claude Desktop / Claude Code / Cursor)
        |
        v
   r3 MCP server (stdio)
        |
   +----+-----------------------+
   |                            |
embedded Redis            vectra local index
(redis-memory-server,      (on-disk vector store
 auto-downloaded binary,    for semantic search,
 no external service)       no external service)
   |
   +--- optional ---> Mem0 cloud API (MEM0_API_KEY)
                       cross-device sync, off by default
  • Embedded Redis — redis-memory-server downloads and manages a local Redis binary for you. It stores memory content and metadata. If it cannot start, r3 falls back to an in-process store.

  • vectra — a local, file-backed vector index used for semantic search. No network calls, no external vector database.

  • Mem0 (optional) — if MEM0_API_KEY is set, r3 also syncs to Mem0's cloud API so memories can follow you across machines. Without a key, nothing leaves your machine.

MCP client configuration

Claude Desktop

Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "r3": {
      "command": "npx",
      "args": ["@n3wth/r3"]
    }
  }
}

Claude Code

claude mcp add r3 "npx @n3wth/r3"

Cursor

Add to .cursor/mcp.json in your project (or the global Cursor MCP config):

{
  "mcpServers": {
    "r3": {
      "command": "npx",
      "args": ["@n3wth/r3"]
    }
  }
}

Restart the client after editing config. In a new conversation:

You: Remember that I prefer TypeScript and dark mode.
AI: I'll remember that.

[new conversation]

You: What are my preferences?
AI: You prefer TypeScript and dark mode.

Tools

Tool

Description

add_memory

Store content with optional metadata and priority

search_memory

Query memories using semantic or keyword search

get_all_memories

List stored memories with pagination

get_memory

Retrieve a specific memory by ID

update_memory

Modify existing memory content or metadata

delete_memory

Remove a memory

deduplicate_memories

Find and merge duplicate memories

cache_stats

Report cache hit rate and storage stats

sync_status

Report Mem0 cloud sync status

optimize_cache

Run cache maintenance

import_memories

Bulk import memories

Enhanced mode (default, INTELLIGENCE_MODE=enhanced) adds:

Tool

Description

extract_entities

Extract named entities from text

get_knowledge_graph

Return the entity/relationship graph

find_connections

Find entities connected to a given entity

Configuration

Environment variables, all optional:

Variable

Description

Default

REDIS_URL

Use an external Redis instead of the embedded one

embedded server

MEM0_API_KEY

Enables Mem0 cloud sync

unset (local only)

MEM0_USER_ID

Namespace for memories

default

INTELLIGENCE_MODE

enhanced or basic

enhanced

Example with cloud sync enabled:

{
  "mcpServers": {
    "r3": {
      "command": "npx",
      "args": ["@n3wth/r3"],
      "env": {
        "MEM0_API_KEY": "mem0_..."
      }
    }
  }
}

Comparison

r3

mem0 (OSS)

zep

Runs fully local with zero config

yes (embedded Redis + vectra)

requires a Postgres/vector DB you configure

requires a Postgres instance you configure

Needs an API key to try it

no

no (self-hosted) / yes (cloud)

yes (cloud), or self-hosted setup

Optional cloud sync

yes, via Mem0

n/a (is the cloud option)

yes

This table only reflects setup requirements observed in each project's own documentation, not benchmark performance or feature completeness. Verify against current upstream docs before relying on it.

Known issues

See LAUNCH_AUDIT.md for current limitations, including a native module build failure on some macOS setups.

Documentation

Full documentation at r3.n3wth.com.

License

MIT

Available Tools

14 tools
add_memoryA

Store a new memory with automatic deduplication and indexing. Use for persisting facts, preferences, or conversation context. Checks for duplicates by default (85% similarity threshold). Returns immediately; background processing handles indexing. Prefer over update_memory for new content. Returns: confirmation text. Side effects: creates memory record, updates search index, may skip if duplicate detected.

Inputs: async, content, user_id, messages, +3 more.

cache_statsA
Read-onlyIdempotent

View cache performance metrics and health status. Use for monitoring and debugging. Shows memory count, access patterns, and hit rates. Read-only. Returns: summary text with cached memory count. No side effects.

Inputs: no named parameters.

deduplicate_memoriesA
Destructive

Detect and optionally remove duplicate memories using content similarity. Run with dry_run=true first to preview. Compares all memories pairwise using Jaccard similarity. Groups duplicates with a primary (oldest) and candidates for removal. Returns: summary with duplicate groups. Side effects (when dry_run=false): deletes duplicate memories, invalidates cache.

Inputs: dry_run, user_id, similarity_threshold.

delete_memoryA
DestructiveIdempotent

Permanently remove a memory by ID. Irreversible operation. Removes from storage, cache, and search index. Use deduplicate_memories with dry_run first to preview bulk deletions. Returns: confirmation text. Side effects: deletes memory record, removes from all indexes, invalidates cache.

Inputs: memory_id (required).

extract_entitiesA
Read-onlyIdempotent

Extract named entities and relationships from text using NLP. Identifies people, organizations, technologies, and projects. Also extracts relationships (WORKS_FOR, USES, etc.) and keywords. Requires enhanced intelligence mode. Read-only, stateless. Returns: {people[], organizations[], technologies[], projects[], relationships[], keywords[]}.

Inputs: text (required).

find_connectionsA
Read-onlyIdempotent

Discover relationship paths between entities in the knowledge graph. Uses BFS traversal to find how entities connect. Useful for answering 'how is X related to Y?' questions. Requires enhanced mode. Read-only. Returns: {from, to, max_depth, paths_found, paths[]} where each path is array of {from, to, type} edges.

Inputs: from_entity (required), max_depth, to_entity.

get_all_memoriesA
Read-onlyIdempotent

List all memories for a user with pagination. Use for browsing or bulk operations. For content search, use search_memory instead. Cache-first by default. Large result sets are automatically truncated. Read-only. Returns: {total, limit, offset, returned, hasMore, source, memories[]}.

Inputs: limit, offset, user_id, prefer_cache, +1 more.

get_knowledge_graphA
Read-onlyIdempotent

Build a knowledge graph from stored memories. Returns entities as nodes and relationships as edges. Use for visualizing connections between concepts. Requires enhanced intelligence mode with prior entity extraction. Read-only. Returns: {nodes[], edges[]} where nodes have {id, type, name, memories[]} and edges have {from, to, type, confidence}.

Inputs: limit, entity_name, entity_type, relationship_type.

get_memoryA
Read-onlyIdempotent

Retrieve a single memory by its unique ID. Use when you have a specific memory_id from prior search/list results. Returns null if not found. Prefer search_memory for content-based lookup. Read-only operation. Returns: Memory object {id, content, user_id, metadata} or null.

Inputs: memory_id (required), user_id.

import_memoriesA

Bulk import memories from external sources. Supports Mem0 API export or local JSON files. Processes in batches with duplicate detection. Use for migration or backup restoration. Returns: summary with imported/skipped/failed counts. Side effects: creates multiple memory records, updates search index.

Inputs: source (required), api_key, user_id, priority, +3 more.

optimize_cacheA
Idempotent

Reorganize cache for optimal hit rates. Promotes frequently accessed memories to L1 (24h TTL), demotes cold data to L2 (7d TTL). Use periodically for large memory stores. May temporarily increase latency during optimization. Returns: summary of cached memories. Side effects: modifies cache TTLs, may evict old entries.

Inputs: max_memories, force_refresh.

search_memoryA
Read-onlyIdempotent

Find memories matching a natural language query using hybrid semantic + keyword search. Primary retrieval tool for content-based lookup. Uses vector similarity (enhanced mode) or keyword matching (basic mode). Cache-first by default for speed. Returns ranked results with relevance scores. Read-only. Returns: array of Memory objects or 'No memories found' text.

Inputs: query (required), limit, user_id, prefer_cache.

sync_statusA
Read-onlyIdempotent

Check background job queue and sync status. Shows pending async operations from add_memory calls. Use to verify all writes completed. Read-only. Returns: count of pending operations or 'All operations complete'. No side effects.

Inputs: no named parameters.

update_memoryA
Idempotent

Modify an existing memory's content or metadata. Use for corrections or adding context to existing memories. Fails if memory_id not found. Prefer add_memory for new content. Invalidates search cache. Returns: updated Memory object. Side effects: modifies memory record, invalidates cached search results.

Inputs: memory_id (required), content, user_id, metadata.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool targets a distinct operation: core memory CRUD, bulk import, deduplication, cache monitoring/optimization, sync checking, and knowledge graph pipeline steps are clearly separated. Potential overlaps like get_all_memories vs search_memory or add_memory vs deduplicate_memories are explicitly disambiguated by descriptions of intended use.

    Naming Consistency4/5

    Most tools follow a clear verb_noun snake_case pattern (add_memory, get_memory, update_memory, delete_memory, search_memory, import_memories, extract_entities, find_connections). Minor deviations exist: cache_stats and sync_status are noun-style rather than verb_noun, but they remain readable and consistent in style overall.

    Tool Count5/5

    14 tools is well-scoped for a memory server covering CRUD, search, bulk operations, cache maintenance, sync status, and knowledge graph features. Each tool has a legitimate place and none feel redundant or purely decorative.

    Completeness4/5

    The memory lifecycle is fully covered: add, get, update, delete, search, list, import, and deduplicate. Cache and sync monitoring are included, and knowledge graph extraction/querying extends the surface nicely. Minor gaps exist (no explicit export tool or cache configuration tool), but these do not create dead ends for core workflows.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Open-source MCP server that gives any LLM long-term memory using a knowledge graph and vector search hybrid. It stores entities, observations, and relationships, enabling semantic recall across sessions with automatic clustering and fail-loud infrastructure.
      51
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A lightweight MCP server that provides long-term memory for LLMs by storing and retrieving important facts, decisions, and preferences through smart semantic search and automatic organization.
      12
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Persistent memory MCP server for AI agents that stores, recalls, and searches conversation history, key-value context, and long-term entries across sessions with semantic search and FIFO queues.
      98 npm
      1
      -