Skip to main content
Engram works with any MCP-compatible agent. The setup varies slightly by agent, but the core pattern is always the same: point your agent’s MCP config to engram mcp.

Quick Setup Matrix

OpenCode

Full plugin with session tracking and auto-import

Claude Code

Marketplace plugin with hooks and Memory Protocol skill

Gemini CLI

One-command setup with system prompt injection

Codex

Auto-config with compaction recovery

VS Code

Native MCP support for Copilot and extensions

Antigravity

Google’s AI-first IDE with MCP store

Cursor

Project-level MCP config

Windsurf

User-level MCP setup

Agent Comparison

AgentSetup MethodPlugin AvailableAuto Session TrackingCompaction Recovery
OpenCodeengram setup opencodeYes (TypeScript)YesYes (via hooks)
Claude CodeMarketplaceYes (bash hooks)YesYes (via hooks)
Gemini CLIengram setup gemini-cliNoNoYes (system.md)
Codexengram setup codexNoNoYes (compaction prompt)
VS CodeManual MCP configNoNoManual (instructions)
AntigravityManual MCP configNoNoManual (GEMINI.md)
CursorManual MCP configNoNoManual (.cursorrules)
WindsurfManual MCP configNoNoManual (.windsurfrules)

What You Get

Bare MCP (All Agents)

All agents get access to 14 MCP tools for persistent memory:
  • mem_save — Save structured observations
  • mem_search — Full-text search across memories
  • mem_context — Get recent session context
  • mem_session_summary — Save end-of-session summaries
  • mem_update — Update existing observations
  • mem_delete — Soft or hard delete memories
  • mem_timeline — Chronological context around an observation
  • mem_get_observation — Get full untruncated content
  • mem_suggest_topic_key — Suggest stable topic keys
  • mem_save_prompt — Save user prompts
  • mem_capture_passive — Extract learnings from text output
  • mem_stats — Memory system statistics
  • mem_session_start — Register session start
  • mem_session_end — Mark session as completed

With Plugins (OpenCode, Claude Code)

Plugins add enhanced functionality:
  • Auto-start — Starts engram serve if not running
  • Session tracking — Automatic session creation and management
  • Auto-import — Loads git-synced memories from .engram/manifest.json
  • Memory Protocol injection — Teaches the agent when to save and search
  • Compaction recovery — Persists context across compaction events
  • Privacy stripping — Removes <private> tags before sending to engram

With Setup Commands (Gemini CLI, Codex)

The engram setup command:
  • Registers MCP server in config files
  • Writes Memory Protocol to system prompt files
  • Configures compaction recovery instructions
  • Platform-aware (handles Windows paths automatically)

Prerequisites

All agents require the engram binary to be installed first.
Install via Homebrew (macOS/Linux):
brew install gentleman-programming/tap/engram
Or download from GitHub Releases. See Installation for all platforms.

Memory Protocol

Without the Memory Protocol, agents have the tools but don’t know WHEN to use them. The protocol teaches agents:
  • When to save — After bugfixes, decisions, discoveries, patterns
  • When to search — Reactive (“remember”) + proactive (overlapping work)
  • Session close — Mandatory mem_session_summary before ending
  • After compaction — Recover state with mem_context
Some agents get this automatically via plugins or setup commands. Others require manual addition to config files. See each agent’s page for specifics.

Platform Notes

Windows

  • Data stored in %USERPROFILE%\.engram\engram.db
  • Config paths use %APPDATA% (e.g., %APPDATA%\opencode\)
  • engram setup handles Windows paths automatically
  • Claude Code plugin hooks require Git Bash or WSL

macOS

  • Data stored in ~/.engram/engram.db
  • Config paths use ~/.config/ or ~/. prefix
  • Install via Homebrew recommended

Linux

  • Data stored in ~/.engram/engram.db
  • Config paths use ~/.config/ or ~/. prefix
  • Install via Homebrew or binary download

Next Steps

Choose your agent from the cards above to see specific setup instructions.

Build docs developers (and LLMs) love