# Local Memory

> Local Memory is an open-source MCP server for knowledge and memory. Local-first persistent memory for Claude, Cursor and Codex, stored in one SQLite file. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, macOS, Windows, Linux
- **Repository:** https://github.com/studiomeyer-io/local-memory-mcp
- **MCP Registry name:** io.github.studiomeyer-io/local-memory-mcp
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-18

## About

The pitch is simple: your assistant stops forgetting between chats, and nothing leaves your machine. Everything lives in a single SQLite file whose path you can change with MEMORY_DB_PATH, with a knowledge graph of entities and observations alongside learnings and decisions.

Search is hybrid. FTS5 keyword ranking is fused with vector similarity using reciprocal rank fusion, and the embeddings come from a multilingual-e5-small model that runs on CPU through Transformers.js and is cached at roughly 30 MB. If the vector extension cannot load, or you set MEMORY_EMBED_DISABLED, it drops to keyword-only search. A duplicate gatekeeper prevents storing the same fact twice.

Version 2.1 added time-aware features: an asOf query returns what was known on a given date, and facts can be superseded instead of overwritten. The README is explicit that this is valid-time only, not full bi-temporal. It reports 25 tools and distinguishes itself from an unrelated project with a similar name by its scoped npm name @studiomeyer/local-memory-mcp.

## Features

- **Single-file storage:** All memory sits in one local SQLite database; no cloud or API keys are involved.
- **Hybrid retrieval:** Combines FTS5 BM25 keyword ranking with local vector similarity via reciprocal rank fusion.
- **Knowledge graph:** Records entities and observations about people, projects and tools.
- **As-of queries:** Opens an entity as it stood on a chosen date using validity windows.
- **Duplicate detection:** Blocks storing the same information twice.
- **Portable export:** Memory can be exported and imported as JSON.
- **Multilingual embeddings:** The default model covers more than 100 languages and runs on CPU.

## Good for

- Carry project decisions across Claude Code sessions
- Keep notes about people and projects in a private local graph
- Search past learnings in a different language than they were written
- Restore what an assistant knew on a past date
- Share one memory store between Claude, Cursor and Codex

## Install

### Claude Code (Terminal)

```sh
claude mcp add local-memory-mcp -- npx -y @studiomeyer/local-memory-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "local-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@studiomeyer/local-memory-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "local-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@studiomeyer/local-memory-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "local-memory-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@studiomeyer/local-memory-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "local-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@studiomeyer/local-memory-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "local-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@studiomeyer/local-memory-mcp"
      ]
    }
  }
}
```

## Tools

- `memory_session_start`: Loads context from earlier sessions at the start of a conversation.
- `memory_session_end`: Closes out the session when the conversation is done.
- `memory_learn`: Stores patterns, insights and mistakes.
- `memory_entity_observe`: Records facts about people, projects and tools in the knowledge graph.
- `memory_search`: Hybrid search across stored memory with hybrid, fts or vector modes.
- `memory_entity_open`: Opens an entity, optionally as of a given date.

## FAQ

### Does it need a cloud account or API key?

No. It runs locally and the README states no cloud and no API keys.

### What if the embedding model cannot download?

Set MEMORY_EMBED_DISABLED to force FTS5-only search, which suits restricted networks.

### How do I make a session start automatically?

Add a line to CLAUDE.md telling the assistant to call memory_session_start, or use a SessionStart hook.

### Which clients are documented?

Claude Code, Claude Desktop, Cursor, VS Code and Codex.

### Is Local Memory free?

Yes. Local Memory is open source, so you can use and self-host it for free.

### How do I add Local Memory to Claude Code?

Run this command in your terminal: claude mcp add local-memory-mcp -- npx -y @studiomeyer/local-memory-mcp

### What are the best alternatives to Local Memory?

The closest alternatives to Local Memory are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and NeuroStack.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [NeuroStack](https://ai-powered.com/mcp/neurostack): NeuroStack is a freemium MCP server for knowledge and memory.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [Digitalnz](https://ai-powered.com/mcp/digitalnz): Digitalnz is a freemium MCP server for knowledge and memory.
- [Notion_connect](https://ai-powered.com/mcp/notion-connect): Notion_connect is a freemium MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/local-memory
