# engram-cc [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/Morous-Dev/engram-context-continuum  
**GitHub Stars:** 2  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/engram-cc

## Description
Universal AI coding assistant memory — session handoff, SLM compression, and semantic retrieval.

## Tools
Capabilities this server exposes over MCP:

- **recall** — Full session context: handoff + working memory
- **search** — FTS5 full-text search over all session events
- **recent** — Most recent N events, filterable by category
- **graph_query** — BFS traversal of the knowledge graph

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

```json
"mcpServers": {
  "engram-cc": {
    "command": "npx",
    "args": ["-y","engram-cc"]
  }
}
```

## Documentation

## What engram-cc does

The engram-cc MCP server adds a persistent memory layer beneath AI coding assistants. It stores session activity per project and makes previously captured context available to later sessions. The stored data covers working preferences and decisions, session events, relationships between files and decisions, and embedding-indexed events.

Project identity is independent of the current folder path. A project uses an `.ecc-id` file when available, otherwise its git root commit hash, and finally a generated UUID. This lets the same history survive folder renames, moves, and git re-clones when the identity can be resolved from the repository.

## How it works

Assistant lifecycle hooks capture activity at several points: user prompts, completed tool calls, context-compaction boundaries, session startup, and session shutdown. Events are written to a project-local SQLite database. At session end, a local synthesis pipeline creates a handoff, updates the knowledge graph, and prepares searchable or embedding-backed memory.

On startup, the system can inject either a recent full handoff or a smaller pointer to the recall tool. Sessions resumed within 30 minutes receive the full working context; colder starts receive a short headline and a reference to stored memory. The local processing tiers range from rule-based extraction to embedding models and local language models. The setup process selects available options, and lower tiers can continue capture when higher tiers are unavailable.

The engram-cc MCP server reads the resulting project memory rather than requiring an external service for its own compaction, handoff, and retrieval support. The repository describes an optional provider tier using Ollama, LM Studio, or Groq, but the core local pipeline is designed to work without external API calls.

## Setup and configuration

Run the setup CLI from the project root with:

```bash
npx engram-cc
```

A different project location can be supplied with `--project-dir <path>`. Setup creates `.engram-cc/`, asks where shared models should live, detects available hardware, and writes assistant-specific snippets under `.engram-cc/assistant-configs/`. It does not modify user-home configuration.

For assistants that install the package directly from npm, use the explicit package and binary form:

```bash
npx --yes --package=@morous-dev/engram-cc -- engramcc-mcp
```

The generated project-local configuration may instead invoke the local server build. Configuration and model-path information are stored in `.engram-cc/config.json`; databases are kept under `.engram-cc/sessions/`.

## Tools and capabilities

The engram-cc MCP server exposes four tools:

- `recall` returns the full session context, including the handoff and working memory.
- `search` performs FTS5 full-text search across recorded session events.
- `recent` returns the latest events and can filter them by category.
- `graph_query` traverses the knowledge graph using breadth-first search.

Claude Code, Gemini CLI, and OpenCode have full lifecycle hook support; Codex uses its supported hooks plus transcript and synthesized compaction handling. Kilo support is described as MCP plus an `ekilo` wrapper flow rather than native lifecycle hooks.

## Limitations and notes

Memory is project-local, and the project state remains under `.engram-cc/` even when Codex reads its session JSONL from `CODEX_HOME` or `~/.codex/sessions/`. Kilo does not currently have verified native lifecycle-hook parity. Codex also lacks a true prompt-submit injection hook, so its setup uses a turn policy to direct the assistant toward MCP memory when earlier context may have been compacted.

The setup-generated Windows hook snippets use `src/hooks/hook-runner.mjs` to pass assistant and project environment variables without relying on fragile `cmd /C` quoting.

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

