r3

io.github.n3wth由 GitHub 账号 n3wth 发布v1.3.2更新于 Oct 24, 2026

Local Redis memory MCP for AI apps with hybrid caching and optional Mem0 cloud backup.

已验证STDIO仅桌面数据库知识与记忆

概览

AI 生成的概览

为助手提供本地持久记忆存储与语义搜索,底层使用内嵌 Redis 和本地向量索引。

可以做什么
r3 作为本地 MCP 服务器运行,负责保存记忆并在之后检索,让偏好和事实能跨对话保留。工具包括 add_memory、search_memory、get_all_memories、get_memory、update_memory、delete_memory、deduplicate_memories、import_memories,以及 cache_stats、sync_status 和 optimize_cache。增强模式还提供 extract_entities、get_knowledge_graph 和 find_connections,用于实体与关系查询。
适用场景
适合希望助手在会话之间记住用户偏好、笔记或项目上下文,又不想搭建外部数据库或注册账号的场景。也适合需要对已存记忆做语义检索或小型本地知识图谱的工作流。
运行要求
通过 stdio 在本地运行,使用 npx @n3wth/r3 启动,因此需要 Node.js。它会下载并管理内嵌 Redis 二进制文件,并在磁盘上保留本地向量索引;启动无需注册或 API 密钥。可选环境变量:REDIS_URL 指向外部 Redis,MEM0_API_KEY 启用云同步,MEM0_USER_ID 用于命名空间,INTELLIGENCE_MODE 选择增强或基础模式。仅支持桌面客户端。
安装前请注意
记忆类工具会写入、修改和删除已存数据,deduplicate_memories 还会合并记录,因此让助手清理记忆前应先确认。设置 MEM0_API_KEY 会把记忆发送到 Mem0 云 API 以跨设备同步;不设置则数据不离开本机。README 提到部分 macOS 环境存在原生模块构建失败的问题。

安装

在 SourceWeft 中

  1. 打开 控制台中的 r3,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

r3

[npm version] [npm downloads] [License: MIT]

Persistent memory for MCP clients (Claude Desktop, Claude Code, Cursor) that runs entirely on your machine, with no accounts, no API keys, and no cloud service required to start.

[Memory persisting across two separate server processes]

Quick start

bash
npx @n3wth/r3

That single command starts an MCP server backed by an embedded Redis instance and a local vector index. There is no separate database to install and no signup step.

How it works

MCP client (Claude Desktop / Claude Code / Cursor)        |        v   r3 MCP server (stdio)        |   +----+-----------------------+   |                            |embedded Redis            vectra local index(redis-memory-server,      (on-disk vector store auto-downloaded binary,    for semantic search, no external service)       no external service)   |   +--- optional ---> Mem0 cloud API (MEM0_API_KEY)                       cross-device sync, off by default
  • Embedded Redis — redis-memory-server downloads and manages a local Redis binary for you. It stores memory content and metadata. If it cannot start, r3 falls back to an in-process store.
  • vectra — a local, file-backed vector index used for semantic search. No network calls, no external vector database.
  • Mem0 (optional) — if MEM0_API_KEY is set, r3 also syncs to Mem0's cloud API so memories can follow you across machines. Without a key, nothing leaves your machine.

MCP client configuration

Claude Desktop

Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

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

Claude Code

bash
claude mcp add r3 "npx @n3wth/r3"

Cursor

Add to .cursor/mcp.json in your project (or the global Cursor MCP config):

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

Restart the client after editing config. In a new conversation:

You: Remember that I prefer TypeScript and dark mode.AI: I'll remember that.
[new conversation]
You: What are my preferences?AI: You prefer TypeScript and dark mode.

Tools

ToolDescription
add_memoryStore content with optional metadata and priority
search_memoryQuery memories using semantic or keyword search
get_all_memoriesList stored memories with pagination
get_memoryRetrieve a specific memory by ID
update_memoryModify existing memory content or metadata
delete_memoryRemove a memory
deduplicate_memoriesFind and merge duplicate memories
cache_statsReport cache hit rate and storage stats
sync_statusReport Mem0 cloud sync status
optimize_cacheRun cache maintenance
import_memoriesBulk import memories

Enhanced mode (default, INTELLIGENCE_MODE=enhanced) adds:

ToolDescription
extract_entitiesExtract named entities from text
get_knowledge_graphReturn the entity/relationship graph
find_connectionsFind entities connected to a given entity

Configuration

Environment variables, all optional:

VariableDescriptionDefault
REDIS_URLUse an external Redis instead of the embedded oneembedded server
MEM0_API_KEYEnables Mem0 cloud syncunset (local only)
MEM0_USER_IDNamespace for memoriesdefault
INTELLIGENCE_MODEenhanced or basicenhanced

Example with cloud sync enabled:

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

Comparison

r3mem0 (OSS)zep
Runs fully local with zero configyes (embedded Redis + vectra)requires a Postgres/vector DB you configurerequires a Postgres instance you configure
Needs an API key to try itnono (self-hosted) / yes (cloud)yes (cloud), or self-hosted setup
Optional cloud syncyes, via Mem0n/a (is the cloud option)yes

This table only reflects setup requirements observed in each project's own documentation, not benchmark performance or feature completeness. Verify against current upstream docs before relying on it.

Known issues

See LAUNCH_AUDIT.md for current limitations, including a native module build failure on some macOS setups.

Documentation

Full documentation at r3.n3wth.com.

License

MIT

来源:README.md,提交 c4ef538

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.3.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分