← Back to directory
M

Memory Vault

Community
Self-hosted AI memory database with hybrid search, MCP tools, and a knowledge graph.
GitHub source repository ↗
★ 62 Stars Category · Database Popular
56FMRS · C

Memory Vault is a self-hosted, MIT-licensed AI memory layer that bundles PostgreSQL + pgvector hybrid search, MCP-native tools, a knowledge graph, and local LLM chat around the promise that your data never leaves your machine. It is database-backed memory infrastructure rather than a filesystem note tool, aimed at individual developers who are comfortable running Postgres and who want to use memory through MCP, REST, or the dashboard as equal interfaces. Caveats to weigh: v1.0 is single-instance, NER is English-only, the HTTP/SSE transport is off by default and ships without encryption, and team features remain a planned PRO tier; the project is maintained by a single author, so response times are not guaranteed.

Reliability
9/20
Security and permissions
12/20
Maintenance
11/20
Documentation
14/20
Setup experience
10/20
Read the FMRS scoring method →

Memory Vault is a local-first AI memory layer built on self-hosted PostgreSQL 16 + pgvector. Vector embeddings, full-text indexes, and relational data all live in one database, so there is no separate vector store to keep in sync; hybrid search combines vector similarity with PostgreSQL full-text search and merges the ranked lists using Reciprocal Rank Fusion (RRF).

It exposes six MCP tools to Claude (recall, remember, forget, purge_forgotten, move_memory, memory_status) so memories can be read and written during any session. The same memory layer is also reachable through a FastAPI REST API and a React dashboard with six pages (Chat, Search, Browse, Graph, Ingest, Stats); MCP, REST, the CLI, and your own apps are treated as equal first-class clients. The knowledge graph extracts entities with spaCy's en_core_web_sm model and derives related_to edges from co-occurrence, all on CPU with no external LLM or API calls.

The project is MIT licensed and maintained by MihaiBuilds as a single-maintainer project. Embeddings default to all-MiniLM-L6-v2 (384-d, CPU). Local LLM chat supports LM Studio in v1.0 and always shows the exact memory chunks each answer was grounded in. MCP defaults to stdio transport; HTTP/SSE transport must be explicitly enabled with MCP_HTTP_ENABLED=true and always requires a bearer token.

Tools

recall
Search memories with hybrid search (vector + full-text + RRF).
remember
Store a new memory — auto-classified and embedded.
forget
Soft-delete a memory by chunk ID.
purge_forgotten
Permanently delete memories forgotten more than N days ago.
move_memory
Move a memory to another space, rebuilding its graph entries.
memory_status
Database health, chunk counts, embedding model info.

Setup

Option 1 (Docker, recommended): clone the repository, cd into it, and run docker compose up -d. Migrations run automatically on first start; verify with docker compose exec app memory-vault status. The dashboard is at http://localhost:8000.

Option 2 (no Docker): requires Python 3.11+, PostgreSQL 16 with the pgvector extension, and uv (or pip + venv). Run uv sync, then uv run python -m spacy download en_core_web_sm, then cp .env.example .env and fill in your PostgreSQL credentials, then uv run memory-vault migrate and uv run memory-vault status.

Configure your MCP client: complete the no-Docker setup above first so the memory_vault package is installed, then add the server block shown in install_config to your project's .mcp.json in Claude Code (or ~/.claude/.mcp.json), filling in DB_HOST, DB_PORT, DB_NAME, DB_USER, and DB_PASSWORD. For global availability, also add memory-vault to enabledMcpjsonServers in ~/.claude/settings.json. Verify with claude mcp list — it should show connected. For Claude Desktop, add the same block via Settings → Developer → Edit Config and restart.

Docker users: the MCP server runs on the host (not inside Docker) and connects over the exposed port, so set DB_HOST to 127.0.0.1 and make sure port 5432 is exposed in docker-compose.yml. For remote access over HTTP/SSE, set MCP_HTTP_ENABLED=true; the transport mounts at /api/mcp and clients connect to http://<host>:8000/api/mcp/sse with a bearer token created via memory-vault token create. Declare allowed hostnames with MCP_HTTP_ALLOWED_HOSTS (the list replaces the default, which covers localhost and 127.0.0.1 only).

claude_desktop_config.json
{
  "mcpServers": {
    "memory-vault": {
      "command": "/path/to/memory-vault/.venv/bin/python",
      "args": ["-m", "memory_vault.mcp"],
      "env": {
        "DB_HOST": "localhost",
        "DB_PORT": "5432",
        "DB_NAME": "memory_vault",
        "DB_USER": "memory_vault",
        "DB_PASSWORD": "memory_vault"
      }
    }
  }
}

Fit and risk

Best for

  • Individual developers who want memory data fully self-hosted and never sent to the cloud
  • Users already comfortable operating PostgreSQL
  • People who want cross-session memory in Claude Desktop or Claude Code
  • Builders layering memory under their own AI tooling without maintaining a separate vector database (single instance)

Not for

  • Organizations needing multi-user or multi-tenant team collaboration (v1.0 is single-instance; team features are planned PRO)
  • Users who want a zero-ops hosted service
  • Projects requiring multilingual entity extraction (NER is English-only)
  • Anyone unwilling to run and maintain PostgreSQL
  • Deployments expecting transport encryption to come from the server itself (you must add a reverse proxy or tunnel)

Required permissions

  • Read/write access to the PostgreSQL database (DB_USER needs read/write on the memory vault database)
  • The database password (DB_PASSWORD is a secret value)
  • In stdio mode, a local process that reads environment variables and connects to the database
  • When HTTP/SSE is enabled, a listening port plus bearer token validation on every request
  • The dashboard stores its bearer token in browser localStorage

Risks and side effects

  • With stdio, database credentials sit in plaintext in the client config's env block
  • The HTTP/SSE transport has no transport encryption of its own; tokens travel in a header, so put TLS in front of it
  • Publishing the container port on 0.0.0.0 reaches the whole network
  • API_AUTH_ENABLED=false only opens the REST API (the MCP transport still returns 401) and is a local-development convenience only
  • Known knowledge-graph limits: no fuzzy entity matching (PostgreSQL and Postgres stay separate), no re-extraction on edit, and one name can appear as both a Person and a Project entity
  • Single-maintainer project — reviews and responses depend on the maintainer's available time

Troubleshooting

  1. ModuleNotFoundError on startup: the virtual environment isn't installed; re-run uv sync (or pip install -e .) in the repo directory
  2. OSError: [E050] on startup: the spaCy language model isn't installed; re-run python -m spacy download en_core_web_sm
  3. Server shows failed in Claude Code: run claude --debug mcp to see the server's error output
  4. Server connects but tools are unavailable: confirm memory-vault is listed in enabledMcpjsonServers in ~/.claude/settings.json
  5. Connection refused with Docker running: use DB_HOST 127.0.0.1 instead of localhost
  6. Remote client gets 421 Misdirected Request: the hostname it used is not in MCP_HTTP_ALLOWED_HOSTS (the list replaces the default, so keep localhost:* if local clients are still needed)
  7. Dashboard prompts for a token on every reload: the browser is blocking localStorage (private mode or strict cookie settings)
  8. 401 on every dashboard request: the token was revoked or API_AUTH_ENABLED changed; create a fresh token and paste it in
  9. Before filing a bug, run docker compose exec app memory-vault diagnose to build a diagnostic bundle (tokens and passwords are auto-scrubbed, but review it first)
  10. Include the X-Request-ID response header in bug reports so the same request can be found in the structured JSON logs

Use cases

Let Claude remember project decisions, notes, and already-solved problems across sessions
Run hybrid semantic plus keyword retrieval over a large local corpus of notes or documents
Ask your own memory vault questions through a local LM Studio model with sources shown for verification
Integrate persistent memory into your own AI application via the REST API or dashboard
Explore automatically extracted entities and relationships in the knowledge graph on CPU only

Supported clients

Claude DesktopFull support
Claude CodeFull support