Skip to main content

Configuration

Configure the MCP process. Choose a mode and find the stored data.
4 min read

Set configuration on the process that your MCP client launches. Website environment variables do not configure that process. Start with the quickstart and use a dedicated working directory for each isolated installation.

Environment variables#

These values come from src/index.ts, not the interactive UI's configuration or older website examples.

VariableDefaultEffect
MEM0_USER_IDoliverDefault namespace used by the MCP handlers. Set it explicitly. It is not an authentication control.
INTELLIGENCE_MODEenhancedExact value basic disables enhanced initialization; other values select enhanced mode.
MEM0_API_KEYUnsetCredential used for Mem0 requests in explicitly selected hybrid mode. A key alone does not select hybrid mode.
MEM0_BASE_URLhttps://api.mem0.aiBase URL for the server's general Mem0 request helper. The Mem0 import tool uses its own fixed URL.
REDIS_URLGeneral cache URL defaults to redis://localhost:6379Selects the external cache connection path when explicitly set; see the local-mode limitation below.
DEMO_MODEUnsetExact value true selects the nonpersistent demo backend.
DEBUGUnsetExact value true enables debug logging.
QUIET_MODEAutomatically quiet for non-TTY input or productionExact value false disables quiet mode. Keep normal quiet behavior for MCP.

The core manifest's MCP metadata marks Redis and Mem0 credentials as required, but the executable selects local mode without either. Follow the runtime logic when configuring local use.

Select a mode#

ModeSelectionStorage behavior
LocalDefaultRoutes memory operations to LocalMemory; attempts embedded Redis and local Vectra.
HybridMEM0_API_KEY plus --hybridRoutes general memory API requests to Mem0; Redis acts as a cache.
Demo--demo or DEMO_MODE=trueUses in-process records with no persistence.

Demo selection takes precedence. Do not interpret the presence of an API key, a startup banner, or an empty job queue as confirmation of cloud synchronization. Hybrid mode is a Mem0-backed request path; the source does not establish a complete cross-device synchronization contract.

The package command serve starts the MCP server and is the default command. ui and experimental manage launch separate interactive interfaces. Their R3CALL_* settings and --user-id flag are not replacements for MEM0_USER_ID in the MCP server. The server entry exports startServer; these pages do not assume an exported Recall SDK class.

Keep a stable working directory#

For a manual launch on macOS or Linux:

This starts a stdio server awaiting an MCP client; it does not start a web UI. For regular use, configure the same working directory through your client's process-launch settings. Changing it changes which relative vector index r3 opens. The inspected server does not expose an environment variable for changing that index path.

Storage and retention#

LayerImplementationRetention caveat
Local recordsRedis keys memory:<user>:<id>Adds use a 30-day default TTL; updates reset it to 30 days. The MCP add schema does not expose a TTL argument.
Local vector index./data/vectra-indexFile-backed, relative to the working directory; not a complete backup of Redis state.
MCP cacheRedis memory:<id> keysL1 TTL is 24 hours; L2 TTL is 7 days.
Search cacheRedis search:* keysFive-minute TTL; key construction does not include a user namespace.
Demo recordsJavaScript mapsLost with the process.

Basic and enhanced Vectra implementations default to the same directory but generate embeddings differently. Do not assume switching modes gives equivalent search results. Avoid running multiple writers against the same index without first validating the behavior.

The embedded backend is created with new RedisMemoryServer() and no explicit persistence options. Keep an independent copy of important data and test write/read/restart behavior in the actual launch environment. There is no documented MCP backup/restore guarantee.

External Redis caveat#

REDIS_URL is supported by the cache connection code, but it is not a verified drop-in replacement for local storage. Explicitly setting it bypasses the branch that creates LocalMemory, while local-mode API calls still require LocalMemory. This can produce Local memory not initialized.

For the local quickstart, leave REDIS_URL unset. If you need an externally managed database, validate the relevant core path before deploying it; changing the website's settings will not fix this behavior.

Sources#

The authoritative configuration is in the core server, CLI dispatch, local backend, basic vector store, and enhanced vector store. See the workspace migration record for the website/core boundary.