Engrim logo

Engrim

by timgordontg

Local SQLite episodic memory for coding agents, combining BM25 and model2vec retrieval through a stdio MCP server.

Install Engrim

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "timgordontg-engrim": {
      "command": "uvx",
      "args": [
        "engrim"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

uvx engrim

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked Today.

Overview

timgordontg/engrim provides project-scoped episodic memory for coding agents through a local SQLite database and a stdio MCP server. It combines SQLite FTS5 BM25 search with 8MB model2vec CPU embeddings using Reciprocal Rank Fusion, then injects a budget-limited memory pack at agent startup. Lifecycle hooks and MCP capture preserve decisions, facts, feedback, and project state across sessions and supported agent environments. Reach for it when multiple coding agents or cleared sessions need shared local memory without cloud storage or telemetry.

Use cases

  • Preserve architectural decisions across cleared coding-agent sessions
  • Share project constraints between Claude Code, Cursor, and Codex
  • Recall relevant decisions with hybrid lexical and vector search
  • Inject a compact resume context when an agent starts
  • Repair stale agent hook paths with diagnostic tooling

Key features

  • Local SQLite episodic memory
  • FTS5 BM25 and model2vec hybrid retrieval
  • Budget-capped boot context
  • Cross-agent provenance tracking
  • Lifecycle hook and MCP capture
  • Self-healing configuration diagnostics

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

8/8 checks healthy over the last 15d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1d ago via OSV.dev · engrim (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars305Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.

How Engrim works

What timgordontg/engrim MCP server does

Engrim gives coding agents a shared, project-scoped memory store that survives chat resets and model changes. Records are kept in a local SQLite database at ~/.engrim/memory.db, allowing environments such as Claude Code, Cursor, Codex CLI, Google Antigravity, GitHub Copilot CLI, OpenCode, and Windsurf to work from the same accumulated context.

The memory model is episodic rather than transcript-based. Architectural decisions, constraints, feedback, facts, references, and current state can be retained without replaying an entire conversation. At startup, Engrim prepares a small prioritized context pack of about 4,000 characters, including a [▶ RESUME HERE] section, instead of restoring a large chat history.

How it works

Search combines SQLite FTS5 lexical retrieval with BM25 ranking and static model2vec embeddings. Reciprocal Rank Fusion merges those result types for hybrid recall, while the local CPU embedding model keeps the system usable without a hosted inference service.

Agent lifecycle adapters capture information at startup, prompt, stop, and session events where the host supports those hooks. MCP provides an explicit capture path through engrim_add, and stored records track their originating agent. A flight recorder also logs turns and action lines.

All data remains in the local SQLite store, which uses WAL mode and POSIX 0600 permissions. The project describes the design as having no cloud sync, telemetry, or tracking.

Setup and configuration

Install the Python package with:

Terminal
pip install engrim

Run engrim setup without arguments to detect installed agent environments and configure the corresponding hooks, MCP registration, plugins, skills, or guidance files. The generated configuration differs by host: Cursor receives MCP configuration, Claude Code receives lifecycle hooks and project guidance, and Codex CLI receives native command hooks with optional MCP registration.

Use the diagnostic command to inspect the database, embedding coverage, and configured integrations:

bash
engrim doctor
engrim doctor --fix
engrim doctor --json

--fix repairs stale hook paths and supports cross-platform path recovery. --json is intended for CI or health-monitoring workflows.

Tools and capabilities

  • Stores durable project memories in SQLite.
  • Adds memories explicitly through the engrim_add MCP operation.
  • Retrieves relevant records through combined lexical and vector search.
  • Injects prioritized boot context within a fixed character budget.
  • Tracks the agent that originated a memory.
  • Configures multiple coding-agent environments through setup and lifecycle adapters.
  • Checks database integrity, semantic recall coverage, and hook health with engrim doctor.

Limitations and notes

Engrim is designed around local coding-agent workflows and a stdio MCP transport. Its shared state depends on access to the same local database, so separate machines do not automatically share memories. Some hosts use optional MCP registration alongside native hooks or plugins, and the setup behavior varies by environment. The embedding model runs locally on CPU and is an 8MB static model2vec model.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Engrim

timgordontg/engrim is an MCP server that connects coding agents to a local, project-scoped SQLite memory store. Its main tools and capabilities capture durable memories through engim_add, retrieve records with hybrid BM25 and model2vec search, and inject compact boot context across supported agent environments without cloud storage or telemetry.

Install it with `pip install engrim`, then run `engrim setup` to detect supported agent environments and configure them. Use `engrim doctor` afterward to check database integrity, embedding coverage, and lifecycle hook configuration.

Yes, Engrim supports Cursor through its stdio MCP server and generated MCP configuration. Running `engrim setup` detects a Cursor installation and merges the required configuration so the agent can use the shared local memory store.

Yes, Engrim stores memory in a local SQLite database and is designed without cloud sync, telemetry, or tracking. The database uses WAL mode and POSIX `0600` permissions, while embeddings run locally on CPU.

Run `engrim doctor --fix` to check configured hooks and repair stale binary paths. The diagnostic tool can also produce JSON with `engrim doctor --json` for automated health checks.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewEngrim AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/timgordontg-engrim?style=directory)](https://allmcps.com/mcp/timgordontg-engrim)
HTML Embed
<a href="https://allmcps.com/mcp/timgordontg-engrim"><img src="https://allmcps.com/api/badge/timgordontg-engrim?style=directory" alt="Engrim on AllMCPs" /></a>