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

io.github.tinhien11Published by GitHub account tinhien11v0.5.18Updated Oct 24, 2026

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

The publisher's own server: Remember Me – Bible Verse Collections

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

A local-first memory server for AI coding agents that stores memories, code structure and wiki notes in one SQLite file and re-injects them across sessions.

What you can do
Recall and capture memories so past errors, decisions and preferences are injected into the agent's context and survive context compaction, with automatic extraction and consolidation at session end and decay/forgetting over time. Index code with tree-sitter into a CodeGraph of symbols, calls and imports across nine languages, then search symbols, find callers and estimate impact instead of grepping. Maintain wiki notes and record feedback alongside memories, with hybrid keyword, vector and entity search plus Hebbian memory links. Export memory to a JSONL file for team sharing through git, and inspect state through a local web viewer, error dashboard and status commands.
When to use it
Useful for developers running coding agents such as Claude Code, Cursor, Codex or similar who want the agent to remember past mistakes and project context across sessions and context compaction, and who want structural code navigation without a cloud service or API key.
Requirements
Runs as a local stdio process installed via npx from the npm package remem-mcp; needs Node.js and a local SQLite file. No API key, cloud account or database server is required. Optional environment variables set the database path, cross-project memory key, unified flow and quiet mode; an optional config file and per-repo ignore file can be added.
Before you install
Setup auto-detects supported agents and registers the MCP server plus hooks that run at session start, each prompt, after tool use, after compaction and at session end, so the agent captures prompts and failed commands automatically. Captured memories are stored locally but can be exported to a JSONL file and committed to git, which shares them with everyone who pulls the repository; review exports before committing. Cross-project memory is opt-in via a session key.

Installation

In SourceWeft

  1. Open remem-mcp — Local-first MCP Memory + CodeGraph + Wiki in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: README.md at commit 7590cec

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.5.18LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Remem integrations