Skip to content

Connect r3 to your MCP client

r3 is a local-first memory server for MCP clients. It stores facts and conversation context through tools over standard input and output. This guide connects your client, writes a test memory, and reads it back in a new conversation.

Your MCP client launches r3 over stdio. r3 stores memory locally in three layers:

  • Embedded Redis stores memory content and metadata via redis-memory-server (auto-downloaded binary, no external service). Falls back to an in-process store if it cannot start.
  • vectra provides a local, file-backed vector index for semantic search with no network calls.
  • Mem0 cloud is optional. Set MEM0_API_KEY to sync memories across machines. Without a key, nothing leaves your machine.
  • Node.js 18 or later
  • An MCP client (Claude Desktop, Claude Code, or Cursor)
  • Network access for the initial npm install and Redis binary download
  • A writable working directory for the vector index
  1. Add r3 to your MCP config

    Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (or the equivalent path on your OS):

    {
    "mcpServers": {
    "r3": {
    "command": "npx",
    "args": ["@n3wth/r3"]
    }
    }
    }
  2. Restart and confirm tools

    Restart or reconnect your MCP client after editing the configuration. Inspect the discovered tools: add_memory, search_memory, and cache_stats should appear. A successful MCP connection confirms transport readiness.

  3. Write a memory

    Ask the assistant to store a preference:

    Remember that I prefer TypeScript and dark mode.

    Confirm that the client calls add_memory with your message. A Saved response acknowledges the request; the next step checks retrieval.

  4. Read it back in a new conversation

    Start a new conversation and ask:

    What are my preferences?

    Confirm that the client calls search_memory and returns the preference you stored. An answer drawn from the current conversation does not verify retrieval. If the result is missing, see Troubleshooting.

A new conversation and a server restart are different checks. Restart r3 from the same working directory, then retrieve your test memory again. Review the storage limitations before relying on restart persistence. Keep an independent copy of data you cannot lose.