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

A local MCP server that stores agent memory, maps code relationships, and keeps a Wiki in one SQLite file. Useful when context must survive sessions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 9
- Author: tinhien11
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/tinhien11/remem-mcp
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/remem-mcp-local-first-mcp-memory-codegraph-wiki

## What it does

remem-mcp gives an AI coding agent local memory, CodeGraph, and Wiki tools through MCP. It records errors, decisions, and facts, then brings relevant context back before a response. Memory is also restored after context compaction. No API key, cloud service, or separate database server is needed; the data stays in SQLite.

Hooks cover session start, prompt submission, tool use, compaction, and session end. CodeGraph uses tree-sitter to index symbols, calls, and imports across 9 languages. The agent can search code, inspect callers, and estimate an impact area. A restart is required after setup, so the initial memory check will not work before reopening the agent.

For team sharing, export memory to `.remem-mcp/memory-export.jsonl` and commit the file to git. Optional settings live in `~/.config/remem-mcp/config.json`; `REMEM_DB_PATH` changes the database location. Cross-project reads use `REMEM_GLOBAL_SESSION_KEY`, while ordinary captures remain project-local.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add remem-mcp -- npx -y remem-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add remem-mcp-local-first-mcp-memory-codegraph-wiki -- npx -y remem-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "remem-mcp-local-first-mcp-memory-codegraph-wiki": {
            "command": "npx",
            "args": [
                "-y",
                "remem-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "remem-mcp-local-first-mcp-memory-codegraph-wiki": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "remem-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add remem-mcp-local-first-mcp-memory-codegraph-wiki npx -y remem-mcp
```

## When to use it
- carry errors and decisions across sessions
- restore context after compaction
- map symbols and code relationships
- trace callers and estimate change impact
- share project memory through git

## Example prompts
- Remember the decision we made about this error and use it in later sessions.
- Index the code under `src`, then find who calls `parseTar`.
- What do you remember about earlier errors in this project?

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
