# engram [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/NickCirv/engram  
**GitHub Stars:** 144  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/engram

## Description
Cached context spine for AI coding agents. Any MCP server as a 10-line plugin. 89.1% saved.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/NickCirv/engram), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/NickCirv/engram.git
```

2. Install:

```sh
cd engram
```

3. Run:

```sh
git checkout 9fa2a4b74ca8e66560d74d1255c16c43157d32bd
```

4. Install:

```sh
npm install --ignore-scripts
```

5. Install:

```sh
npm run build
```

## Documentation

## What engram does

The engram MCP server indexes a codebase into a project-local structural graph. Its source miners collect code entities and references, Git co-change relationships, and selected information from mistakes or sessions. Queries can then return focused context instead of requiring an agent to load complete files.

The graph is intended for code exploration and context maintenance. It can help an agent locate relevant entities, inspect callers and callees, understand potential impact, and reuse recorded project knowledge across sessions. The repository also includes commands for generating agent instruction documents and for reviewing hook activity.

## How it works

Project data is persisted in a local SQLite database through `sql.js`. Graph queries traverse that stored structure and render bounded results with an estimated token count. Available exploration paths include text-oriented queries, file or path inspection, relationship traversal, impact analysis, and project statistics.

The provider resolver combines built-in sources with optional plugins and MCP providers. Those optional providers may start external processes or access networks, so the complete installation should not be treated as guaranteed offline. The HTTP service listens on `127.0.0.1`, validates Host and Origin values, and protects routes with a bearer token or dashboard cookie.

## Setup and configuration

The inspected package is version 4.5.0 and requires Node.js 20 or newer. A source-build setup is available from the repository:

1. Clone the repository and install dependencies with `npm install --ignore-scripts`.
2. Build it with `npm run build`.
3. Initialize a target project with the CLI, optionally using `--no-hook` to avoid installing the default Sentinel hook.
4. Run a query with the project path and a token budget, then inspect statistics.

Initialization writes an `.engram/` graph inside the target project. The MCP executable is provided as `engram-serve`; the repository's integration documentation contains local MCP configuration details. `ENGRAM_NO_UPDATE_CHECK=1` disables the CLI's npm update-check path. HTTP authentication can use `ENGRAM_API_TOKEN` or a local token file.

## Tools and capabilities

The engram MCP server is useful alongside its CLI and related local services. Documented entry points include:

- `query`, `path`, `gods`, `callers`, `callees`, `impact`, and `stats` for structural exploration.
- `init`, `watch`, `reindex`, `learn`, and `mistakes` for maintaining indexed context.
- `gen`, `gen-mdc`, `gen-aider`, `gen-windsurfrules`, and `gen-ccs` for producing agent documents.
- `server`, `ui`, and `engram-serve` for serving context and exposing MCP access.
- `measure`, `bench`, and `cost` for reviewing measurements.
- Hook inspection and maintenance commands such as `install-hook --dry-run`, `hook-preview`, `hook-stats`, `hook-disable`, and `hook-enable`.

These commands can alter local state, including generated files, hooks, caches, databases, and plugins. Consult command help before write operations.

## Limitations and notes

Graph retrieval is an aid to investigation, not proof of program behavior. Read the source returned by a query before making a behavioral claim. Token reduction figures and structural packet size do not establish equivalent answer quality or lower provider billing; benchmark results should be reproduced on representative workloads.

The core graph is local, but optional update checks, configured providers, plugins, and Context7-related integrations may involve network access or external processes. The project is licensed under Apache-2.0.

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

