r3 Documentation

Markdown

MCP server for persistent AI memory. Local Redis storage with optional cloud sync.

How r3 works

r3 is an MCP server that gives AI applications persistent memory. By default, it uses an embedded Redis server for local storage. No setup required. Optionally add cloud sync with Mem0.

Add r3 to your MCP client's configuration:

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

Tell your assistant, “Remember that I prefer TypeScript.” In a later conversation, it can use that preference when recommending a language for your project.

Architecture

Antigravity CLI
MCP Protocol
r3 Server
Redis(L1 Cache)
Mem0 Cloud(L2 Storage)

Core concepts

Memories

Each memory contains:

  • Content: The information to remember
  • User ID: Who it belongs to
  • Priority: How important it is (affects caching)
  • Metadata: Additional context

Caching layers

  1. L1 (Redis): Hot data, 24-hour TTL
  2. L2 (Cloud): Permanent storage with vector search

MCP tools

r3 provides these tools to MCP clients:

  • add_memory: Store new information
  • search_memory: Find relevant context
  • get_all_memories: List all memories
  • delete_memory: Remove specific memory
  • cache_stats: Monitor performance

When to use r3

Good for:

  • User preferences and settings
  • Conversation history
  • Facts about users or projects
  • Context that should persist

Not for:

  • Sensitive data (use encryption)
  • Large files (use object storage)
  • Real-time data (use streaming)

Get help

Search docs

Answers use the published r3 docs.

Loading documentation…