# remem-mcp — Local-first MCP Memory + CodeGraph + Wiki [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/tinhien11/remem-mcp  
**GitHub Stars:** 9  
**npm Downloads (last month):** 599  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/remem-mcp-local-first-mcp-memory-codegraph-wiki

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

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "remem-mcp-local-first-mcp-memory-codegraph-wiki": {
    "command": "npx",
    "args": ["-y","remem-mcp"],
    "env": {
      "REMEM_DB_PATH": "",
      "REMEM_GLOBAL_SESSION_KEY": "",
      "REMEM_FLOW": "",
      "REMEM_QUIET": ""
    }
  }
}
```

**Requires environment variables:** `REMEM_DB_PATH`, `REMEM_GLOBAL_SESSION_KEY`, `REMEM_FLOW`, `REMEM_QUIET` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What remem-mcp does

remem-mcp — Local-first MCP Memory + CodeGraph + Wiki combines agent memory, code structure indexing, and wiki capabilities in a local SQLite database. It is intended for AI coding agents that need to retain useful context across sessions and recover information after context compaction.

The memory system records errors, decisions, facts, summaries, and persona information. It can automatically capture failed commands and session information, then make relevant memories available during later prompts. Memory is organized through multiple levels, from raw captures to extracted facts, scenario summaries, and preferences.

CodeGraph provides structural navigation over indexed source code. It records symbols, calls, and imports, allowing an agent to search for symbols, identify callers, and inspect an affected area rather than relying only on text search. Supported languages are TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, and C#.

## How it works

The agent communicates through MCP tools including `recall`, `capture`, CodeGraph tools, wiki tools, and `feedback`. Hooks can run at session start, prompt submission, after tool use, after context compaction, and session end. These events support context injection, error capture, memory re-injection, and background extraction or consolidation.

Memory retrieval uses hybrid BM25, vector, and entity search. Frequently co-retrieved memories receive stronger links through Hebbian co-retrieval. Extraction and keyword grouping are rule-based, so an external LLM API key is not needed.

CodeGraph indexing uses tree-sitter and six call-resolution strategies: import maps, same-module matches, unique names, suffixes, fuzzy matching, and filtering of standard-library calls. The command-line interface includes directory indexing, symbol search, caller lookup, and impact analysis.

## Setup and configuration

Run `npx remem-mcp setup` to install the server and hooks. The setup command detects ZCode, Claude Code, Cursor, Devin, and Codex. After installation, restart the agent and ask what it remembers to check whether memory is available.

The optional configuration file is `~/.config/remem-mcp/config.json`. By default, the database is stored at `~/.local/share/remem-mcp/memory.db`. `REMEM_DB_PATH` changes that location. `REMEM_GLOBAL_SESSION_KEY` enables automatic reading of cross-project memory, while captures remain project-local unless explicitly saved with the global session key. `REMEM_FLOW=full` enables the unified flow, and `REMEM_QUIET=1` suppresses hook feedback.

Run `npx remem-mcp sync-export` to write `.remem-mcp/memory-export.jsonl`, which can be committed to a Git repository for team sharing. A `.remem.toml` file can exclude paths such as `node_modules`, `dist`, `.git`, or minified JavaScript files from capture.

## Tools and capabilities

- Recall and capture project memory through MCP.
- Index source directories and search indexed symbols.
- Find callers and inspect a symbol's potential impact area.
- Use wiki-related MCP tools.
- Provide feedback to the memory system.
- Check health, hooks, database state, and CodeGraph status with `status`.
- Open the local viewer on port 7331 and inspect captured errors or recent entries.

## Limitations and notes

remem-mcp — Local-first MCP Memory + CodeGraph + Wiki is local-first: the documented storage is a SQLite file, and no cloud database or API key is required. Cross-project reads require `REMEM_GLOBAL_SESSION_KEY`, and global capture requires an explicit global session request. Team sharing is file-based through the generated JSONL export and Git.

CodeGraph must be indexed before its structural searches can use repository symbols. Its call resolution uses heuristics, so results depend on the indexed code and the six supported resolution strategies. Configuration settings have defaults, making the configuration file optional.

_Full upstream README: https://allmcps.com/mcp/remem-mcp-local-first-mcp-memory-codegraph-wiki/readme_

