Skip to content

Configuration

You configure r3 through environment variables passed to the process your MCP client launches. This page covers the available variables, storage backends, intelligence modes, and an example with cloud sync enabled.

string

Enables Mem0 cloud sync. When unset, r3 runs entirely local and nothing leaves your machine.

string · Default: embedded

URL of an external Redis server. Leave unset to use the embedded Redis server (recommended for most setups).

string · Default: default

Default namespace for memory isolation. Individual tool calls can override this with the user_id argument.

string · Default: enhanced

Set to enhanced (default) or basic. Enhanced mode adds entity extraction, knowledge graph tools, and HuggingFace embeddings. Basic mode uses a simpler word-hash fallback.

boolean · Default: false

Enable debug logging to stderr. Keep quiet mode enabled for normal MCP use so stdout stays reserved for protocol messages.

r3 uses redis-memory-server to download and manage a local Redis binary automatically. It stores memory content and metadata. If the embedded server cannot start, r3 falls back to an in-process store. No external Redis installation is required.

r3 maintains a file-backed vector index at ./data/vectra-index relative to the process working directory. This powers semantic search with no network calls. Keep the working directory stable so the index path does not change between restarts.

Setting MEM0_API_KEY activates Mem0 cloud sync. Without a key, r3 operates entirely offline. With a key, writes are also sent to Mem0 so memories can follow you across devices.

Enhanced mode is the default. It adds three extra tools: extract_entities, get_knowledge_graph, and find_connections. It also loads @huggingface/transformers embeddings for semantic search. This mode needs network access for the initial model download and more CPU for inference.

Add the env block to your MCP config to enable Mem0 cloud sync:

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