# Local Memory

Your assistant starts each chat with context from earlier ones. Everything lives in one SQLite file on your disk, with no cloud and no API keys.

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

## What it does

On session start the server pulls context from previous conversations, so the model picks up where you left off. While you work it can log findings through `memory_learn` and record facts about people, projects and tools through `memory_entity_observe`, which grows a knowledge graph over time. Making that automatic takes one line in `CLAUDE.md` or a SessionStart hook in `~/.claude/settings.json` that triggers `memory_session_start`.

Searches through `memory_search` default to hybrid mode: BM25 ranking from FTS5 is merged with vector cosine scores using Reciprocal Rank Fusion. Vectors come from the `Xenova/multilingual-e5-small` model running through Transformers.js on CPU, q8-quantized, with roughly 30 MB of cache. A query for “send” can surface “publish”, and the languages of query and notes need not match. Should the vector extension fail to load, search drops back to FTS5 alone without an error.

Node.js is a prerequisite: `npx` fetches the `@studiomeyer/local-memory-mcp` package. Mind the scoped name. A separate project ships as `local-memory-releases` under the same descriptive title, and installing that one gets you different software.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MEMORY_DB_PATH`, `MEMORY_EMBED_DISABLED`, `MEMORY_EMBED_MODEL`, `MEMORY_EMBED_CACHE_DIR` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MEMORY_DB_PATH=<MEMORY_DB_PATH> --env MEMORY_EMBED_DISABLED=<MEMORY_EMBED_DISABLED> --env MEMORY_EMBED_MODEL=<MEMORY_EMBED_MODEL> --env MEMORY_EMBED_CACHE_DIR=<MEMORY_EMBED_CACHE_DIR> --transport stdio local-memory -- npx -y @studiomeyer/local-memory-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add local-memory --env MEMORY_DB_PATH=<MEMORY_DB_PATH> --env MEMORY_EMBED_DISABLED=<MEMORY_EMBED_DISABLED> --env MEMORY_EMBED_MODEL=<MEMORY_EMBED_MODEL> --env MEMORY_EMBED_CACHE_DIR=<MEMORY_EMBED_CACHE_DIR> -- npx -y @studiomeyer/local-memory-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "local-memory": {
            "command": "npx",
            "args": [
                "-y",
                "@studiomeyer/local-memory-mcp"
            ],
            "env": {
                "MEMORY_DB_PATH": "<MEMORY_DB_PATH>",
                "MEMORY_EMBED_DISABLED": "<MEMORY_EMBED_DISABLED>",
                "MEMORY_EMBED_MODEL": "<MEMORY_EMBED_MODEL>",
                "MEMORY_EMBED_CACHE_DIR": "<MEMORY_EMBED_CACHE_DIR>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "local-memory": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@studiomeyer/local-memory-mcp"
            ],
            "env": {
                "MEMORY_DB_PATH": "<MEMORY_DB_PATH>",
                "MEMORY_EMBED_DISABLED": "<MEMORY_EMBED_DISABLED>",
                "MEMORY_EMBED_MODEL": "<MEMORY_EMBED_MODEL>",
                "MEMORY_EMBED_CACHE_DIR": "<MEMORY_EMBED_CACHE_DIR>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MEMORY_DB_PATH=<MEMORY_DB_PATH> -e MEMORY_EMBED_DISABLED=<MEMORY_EMBED_DISABLED> -e MEMORY_EMBED_MODEL=<MEMORY_EMBED_MODEL> -e MEMORY_EMBED_CACHE_DIR=<MEMORY_EMBED_CACHE_DIR> local-memory npx -y @studiomeyer/local-memory-mcp
```
Replace <…> with your own values

## When to use it
- recover context from an earlier session without retelling it
- find a note by meaning rather than an exact word
- keep facts about people and projects across chats
- avoid storing the same finding twice
- keep assistant memory in a local file instead of a cloud service

## Example prompts
- Call `memory_session_start` and tell me what we were working on last time.
- Search `memory_search` for everything we decided about deployment.
- Record through `memory_entity_observe` that this project runs on Postgres.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
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
