# Memory Vault

> Memory Vault is an open-source MCP server for knowledge and memory. Self-hosted AI memory on Postgres and pgvector, with hybrid search and a knowledge graph. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, API, CLI
- **Website:** https://mihaibuilds.com
- **Repository:** https://github.com/mihaibuilds/memory-vault
- **MCP Registry name:** io.github.MihaiBuilds/memory-vault
- **Categories:** knowledge and memory, security
- **Listing updated:** 2026-11-16

## About

Memory Vault is a memory database you run yourself, aimed at ending the habit of re-explaining your project to an assistant in every new chat. It stores decisions, notes, conversations and project context in one Postgres database with pgvector, and searches them with a blend of semantic similarity and keyword matching merged by reciprocal rank fusion, so exact terms and paraphrases both turn up.

The MCP server gives Claude four tools, recall, remember, forget and status. Beyond that, the project includes a dashboard, a bearer-protected REST API documented at /docs, and a knowledge graph built with spaCy entity recognition rather than an LLM, so there is no per-token cost. A local-LLM chat through LM Studio shows the retrieved chunks behind each answer.

It is MIT licensed, ships as a single Docker image with docker compose, and reached v1.0 on 2026-05-07. The MCP server runs from a container image and needs Postgres connection settings.

## Features

- **Hybrid search:** Combines pgvector semantic and keyword search with rank fusion.
- **Four MCP tools:** recall, remember, forget and status from Claude.
- **Knowledge graph:** Extracts entities and relations with spaCy, no LLM.
- **Sourced local chat:** LM Studio answers show their source chunks.
- **REST API:** Bearer-auth API with OpenAPI docs.
- **One-command Docker:** Bundles Postgres, the app and the language model.

## Good for

- Let Claude remember project decisions across sessions
- Search your own notes by meaning or exact term
- Build an AI tool on a self-hosted memory API
- Browse how people and topics connect in your notes

## Install

### Claude Code (Terminal)

```sh
claude mcp add memory-vault --env DB_HOST='<DB_HOST>' --env DB_PORT='<DB_PORT>' --env DB_NAME='<DB_NAME>' --env DB_USER='<DB_USER>' --env DB_PASSWORD='<DB_PASSWORD>' -- docker run -i --rm -e DB_HOST -e DB_PORT -e DB_NAME -e DB_USER -e DB_PASSWORD ghcr.io/mihaibuilds/memory-vault-mcp:1.7.0
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "memory-vault": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DB_HOST",
        "-e",
        "DB_PORT",
        "-e",
        "DB_NAME",
        "-e",
        "DB_USER",
        "-e",
        "DB_PASSWORD",
        "ghcr.io/mihaibuilds/memory-vault-mcp:1.7.0"
      ],
      "env": {
        "DB_HOST": "<DB_HOST>",
        "DB_PORT": "<DB_PORT>",
        "DB_NAME": "<DB_NAME>",
        "DB_USER": "<DB_USER>",
        "DB_PASSWORD": "<DB_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "memory-vault": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DB_HOST",
        "-e",
        "DB_PORT",
        "-e",
        "DB_NAME",
        "-e",
        "DB_USER",
        "-e",
        "DB_PASSWORD",
        "ghcr.io/mihaibuilds/memory-vault-mcp:1.7.0"
      ],
      "env": {
        "DB_HOST": "<DB_HOST>",
        "DB_PORT": "<DB_PORT>",
        "DB_NAME": "<DB_NAME>",
        "DB_USER": "<DB_USER>",
        "DB_PASSWORD": "<DB_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "memory-vault": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DB_HOST",
        "-e",
        "DB_PORT",
        "-e",
        "DB_NAME",
        "-e",
        "DB_USER",
        "-e",
        "DB_PASSWORD",
        "ghcr.io/mihaibuilds/memory-vault-mcp:1.7.0"
      ],
      "env": {
        "DB_HOST": "<DB_HOST>",
        "DB_PORT": "<DB_PORT>",
        "DB_NAME": "<DB_NAME>",
        "DB_USER": "<DB_USER>",
        "DB_PASSWORD": "<DB_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "memory-vault": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DB_HOST",
        "-e",
        "DB_PORT",
        "-e",
        "DB_NAME",
        "-e",
        "DB_USER",
        "-e",
        "DB_PASSWORD",
        "ghcr.io/mihaibuilds/memory-vault-mcp:1.7.0"
      ],
      "env": {
        "DB_HOST": "<DB_HOST>",
        "DB_PORT": "<DB_PORT>",
        "DB_NAME": "<DB_NAME>",
        "DB_USER": "<DB_USER>",
        "DB_PASSWORD": "<DB_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "memory-vault": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DB_HOST",
        "-e",
        "DB_PORT",
        "-e",
        "DB_NAME",
        "-e",
        "DB_USER",
        "-e",
        "DB_PASSWORD",
        "ghcr.io/mihaibuilds/memory-vault-mcp:1.7.0"
      ],
      "env": {
        "DB_HOST": "<DB_HOST>",
        "DB_PORT": "<DB_PORT>",
        "DB_NAME": "<DB_NAME>",
        "DB_USER": "<DB_USER>",
        "DB_PASSWORD": "<DB_PASSWORD>"
      }
    }
  }
}
```

## Tools

- `recall`: Searches stored memories.
- `remember`: Stores a new memory.
- `forget`: Removes a memory.
- `status`: Reports the vault's status.

## FAQ

### Where does the data live?

In your own Postgres database, self-hosted.

### What licence is it?

MIT.

### How do I run it?

docker compose up -d, then open localhost:8000.

### Does the graph cost per token?

No, entity extraction uses spaCy rather than an LLM.

### Is Memory Vault free?

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

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

Run this command in your terminal: claude mcp add memory-vault --env DB_HOST='<DB_HOST>' --env DB_PORT='<DB_PORT>' --env DB_NAME='<DB_NAME>' --env DB_USER='<DB_USER>' --env DB_PASSWORD='<DB_PASSWORD>' -- docker run -i --rm -e DB_HOST -e DB_PORT -e DB_NAME -e DB_USER -e DB_PASSWORD ghcr.io/mihaibuilds/memory-vault-mcp:1.7.0

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

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

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [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.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.

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