# Reverie

Keeps an agent's memory in a Neo4j graph: typed entities, links between them, and hybrid search over names, keywords and meaning.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 69
- Author: knowall-ai
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/knowall-ai/mcp-reverie
- Updated: 2026-10-17
- HTML: https://affpapa.org/en/nevibecode/mcp/reverie

## What it does

Reverie stores what an agent knows as a graph. People, organisations, projects, places and decisions are nodes, and the links between them carry types. Asking which contacts at a given organisation were involved with a project becomes a walk through the graph instead of a similarity lookup. The server speaks MCP, so Claude, Codex, Cursor, Copilot, Windsurf, Cline and Zed can all point at the same graph.

\`search_memories` has five modes: `hybrid` by default, plus `keyword`, `semantic`, `fuzzy` and `exact`. Fuzzy matching copes with names typed as they sound, so a search for “Ben Wicks” can surface “Benjamin Weeks”. Strictness is tuned with `similarity_threshold` (default `0.4`, values outside `0`–`1` are rejected) and `fuzzy_threshold` (default `0.85`).

A `dream` tool does maintenance: it merges duplicates, normalises labels, recomputes embeddings and marks nodes that have turned into property dumps. Nothing gets written without a reachable Neo4j instance, so `NEO4J_URI`, `NEO4J_USERNAME` and `NEO4J_PASSWORD` are needed before the first run. Embeddings are computed locally by default, no API key involved; OpenAI, Azure OpenAI, Ollama or Voyage are picked through `REVERIE_EMBEDDINGS`. Your data stays on your own machine unless you choose a remote embedding provider.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `NEO4J_URI`, `NEO4J_USERNAME`, `NEO4J_PASSWORD`, `NEO4J_DATABASE`, `REVERIE_EMBEDDINGS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env NEO4J_URI=<NEO4J_URI> --env NEO4J_USERNAME=<NEO4J_USERNAME> --env NEO4J_PASSWORD=<NEO4J_PASSWORD> --env NEO4J_DATABASE=<NEO4J_DATABASE> --env REVERIE_EMBEDDINGS=<REVERIE_EMBEDDINGS> --transport stdio reverie -- npx -y @knowall-ai/reverie
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add reverie --env NEO4J_URI=<NEO4J_URI> --env NEO4J_USERNAME=<NEO4J_USERNAME> --env NEO4J_PASSWORD=<NEO4J_PASSWORD> --env NEO4J_DATABASE=<NEO4J_DATABASE> --env REVERIE_EMBEDDINGS=<REVERIE_EMBEDDINGS> -- npx -y @knowall-ai/reverie
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "reverie": {
            "command": "npx",
            "args": [
                "-y",
                "@knowall-ai/reverie"
            ],
            "env": {
                "NEO4J_URI": "<NEO4J_URI>",
                "NEO4J_USERNAME": "<NEO4J_USERNAME>",
                "NEO4J_PASSWORD": "<NEO4J_PASSWORD>",
                "NEO4J_DATABASE": "<NEO4J_DATABASE>",
                "REVERIE_EMBEDDINGS": "<REVERIE_EMBEDDINGS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "reverie": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@knowall-ai/reverie"
            ],
            "env": {
                "NEO4J_URI": "<NEO4J_URI>",
                "NEO4J_USERNAME": "<NEO4J_USERNAME>",
                "NEO4J_PASSWORD": "<NEO4J_PASSWORD>",
                "NEO4J_DATABASE": "<NEO4J_DATABASE>",
                "REVERIE_EMBEDDINGS": "<REVERIE_EMBEDDINGS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e NEO4J_URI=<NEO4J_URI> -e NEO4J_USERNAME=<NEO4J_USERNAME> -e NEO4J_PASSWORD=<NEO4J_PASSWORD> -e NEO4J_DATABASE=<NEO4J_DATABASE> -e REVERIE_EMBEDDINGS=<REVERIE_EMBEDDINGS> reverie npx -y @knowall-ai/reverie
```
Replace <…> with your own values

## When to use it
- find a contact whose name was stored differently
- trace how a project connects to people and decisions
- clean up duplicate nodes and stray labels
- run an exact lookup before writing a new memory
- keep semantic search usable when embeddings fail

## Example prompts
- Search memory for everyone tied to the Winnie project and show me how they connect
- Run an `exact` check for Ben Weeks before you create a new memory
- Run `dream` and list the nodes that have become property dumps

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
