remem-mcp — Local-first MCP Memory + CodeGraph + Wiki

io.github.tinhien11由 GitHub 帳號 tinhien11 發布v0.5.18更新於 Oct 24, 2026

Local-first memory for AI coding agents. Memory + CodeGraph + Wiki in one SQLite file.

發布方自己的服務:Remember Me – Bible Verse Collections

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

為 AI 程式設計助理打造的本地優先記憶伺服器,把記憶、程式碼結構與 wiki 筆記存放在同一個 SQLite 檔案中,並在跨工作階段時重新注入。

可以做什麼
記憶的召回與擷取:把過往錯誤、決策與偏好注入助理上下文,在上下文壓縮後仍保留,並於工作階段結束時自動擷取、歸納,支援衰減與遺忘。以 tree-sitter 建立程式碼圖譜,索引九種語言的符號、呼叫與匯入,可搜尋符號、找出呼叫端並評估影響範圍,取代 grep。維護 wiki 筆記並記錄回饋,搭配關鍵字、向量與實體混合檢索以及共現記憶連結。把記憶匯出為 JSONL 檔案,經 git 供團隊共享,並透過本機網頁檢視器、錯誤面板與狀態指令檢查運作情況。
適用情境
適合使用 Claude Code、Cursor、Codex 等程式設計助理、希望助理跨工作階段與上下文壓縮後仍記得過往錯誤與專案上下文的開發者,也適合需要結構化程式碼導覽但不想使用雲端服務或 API 金鑰的人。
執行需求
以本機 stdio 程序執行,透過 npx 從 npm 套件 remem-mcp 安裝;需要 Node.js 與本機 SQLite 檔案。無需 API 金鑰、雲端帳號或資料庫伺服器。選用環境變數可設定資料庫路徑、跨專案記憶鍵、統一流程與靜默模式,也可加入選用設定檔與各儲存庫的忽略檔。
安裝前請注意
安裝會偵測支援的助理並註冊 MCP 伺服器與鉤子,這些鉤子在工作階段開始、每次提示、工具呼叫後、壓縮後與工作階段結束時執行,因此助理會自動擷取提示內容與失敗的指令。擷取的記憶保存在本機,但可匯出為 JSONL 檔案並提交到 git,因而分享給所有拉取該儲存庫的人,提交前應先檢查匯出內容。跨專案記憶需透過工作階段鍵明確開啟。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 remem-mcp — Local-first MCP Memory + CodeGraph + Wiki,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

remem-mcp

[npm version] [GitHub stars] [License: MIT] [Benchmark]

Your coding agent stops repeating the same mistakes.

Local-first memory that survives context compaction. Learns from every error, injects fixes before the next attempt, and syncs to your git repo so your whole team shares it.

No API key. No cloud. No database server. Just a SQLite file.


Install

bash
npx remem-mcp setup

Auto-detects ZCode, Claude Code, Cursor, Devin, Codex. Registers MCP server + hooks.


Quick start

  1. Restart your agent (quit and reopen)
  2. Ask: "what do you remember?"
  3. If agent recalls past context = memory working

In your agent, you can say:

  • "index the code in src" → CodeGraph indexes symbols
  • "find who calls function X" → caller analysis
  • "what do you remember?" → recall past context

What happens automatically

WhenWhat
Session startPast errors, decisions, and persona injected into agent context
Each promptMatching memory injected into agent context
Failed commandsAuto-captured as error memories
Context compactionMemory re-injected after compaction
Session endWorker auto-extracts facts, consolidates summaries, updates persona

You don't run any commands. The agent calls recall() before answering and capture() after work — the skill tells it to.


How it works

AI Agent (ZCode / Claude Code / Devin / Cursor / Codex)    │    ├── MCP tools ──▶ recall, capture, codegraph_*, wiki_*, feedback    │    └── Hooks ──▶ SessionStart, UserPromptSubmit,                  PostToolUse, PostCompaction, SessionEnd                        │                        ▼              SQLite (memory.db)
  L0 captures → L1 atoms → L2 scenarios → L3 persona  (raw)        (facts)      (summaries)    (preferences)
  CodeGraph: symbols + calls + imports (tree-sitter, 9 languages)  Memory links: Hebbian co-retrieval (frequently co-retrieved = stronger)

No LLM API key needed — rule-based extraction + keyword grouping.


CodeGraph

Structural code indexing via tree-sitter. The agent uses codegraph_search instead of grep to find symbols.

bash
npx remem-mcp index --path src              # index a directorynpx remem-mcp search-code --query "parseTar"  # find symbolsnpx remem-mcp callers <id>                  # who calls this?npx remem-mcp impact <id>                   # blast radius

9 languages: TS/JS/Python/Go/Rust/Java/C/C++/C#. 6-strategy call resolution (import-map → same-module → unique-name → suffix → fuzzy). Stdlib calls filtered out.

RepoFilesSymbolsCallsTime
remem-mcp793016,4563s
AZR Go4553,41741,603111s
Orca TS3,0007,63278,981705s

Why it's different

remem-mcpMem0Claude MEMORY.mdMneme
Survives compactionYesYes — cloudNo — 200-line capYes
Learns from errorsYes — autoNoNoNo
SearchHybrid BM25 + vector + entitiesVector onlyNoVector + graph
Memory linksHebbian co-retrievalNoNoGraph
Decay/forgetYesNoNoNo
CodeGraphYes — 6-strategy call resolutionNoNoNo
Token offloadYes — Mermaid canvasNoNoNo
Setup1 commandAPI key + cloudBuilt-inBuild from source
CostFree$19–249/moFreeFree

Useful commands

bash
npx remem-mcp status           # health + hooks + DB + CodeGraphnpx remem-mcp viewer           # web UI at localhost:7331npx remem-mcp errors           # error dashboardnpx remem-mcp recent [N]       # recent capturesnpx remem-mcp help all         # full list of 40+ subcommands

Configuration

All settings have defaults. Config file is optional: ~/.config/remem-mcp/config.json.

SettingEnv varDefault
DB pathREMEM_DB_PATH~/.local/share/remem-mcp/memory.db
Cross-project memoryREMEM_GLOBAL_SESSION_KEY(unset)
Unified flow (F1+F2+F3)REMEM_FLOW(unset, set to full)
Suppress hook feedbackREMEM_QUIET(unset, set to 1)

Global memory policy — set REMEM_GLOBAL_SESSION_KEY to read cross-project memory automatically. Captures stay project-local unless the user explicitly asks to save globally; then use session_key: "global". Do not auto-classify ordinary captures into global.

Team sharing — npx remem-mcp sync-export writes .remem-mcp/memory-export.jsonl. Commit it to git. Team members get the same memory on git pull.

Per-repo capture exclusions — Drop a .remem.toml in any project root:

toml
[capture]ignore_paths = ["node_modules", "dist", ".git", "*.min.js"]

Benchmark

Benchmarkremem-mcpMem0Without memory
AMB (L1/L2/L3)100/100/100——
LoCoMo (long conversation QA)9592.5—
PersonaMem (personalization)100—48
LongMemEval (ICLR 2025)9694.4—
bash
bash scripts/bench-all.sh --quick   # AMB only (~2 min)

Architecture

See ARCHITECTURE.md for full system diagrams, schema, and performance details.

Credits

Core based on TencentDB Agent Memory (MIT, Tencent 2026). CodeGraph call resolution adapted from Codebase-Memory (arXiv:2603.27277). Recall boost adapted from ai-memory by Akita On Rails. Contextual retrieval from Anthropic (2024).

License

MIT. See LICENSE.

來源:README.md,提交 7590cec

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.5.18最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Remem 整合