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
| Agent | Setup Method | Plugin Available | Auto Session Tracking | Compaction Recovery |
|---|---|---|---|---|
| OpenCode | engram setup opencode | Yes (TypeScript) | Yes | Yes (via hooks) |
| Claude Code | Marketplace | Yes (bash hooks) | Yes | Yes (via hooks) |
| Gemini CLI | engram setup gemini-cli | No | No | Yes (system.md) |
| Codex | engram setup codex | No | No | Yes (compaction prompt) |
| VS Code | Manual MCP config | No | No | Manual (instructions) |
| Antigravity | Manual MCP config | No | No | Manual (GEMINI.md) |
| Cursor | Manual MCP config | No | No | Manual (.cursorrules) |
| Windsurf | Manual MCP config | No | No | Manual (.windsurfrules) |
What You Get
Bare MCP (All Agents)
All agents get access to 14 MCP tools for persistent memory:mem_save— Save structured observationsmem_search— Full-text search across memoriesmem_context— Get recent session contextmem_session_summary— Save end-of-session summariesmem_update— Update existing observationsmem_delete— Soft or hard delete memoriesmem_timeline— Chronological context around an observationmem_get_observation— Get full untruncated contentmem_suggest_topic_key— Suggest stable topic keysmem_save_prompt— Save user promptsmem_capture_passive— Extract learnings from text outputmem_stats— Memory system statisticsmem_session_start— Register session startmem_session_end— Mark session as completed
With Plugins (OpenCode, Claude Code)
Plugins add enhanced functionality:- Auto-start — Starts
engram serveif 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)
Theengram 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
Install via Homebrew (macOS/Linux):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_summarybefore ending - After compaction — Recover state with
mem_context
Platform Notes
Windows
- Data stored in
%USERPROFILE%\.engram\engram.db - Config paths use
%APPDATA%(e.g.,%APPDATA%\opencode\) engram setuphandles 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