engram
MCP memory server for Claude Code, Cursor and AI agents - Rust local-first AI memory with hybrid search, SQLite, knowledge graph and Python/TypeScript SDKs
Install / Use
claude mcp add aiconnai -- npx -y github:aiconnai/engramIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of engram
engram scores 74/100 on our quality scale, 550th of 604 Data & Analytics skills we index.
Its MCP Server is 16 KB long, well organised into 34 sections with 12 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated today, so engram is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
engram compared with similar skills
All 4 of these similar skills score higher than engram; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| engram (this skill)by aiconnai | 74 | 3 | today | MCP Server |
| claude-memby thedotmack | 100 | 120.3k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 115.5k | 3d ago | CLAUDE.md |
| hyperframesby heygen-com | 100 | 91.7k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 82.6k | today | CLAUDE.md |
Frequently asked questions
- How do I install engram?
- Run
claude mcp add aiconnai -- npx -y github:aiconnai/engram. The install tabs above show the steps for each supported agent. - Which AI agents does engram work with?
- It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
- Is engram safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is engram still maintained?
- The repository was last updated today, so engram is actively maintained.
Skill content
View source on GitHubEngram
Persistent, local-first memory engine for AI agents across Frontier LLMs.
- Website & Interactive Playground
- MCP Tools Catalog
- System Architecture
- Quickstart Guide
- Using Engram in a Repo
- Comparison Guide
- Contributing
- Security Policy
Engram is a local-first, offline-capable, high-performance Rust memory engine for teams shipping autonomous AI agents across the modern AI stack. First-class Model Context Protocol (MCP) support, runnable examples, and SDK integrations cover Claude Code, Cursor & Cursor Rules, Google Antigravity, OpenAI Agents SDK, LangGraph, CrewAI, LlamaIndex, and FastMCP. Any other MCP-capable host or model can connect over MCP stdio or HTTP JSON-RPC; this repository ships no model-specific adapters.
It organizes decisions, transcripts, architecture notes, and repos into SQLite with millisecond-scale keyword retrieval, 3-way hybrid search (BM25 + Vectors + Fuzzy), dynamic knowledge graphs with identity resolution, multi-tier temporal salience decay, and contradiction detection.
Measured latency (100K memories x 384-dim embeddings, 100 iterations): FTS5 keyword search p50 3.2 ms, p95 3.8 ms; hybrid search (BM25 + cosine + RRF) p50 250 ms, p95 261 ms. The vector leg is brute-force cosine, so hybrid latency grows linearly with corpus size. Commands, raw numbers, and caveats: search measurements.
Engram runs locally and offline by default—keeping your proprietary context on your machine with zero telemetry and never sending data externally unless you opt into remote embedding providers or encrypted S3/R2 backup sync—and exposes unified access via MCP stdio, HTTP JSON-RPC 2.0 (POST /mcp), WebSocket event streaming, CLI, and Python/TypeScript SDKs.
At a Glance
| Area | What Engram does |
|------|------------------|
| Storage Layer | Local-first SQLite + WAL with connection pooling, ACID writes, and optional AES-256-GCM encrypted S3/R2 cloud backup sync. |
| Hybrid Search | 3-way retrieval fusing BM25 (FTS5), dense cosine vector embeddings (built-in TF-IDF by default; OpenAI with an API key; local MiniLM ONNX via the optional local-embeddings feature), and fuzzy Levenshtein via Reciprocal Rank Fusion (RRF). |
| Knowledge Graph | Automatic entity extraction, bidirectional relationship edges, canonical identity resolution, and multi-hop shortest path graph traversal. |
| Salience & Lifecycle | Multi-tier retention distinguishing permanent decisions from 24h daily scratchpads; dynamic exponential decay scoring. |
| Context Quality | 5-component quality scoring (clarity, completeness, freshness, consistency, trust) + automated contradiction and conflict detection. |
| Project Discovery | Auto-ingests and indexes CLAUDE.md, AGENTS.md, .cursorrules, copilot-instructions.md, and .aider.conf.yml. |
| Universal Transports | MCP over stdio, HTTP JSON-RPC 2.0 (/mcp), WebSocket real-time subscription streaming, and gRPC (optional grpc Cargo feature, not in the default build). |
| Developer Surface | Native Rust crate (engram-core), async Python SDK (engram-client), TypeScript SDK (@aiconnai/engram-client), and CLI (engram-cli). |
Works With
Engram provides durable, structured memory anywhere an AI agent reasons, plans, or codes:
| Ecosystem | How Engram helps |
|-----------|------------------|
| Claude Code & Claude Desktop | Native MCP memory server for durable cross-session decisions, transcript search, and repo context retrieval. |
| Cursor & Cursor Rules | Ingests .cursorrules, provides instant semantic search over architecture patterns and coding conventions. |
| Google Antigravity | Persistent multi-agent memory and shared workspace context for complex agentic refactors and long-running swarms. |
| OpenAI Agents SDK & ChatGPT | Callable tools for durable thread state, entity lookup, and fact verification over HTTP JSON-RPC. |
| Other MCP-capable models (Gemini, DeepSeek, Grok, GPT, ...) | Model-agnostic: connect through any MCP host over stdio or HTTP JSON-RPC. No model-specific adapters or examples are shipped for these models. |
| LangGraph & LangChain | Python SDK adapters for stateful graph nodes that search, store, and compact memory across multi-agent workflows. |
| CrewAI Swarms | Python SDK adapters for short-term, long-term, and entity memory across specialized agent crews. |
| LlamaIndex | Python SDK document store, vector store, and chat store adapters backed by hybrid retrieval. |
| FastMCP & Custom MCP Hosts | Ready-to-use MCP tools for seamless plug-and-play memory in any MCP client. |
Runnable examples live under examples/, with focused guides for Claude MCP memory, Cursor MCP memory, and OpenAI Agents memory.
Why Engram?
AI agents without persistent memory suffer from critical operational flaws:
- Context Loss Between Sessions: Agents forget architectural decisions, conventions, and user preferences as soon as a chat closes.
- Context Window Exhaustion: Stuffing full histories into prompts wastes tokens, degrades reasoning, and causes context overflow.
- Keyword vs Concept Blindspots: Pure vector search misses exact symbol names and error codes; pure keyword search fails on semantic concepts.
- Contradictory Directives: Outdated notes conflict with new requirements, causing agents to oscillate between conflicting code styles.
Engram solves this by providing a unified, local-first intelligence layer:
┌─────────────────────────────────────────────────────────────────┐
│ AI Agent Hosts │
│ Claude Code │ Cursor │ Antigravity │ OpenAI Agents │ CrewAI │
└────────────────────────────────┬────────────────────────────────┘
│ MCP stdio / HTTP / WS (gRPC: optional feature)
┌────────────────────────────────▼────────────────────────────────┐
│ Engram Server │
├─────────────────────────────────────────────────────────────────┤
│ Intelligence Layer │
│ • Salience scoring • Quality assessment • Entity extraction │
│ • Contradiction detection • Identity alias resolution │
├─────────────────────────────────────────────────────────────────┤
│ Search Layer │
│ • BM25 (FTS5) • Vectors (Cosine) • Fuzzy • RRF fusion │
├─────────────────────────────────────────────────────────────────┤
│ Storage Layer │
│ • SQLite + WAL (local-first) • Multi-workspace isolation │
│ • Optional S3/R2 Cloud Backup Sync (AES-256-GCM) │
└─────────────────────────────────────────────────────────────────┘
How It Compares
| Feature | Engram | Mem0 | Zep (Graphiti) | Cognee | Generic MCP Memory | |---------|:------:|:----:|:--------------:|:------:|:------------------:| | Core Runtime | Rust (Single binary) | Python | Python / Cloud | Python | Node.js / Python | | Offline by Default / Local-First | Yes (SQLite+WAL; remote embeddings & S3/R2 sync opt-in) | Partial | Cloud service | Partial | Yes | | 3-Way Hybrid Search | BM25 + Vector + Fuzzy | Vector only | Vector + Graph | Graph + Vector | Keyword only | | Knowledge Graph & Identity | Yes (Built-in) | Basic | Yes (Graphiti) | Yes | None | | Memory Tiering & Salience | Permanent + 24h Daily | Manual | Single tier | Manual | None | | Contradiction Detection | Yes (Temporal) | Overwrite only | Edge invalidation | None | None | | Transports Supported | stdio, HTTP, WS (+ gRPC, optional feature) | REST API | REST / GraphQL | REST API | stdio only | | Active MCP Tools | 301 tools (254 in the default build) | — | — | — | — | | Zero Cloud Lock-in | Yes | No | No | Partial | Yes |
Tool counts: 301 is the size of the generated catalog (docs/MCP_TOOLS.md); 254 of them are callable in a default cargo build, and the rest need opt-in Cargo features. The default tools/list advertises only the 17 essential tools unless ENGRAM_TOOL_TIER is raised.
For a comprehensive breakdown, see docs/COMPARISON.md.
Quick Start
Installation
# 🍺 Install with Homebrew (macOS & Linux)
brew install aiconnai/engram/engram
# 🦀 Or install from crates.io
cargo install engram-core
# ⚡ Or build from source
git clone https://github.com/aiconnai/engram.git
cd engram && cargo build --release
Run as an MCP Server
# stdio transport (for Claude Code, Cursor, Antigravity, VS Code)
engram-server --transport stdio
# HTTP JSON-RPC transport (POST /mcp)
engram-server --transport http --http-port 8080
# Both stdio + HTTP (default)
engram-server --transport both --http-port 8080
MCP Configuration
Add to your MCP config (~/.claude/mcp.json, .cursor/mcp.json, or Antigravity):
{
"mcpServers": {
"engram": {
"command": "engram-server",
"args": ["--transport", "stdio"],
"env": {
"ENGRAM_DB_PATH": "~/.local/share/engram/memories.db",
"ENGRAM_TOOL_TIER": "standard"
}
}
}
}
SDK Quickstarts
Python SDK (sdks/python/)
pip install engram-client
import asyncio
from engram_client import EngramClient
async def main():
async with EngramClient(base_url="http://localhost:8080") as client:
# Create a persistent decision memory
memory = await client.create_memory(
content="Use AES-256-GCM for cloud backup encryption",
workspace="security",
memory_type="decision"
)
print(f"Stored memory: {memory.id}")
# 3-way hybrid search with typo tolerance
results = await client.search_memory(
query="aes encryption cloud backup",
workspace="security"
)
for hit in results.memories:
print(f"[{hit.score:.2f}] {hit.content}")
if __name__ == "__main__":
asyncio.run(main())
TypeScript SDK (sdks/typescript/)
npm install @aiconnai/engram-client
import { EngramClient } from '@aiconnai/engram-client';
const client = new EngramClient({ baseUrl: 'http://localhost:8080' });
async function run() {
const memory = await client.memories.create({
content: 'PostgreSQL connection pool sized to 25 with 5s timeout',
work
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
120.3kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
115.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
hyperframes
91.7kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
ruflo
82.6k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.