# Engram [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/devinmlowe/engram  
**GitHub Stars:** 1  
**npm Downloads (last month):** 243  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/engram-4

## Description
Cognitive memory for coding agents: hybrid recall, remember/forget, knowledge graph, nightly dreams.

## Tools
Capabilities this server exposes over MCP:

- **recall** — Retrieve relevant memories from past Claude Code conversations and extracted knowledge. Uses hybrid semantic + keyword search with token-budgeted output across episodic and semantic memory stores. Search BEFORE every task to recover decisions, solutions, and context. Time-scope with after/before (YYYY-MM-DD) or a natural-language dateHint ("last week", "in March", "this day last year", "on this day"); dateBasis picks whether dates mean when a memory was filed or when the events it describes happened. The applied window is echoed in <date_filter>. Retrieval records access bookkeeping on the returned memories (access_count, last_accessed, stability); pass reinforce: false to opt out.
- **remember** — Store a fact, preference, decision, or other knowledge as a semantic memory. Use this to explicitly record important information that should persist across conversations. Automatically deduplicates against existing memories.
- **remember_batch** — Store multiple facts, preferences, decisions, or other knowledge items as semantic memories in a single call. Supports up to 50 items per batch. Automatically deduplicates against existing memories and within the batch. Use for bulk ingestion from RLM agents or dream pipeline. Optionally link each memory to existing graph entities via relates_to_entities.
- **show** — Read full conversations to extract detailed context after finding relevant results with recall. Use startLine/endLine pagination for large conversations.
- **explore** — Explore connections in the knowledge graph starting from an entity. Shows what a concept, tool, project, or technology is connected to. Use after recall to understand how things relate to each other.
- **reflect** — View emergent patterns and structure in the knowledge graph. Shows topic communities with meaningful names, bridge entities connecting different domains, temporal patterns, and graph health. Use after working on a topic to understand how it connects to other knowledge domains.
- **recall_session** — Create or continue an iterative search session for multi-step memory exploration. Omit session_id to start a new session; provide session_id to refine with a new query. Sessions track accumulated results and remaining token budget. Use recall_drill to expand individual results. Retrieval records access bookkeeping on the returned memories (access_count, last_accessed, stability); pass reinforce: false to opt out.
- **recall_drill** — Drill into a specific result from a recall session to get expanded context. For episodic results: shows surrounding conversation exchanges. For semantic results: shows source conversation segments. For graph results: shows entity with full relationship neighborhood. Retrieval records access bookkeeping on the returned memories (access_count, last_accessed, stability); pass reinforce: false to opt out.
- **explore_selective** — Explore the knowledge graph selectively by expanding only branches relevant to specified criteria. Unlike explore (fixed-depth BFS), this uses embedding similarity to prune irrelevant neighbors and recursively follows only relevant paths. Use when you want to find connections related to a specific topic or question.
- **fetch_snippets** — Fetch multiple line ranges from a single file in one call. Ranges are merged when overlapping, padded with optional context lines, and joined with gap markers. More efficient than multiple show calls for targeted code reading.
- **scan_file** — Scan a file server-side with regex patterns and return structured matches with surrounding context. The file is read on the server and never loaded into conversation context. Supports multiple patterns, context windows, overlap deduplication, and function context detection.
- **index_file_structure** — Parse a source file to extract function, class, and module definitions, then index them as entities in the knowledge graph with 'contains' relationships. Enables RLM to discover file contents without reading the full file.
- **commitments** — List tracked commitments — first-person promises, intentions and follow-ups owed by others, extracted nightly from conversations ("mention once, never dropped"). Default: pending items, overdue first, then by due date, then newest. Use include_due_within_days to surface only what is due soon or overdue.
- **commitments_update** — Resolve a tracked commitment once the user confirms it is handled: mark it done, dropped, or superseded by another commitment. Accepts the full id or a unique prefix (6+ characters).
- **ingest_turn** — Record one user/assistant turn of an external agent conversation (e.g. a Hermes profile) in engram's episodic layer so it becomes searchable and feeds the nightly dream extraction. Idempotent: re-sending the same session_id + turn_index updates the turn in place. The conversation carries the given tenant scope, and every memory later extracted from it inherits that scope. An optional author {id, name, is_bot} is stored on the turn.
- **forget** — Remove a memory the user says is wrong or stale. Pass the memory_id from a recall result (<semantic id="…">) to forget it in one call. Pass query instead to search for candidates: the tool returns matching memories with their ids and forgets nothing unless confirm is true AND exactly one memory matches (a single result, or a single result whose content equals the query). The memory is soft-deleted (kept for ENGRAM_FORGET_RETENTION_DAYS, then purged by the dream pipeline), drops out of every recall path immediately, is logged in the change log with this client's name, and will not be re-extracted from the same conversation. hard: true deletes it outright. Only memories within read_scopes can be forgotten; scope "global" lifts that only when the server's own env (ENGRAM_SCOPE / ENGRAM_READ_SCOPES) is unrestricted.

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

```json
"mcpServers": {
  "engram": {
    "command": "npx",
    "args": ["-y","@devinmlowe/engram","mcp"]
  }
}
```

## Documentation

## What the Engram MCP server does

The Engram MCP server provides local memory for coding agents. It ingests Claude Code conversation history, turns raw exchanges into structured memories, and supports later recall across sessions. Its model separates episodic memories from semantic knowledge created during consolidation, then uses graph analysis to surface relationships between items.

Engram stores its data in a local SQLite database, with the default location at `~/.local/share/engram`. Search and memory operations can work without an LLM provider. LLM access is needed for extraction and dream consolidation, using one of the providers supported by the installed configuration.

A browser-based visualizer is also included. The default visualizer listens on loopback port 3001 and presents the stored knowledge graph.

## How it works

Conversation indexing is optional and is supplied by `engram sync`, which reads Claude Code history from `~/.claude/projects`. The resulting material can be searched with hybrid recall rather than treated only as whole-session documents. Memories can also be added, removed, or inspected through the CLI and MCP interface.

Dream processing performs background consolidation of episodic material into semantic knowledge. The setup flow can install a nightly timer for this work. Extraction and consolidation require a reachable LLM tier; the setup and diagnostic commands report which tier responded or why none was available.

The MCP interface can run directly over stdio or through the local HTTP daemon at `http://127.0.0.1:9907/mcp`. Host registration prefers HTTP when the daemon responds and otherwise configures a stdio bridge. An optional daemon token is referenced through an environment variable rather than written into host configuration.

## Setup and configuration

Install the package globally with npm, then run `engram setup`. The setup command can initialize the database, optionally sync conversations, register available hosts, install the MCP daemon, install the nightly dream timer, install the web visualizer, and perform an extraction check. Individual steps are available through commands such as `engram init`, `engram sync`, and `engram mcp install claude`.

Node.js 22 or newer is required. The first initialization or search downloads model weights, normally into `~/.local/share/engram/models`; `ENGRAM_MODEL_CACHE_DIR` or `HF_HOME` can change the cache location. Set `ENGRAM_RERANK_ENABLED=false` to skip the reranker model. The `engram doctor` and `engram doctor --fix` commands check or repair the installation, environment file, model cache, daemon, host registration, and extraction setup.

Claude Code can install Engram as a plugin from its marketplace. The repository also documents direct registration for Claude Code, Codex, Cursor, and Hermes, with project-level configuration options for supported hosts.

## Tools and capabilities

The Engram MCP server exposes 16 tools when installed as the Claude Code plugin. The available capabilities include:

- Recalling relevant memories through hybrid search.
- Remembering new information and forgetting stored items.
- Exploring the knowledge graph.
- Supporting reflection and dream-oriented consolidation workflows.
- Synchronizing Claude Code conversation history.
- Viewing and managing memories through CLI commands such as `engram memories list`.

The plugin also adds `/engram:recall`, `/engram:remember`, `/engram:explore-graph`, `/engram:reflect`, and `/engram:engram-connect` commands in Claude Code.

## Limitations and notes

Engram is local-first, but model downloads can require several hundred megabytes of disk space. The first npm or plugin launch may also be slow while the package and native modules are installed. Without an LLM provider, search, remembering, and the visualizer remain available, but extraction and dream consolidation cannot run.

The supplied sync path targets Claude Code history. Scheduled services depend on the host operating system and are installed through platform-specific mechanisms. The web visualizer and MCP daemon default to loopback addresses, and host configuration changes are backed up when the CLI edits them.

_Full upstream README: https://allmcps.com/mcp/engram-4/readme_

