# HBarefoot/engram [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/HBarefoot/engram  
**GitHub Stars:** 9  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hbarefoot-engram

## Description
Local-first persistent memory for AI agents. SQLite + local embeddings (all-MiniLM-L6-v2), hybrid semantic + FTS5 recall, secret detection, and contradiction handling. 6 MCP tools (remember, recall, forget, feedback, context, status) over stdio. Zero cloud, no API keys, fully offline. Works with Claude Desktop/Code, Cursor, and Windsurf. npm install -g @hbarefoot/engram

## Tools
Capabilities this server exposes over MCP:

- **engram_remember** — Store a memory with category, entity, confidence, namespace, tags. Auto-runs secret detection.
- **engram_recall** — Hybrid semantic + FTS5 search. Supports `category`, `namespace`, `threshold`, and `time_filter`.
- **engram_forget** — Delete a specific memory by ID.
- **engram_feedback** — Vote a memory helpful/unhelpful. Drives the feedback loop above.
- **engram_context** — Pre-formatted context block (`markdown` / `xml` / `json` / `plain`) with a token budget for system-prompt injection.
- **engram_status** — Health check: memory count, model status, configuration.

## 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/HBarefoot/engram), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install -g @hbarefoot/engram
```

2. Start the server:

```sh
engram start
```

3. Start the server:

```sh
engram start             # MCP + REST + Dashboard on localhost:3838
```

4. Start the server:

```sh
engram start --mcp-only  # MCP server only, stdio mode (for agent integration)
```

5. Add to Claude Code:

```sh
claude mcp add engram -- engram start --mcp-only
```

6. Start the server:

```sh
engram start                       # Start MCP + REST + dashboard
```

## Documentation

## What HBarefoot/engram does

HBarefoot/engram provides a local memory layer for AI agents using the Model Context Protocol. It persists memories in SQLite and keeps the memory database on the local machine. The default design does not require a hosted database, cloud account, API key, or separate service to deploy.

The server is intended for agents that need to remember facts across interactions. Memories can include a category, entity, confidence value, namespace, and tags. Writes are checked for secrets, including API keys, private keys, connection strings, and JWTs, before the data is stored.

## How it works

The package uses the all-MiniLM-L6-v2 embedding model locally and combines semantic similarity with SQLite FTS5 text search when recalling memories. The embedding model is fetched once and cached locally at `~/.engram/models`. The default path is offline and makes no network calls after the required local assets are available.

Feedback can mark a memory helpful or unhelpful. That feedback supports the server's recall feedback loop. When an agent needs prompt-ready information rather than individual search results, the context tool produces a formatted block in Markdown, XML, JSON, or plain text and accepts a token budget.

## Setup and configuration

Install the npm package globally and start the MCP process:

```bash
npm install -g @hbarefoot/engram
engram start --mcp-only
```

The `--mcp-only` option starts the stdio MCP server for agent integrations. The package requires Node.js 20 or newer according to the repository metadata.

Claude Code can register the server with:

```bash
claude mcp add engram -- engram start --mcp-only
```

Claude Desktop, Cursor, Windsurf, and Cline are listed as supported MCP clients.

## Tools and capabilities

HBarefoot/engram exposes six MCP tools:

- `engram_remember` stores a memory and applies automatic secret detection.
- `engram_recall` searches with semantic embeddings and FTS5, with filters for category, namespace, threshold, and time.
- `engram_forget` removes a memory by its ID.
- `engram_feedback` records whether a memory was helpful or unhelpful.
- `engram_context` returns prompt-ready context in Markdown, XML, JSON, or plain text within a token budget.
- `engram_status` reports the memory count, embedding-model status, and configuration.

## Limitations and notes

HBarefoot/engram is designed for local, single-machine use rather than a cloud-managed memory service. Its default operation depends on local SQLite storage and a bundled embedding model, so the model still occupies local disk space. Recall performance and cold-start measurements in the README are hardware-dependent and are not accuracy guarantees.

Optional local LLM extraction is described in the repository, but it is off by default and is not required for the six MCP tools.

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

