# cogvault

> cogvault is an open-source MCP server for knowledge and memory. Local, offline memory for AI agents built on plain Markdown with hybrid search. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, macOS, Linux, Windows
- **Repository:** https://github.com/nbibikov/cogvault
- **MCP Registry name:** io.github.NBibikov/cogvault
- **Categories:** knowledge and memory
- **Listing updated:** 2026-11-16

## About

Your Markdown files stay the source of truth. Cogvault builds a SQLite index over them that can be deleted and rebuilt, so memory can be opened, edited and diffed in git. No LLM is involved in storing or recalling: retrieval fuses vector and keyword (BM25) ranking, with optional temporal decay and diversity re-ranking, and embeddings run on-device with FastEmbed.

Each agent gets an isolated namespace through its own directory, called a tenant, and a single process shares loaded embedding models across tenants. Existing Markdown memory, including Claude Code's auto-memory, can be indexed in place with no import. Commands such as eval and analyze score recall against your own judged queries and list what agents tried to recall but could not find.

The README's benchmark on 65 real queries from six agent tenants reports hit@5 of 0.91 with its best embedding setup, and a cross-encoder reranker lifting hit@1 from 0.60 to 0.80 at a cost of about 2 GB RAM and 1 to 2 seconds per recall. The README flags the sample as small.

## Features

- **Markdown source of truth:** Files stay editable; the index is a rebuildable cache.
- **Hybrid retrieval:** Vector plus BM25 fused with reciprocal rank fusion.
- **Multi-tenant isolation:** One directory per agent, one process.
- **Fully offline:** On-device embeddings; nothing leaves the machine.
- **Recall evaluation:** eval and analyze measure real recall quality.
- **Optional reranker:** Cross-encoder reranking in the shared daemon.
- **Claude Code plugin:** Bundles the server and a recall/record skill.

## Good for

- Give a coding agent persistent decisions and bug fix notes
- Index existing Claude Code auto-memory without importing
- Keep separate memory for each agent in a fleet
- Check which queries an agent failed to recall

## Install

### Claude Code (Terminal)

```sh
claude mcp add cogvault -- uvx cogvault
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "cogvault": {
      "command": "uvx",
      "args": [
        "cogvault"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "cogvault": {
      "command": "uvx",
      "args": [
        "cogvault"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "cogvault": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "cogvault"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "cogvault": {
      "command": "uvx",
      "args": [
        "cogvault"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "cogvault": {
      "command": "uvx",
      "args": [
        "cogvault"
      ]
    }
  }
}
```

## FAQ

### Does it use an LLM?

No. Ingest and retrieval are deterministic; the agent itself is the LLM.

### Does data leave my machine?

No. Embeddings run locally with FastEmbed.

### How do I add it to Claude Code?

Install the plugin, or run claude mcp add cogvault -- uvx cogvault mcp --tenant <dir>.

### Which languages does it handle?

The default embedding model is multilingual, and the benchmark mixes Ukrainian and English queries.

### Is cogvault free?

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

### How do I add cogvault to Claude Code?

Run this command in your terminal: claude mcp add cogvault -- uvx cogvault

### What are the best alternatives to cogvault?

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

## 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.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [MedXpert 图书馆连接器（通用版）](https://ai-powered.com/mcp/medxpert): MedXpert 图书馆连接器（通用版） is an open-source MCP server for knowledge and memory.
- [Context Nest](https://ai-powered.com/mcp/context-nest): Context Nest is a freemium MCP server for knowledge and memory.
- [Tulsa Ecosystem Map](https://ai-powered.com/mcp/tulsa-ecosystem-map): Tulsa Ecosystem Map is a free MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/cogvault
