# MCP Memory

> MCP Memory is an open-source MCP server for knowledge and memory. Local SQLite memory for AI agents with BM25 search and no external services. It runs locally on your machine and is started by your AI client.

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

## About

MCP Memory keeps an agent's notes in a single SQLite file on your own machine, searched with FTS5 and BM25 ranking. The author's pitch is that agents forget everything between conversations and existing fixes are cloud-based or tied to one client, so this one is deliberately small: plain text, tags and free metadata, grouped into namespaces per project or agent.

Nine tools cover saving, searching, updating, deleting, listing, recent items, stats, and JSONL export and import. Tools carry MCP read-only and destructive hints so clients can auto-approve reads and ask before edits. It runs over stdio or as a local streamable-HTTP server on port 8765, and several clients can share the same database file. The registry also lists a container image.

The README is frank about limits. Search is lexical, so synonyms with no shared words will not match. There is no semantic search, no images or PDFs, no multi-tenancy, no sync between machines, no UI and no authentication, so exposing it to the internet needs a proxy. It positions itself against the official server-memory knowledge graph as a text-memory alternative.

## Features

- **Local SQLite store:** One database file holds every memory, with backup by copying it.
- **BM25 search:** FTS5 ranking with namespace filtering.
- **Namespaces and tags:** Separate memory pools per project, with tags and metadata.
- **Export and import:** Move memories as JSONL between machines.
- **Tool annotations:** Read and destructive hints let clients gate approvals.
- **Two transports:** Use stdio or a local HTTP endpoint.

## Good for

- Let a coding agent remember project decisions across sessions
- Share one memory between Claude Code and Cursor
- Keep separate memory per project with namespaces
- Back up an agent's memory by copying a file

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-memory -- docker run -i --rm ghcr.io/germaniu/mcp-memory:0.6.0
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/germaniu/mcp-memory:0.6.0"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/germaniu/mcp-memory:0.6.0"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "mcp-memory": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/germaniu/mcp-memory:0.6.0"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/germaniu/mcp-memory:0.6.0"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/germaniu/mcp-memory:0.6.0"
      ]
    }
  }
}
```

## Tools

- `memory_save`: Save text with tags and metadata
- `memory_search`: BM25 lexical search with namespace filter
- `memory_update`: Change content, tags or metadata by id
- `memory_delete`: Delete a memory by id
- `memory_list`: List memories by namespace, paginated
- `memory_recent`: Show the latest memories by update time
- `memory_stats`: Counts, namespaces and oldest and newest entries
- `memory_export`: Export memories as JSONL
- `memory_import`: Import a JSONL export, skipping id collisions

## FAQ

### Does it use embeddings?

No. Search is lexical with BM25, so paraphrases without shared words will not match.

### Where is data stored?

In a local SQLite file set by DB_PATH, with no cloud service.

### Does it have authentication?

No. HTTP mode listens on localhost, so use a proxy with auth if you expose it.

### How many tools does it expose?

Nine, from memory_save to memory_import.

### Is MCP Memory free?

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

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

Run this command in your terminal: claude mcp add mcp-memory -- docker run -i --rm ghcr.io/germaniu/mcp-memory:0.6.0

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

The closest alternatives to MCP 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/mcp-memory
