r3 Documentation
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
- L1 (Redis): Hot data, 24-hour TTL
- L2 (Cloud): Permanent storage with vector search
MCP tools
r3 provides these tools to MCP clients:
add_memory: Store new informationsearch_memory: Find relevant contextget_all_memories: List all memoriesdelete_memory: Remove specific memorycache_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)