engram · hbarefoot — Claude Code MCP server: what it does, how to install
Adds local persistent memory to AI agents using SQLite and on-device embeddings without external APIs. Useful when keeping agent context between sessions entirely on your machine.
claude mcp add engram -- npx -y @hbarefoot/engramWhat engram does
The server attaches persistent storage to your agent process without requiring external cloud accounts or containers. It stores records inside a local SQLite database and handles semantic lookup through a lightweight all-MiniLM-L6-v2 embedding model. That model takes roughly 23 MB and caches locally under ~/.engram/models. The runtime requires Node.js 20 or higher to operate.
Through MCP, the server exposes 6 distinct tools across 5 functional categories. Every write passes through automated secret detection. Private keys, API tokens, database connection strings, and JWT values are blocked before they reach the database file. If you run Ollama locally, you can also enable an optional model layer for sharper entity extraction.
What it helps with
- keep project context intact across separate agent sessions
- retrieve stored knowledge by meaning without cloud requests
- prevent API tokens and database secrets from entering memory
- reconcile conflicting facts through side-by-side review
Example prompts for the agent
- Remember that we use Vitest instead of Jest for test suites in this project.
- Recall the naming conventions we established for Git branches.
- Check your memory for our staging deployment guidelines.
How to install engram
Platform CLI
claude mcp add engram -- npx -y @hbarefoot/engramPlatform CLI
codex mcp add hbarefoot-engram -- npx -y @hbarefoot/engramConfig file
{
"mcpServers": {
"hbarefoot-engram": {
"command": "npx",
"args": [
"-y",
"@hbarefoot/engram"
]
}
}
}Config file
{
"servers": {
"hbarefoot-engram": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@hbarefoot/engram"
]
}
}
}Platform CLI
gemini mcp add hbarefoot-engram npx -y @hbarefoot/engramStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about engram
How do I install engram in Claude Code?
Run claude mcp add engram -- npx -y @hbarefoot/engram in your terminal. This registers the server using npx without manual configuration edits.
What does engram do?
It provides long-term agent memory on your local disk. Facts are indexed in SQLite alongside local vector embeddings, keeping searches and stored information completely private.
What are the system requirements for engram?
You need Node.js version 20 or later. On the first run, the tool fetches the ~23 MB all-MiniLM-L6-v2 embedding model and stores it inside ~/.engram/models.
Similar MCP servers
All MCP servers for Agent setup: memory, context, orchestration →engram by other authors comes first.