# dreamd [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/botzrDev/dreamd  
**GitHub Stars:** 9  
**npm Downloads (last month):** 2846  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/dreamd

## Description
Local-first, cross-harness memory for AI coding agents.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "dreamd": {
    "command": "npx",
    "args": ["-y","dreamd-mcp"]
  }
}
```

## Documentation

## What dreamd does

dreamd provides long-term, project-scoped memory for AI coding agents. It stores episodic events as JSONL and promoted lessons in Markdown under the project’s `.agent/` directory. Because that directory is intended to be committed with the codebase, teams can inspect memory changes in diffs and pull requests, or undo a dream cycle with Git.

The MCP interface exposes two agent-facing tools: `append_node` records an episode, and `search_nodes` searches stored episodes and lessons. Search results include the source harness. The command-line interface adds operations for setup, recall, dreaming, status checks, provenance validation, and forgetting records.

## How it works

Agents append episodes describing what happened, including factors such as pain and importance. A dream cycle groups related episodes by `skill_action` and can promote recurring patterns into `LESSONS.md`. Each lesson cites the events that contributed to it, while a provenance ledger records links between events, lessons, and index entries.

Recall uses lexical BM25 matching combined with salience. Salience considers age decay, pain, importance, and recurrence; vector search is not part of the shipped recall system. A cycle can use an LLM to compose lessons when an API key is available, subject to a per-cycle spend cap. Without a key, dreamd creates a deterministic lesson locally and makes no network call.

Cycle output is staged and committed through a redo write-ahead log, allowing a crash to leave the store unchanged or complete the cycle. The project’s local index, daemon state, and provenance data live in `.agent/.dreamd/` and are excluded from Git.

## Setup and configuration

From a project containing `.git/`, `Cargo.toml`, `package.json`, or `pyproject.toml`, run:

```bash
npx -y dreamd-mcp setup
npx -y dreamd-mcp
```

`setup` initializes the `.agent/` store and writes harness MCP configuration. It is idempotent and can prompt interactively. For scripts, use `--yes` with `--harness claude`, `--harness cursor`, or `--harness both`; `--harness none` and `--no-write-mcp` avoid changing MCP configuration.

The default transport is stdio. Source builds can optionally expose Streamable HTTP at `/mcp` with `dreamd mcp --bind 127.0.0.1:<port>` and the `mcp-http` feature. That endpoint is unauthenticated. A shared `watch` daemon is available when several agents write to the same project.

The npm shim forwards only part of the CLI. Commands such as `recall`, `score`, `status`, `archive`, and `migrate` require the installed `dreamd` binary, which can be built with Cargo.

## Tools and capabilities

- Search episodic and semantic memory with `search_nodes` or `recall`.
- Record agent experiences through `append_node`.
- Preview and generate lessons with `dream --dry` and dream cycles.
- Trace recall results and their salience using `blame` and `recall --explain`.
- Validate provenance with `doctor --provenance` and repair the recall index with `doctor --repair`.
- Remove an event with `forget`, previewing changes with `--dry-run` and writing a receipt with `--proof`.
- Review memory through JSONL, Markdown, `git diff`, and Git history.

## Limitations and notes

dreamd makes memory traceable and removable, but it does not detect or block poisoned writes or filter injected lesson content. The caller asserts `source_harness`; dreamd does not verify it. Provenance ledgers and forget receipts are unsigned, and trust labels are not available.

Stop the `watch` daemon before using `forget`; the command refuses to run while the daemon is active. After forgetting an event, provenance checks report the old ledger edges as orphans because the ledger is append-only. The HTTP transport is unauthenticated, and recall is lexical rather than vector-based.

_Full upstream README: https://allmcps.com/mcp/dreamd/readme_

