Skip to main content
Prerequisite: Install the engram binary first via Homebrew or binary download.
Install from Claude Code’s plugin marketplace:
That’s it. The plugin registers the MCP server, hooks, and Memory Protocol skill automatically.

Option B: Setup via Engram Binary

Install the same plugin from the embedded binary:
During setup, you’ll be asked whether to add engram tools to ~/.claude/settings.json permissions allowlist. This prevents Claude Code from prompting for confirmation on every memory operation.
1

Install engram binary

2

Run setup command

Answer yes when asked about adding to permissions allowlist.
3

Verify installation

You should see engram in the list.

Option C: Bare MCP (No Hooks)

Just the 13 memory tools, no session management: Add to .claude/settings.json (project) or ~/.claude/settings.json (global):
With bare MCP, add the Memory Protocol to your CLAUDE.md so the agent remembers to use Engram after context resets.

What the Plugin Provides

Plugin Structure

How the Plugin Works

SessionStart Hook (startup)

Runs scripts/session-start.sh:
  1. Ensures engram serve is running
  2. Creates a session via HTTP API
  3. Auto-imports git-synced chunks from .engram/manifest.json (if present)
  4. Injects Memory Protocol + previous session context

SessionStart Hook (compact)

Runs scripts/post-compaction.sh:
  1. Injects previous session context
  2. Tells the agent: “FIRST ACTION REQUIRED — call mem_session_summary before doing anything else”
This ensures no work is lost when context is compressed.

SubagentStop Hook

Runs scripts/subagent-stop.sh: Passive capture trigger — extracts learnings from subagent completion.

Stop Hook

Runs scripts/session-stop.sh: Logs end-of-session event for tracking.

MCP Server Registration

The plugin includes .mcp.json:
Note the --tools=agent flag — this exposes the agent-facing tools (vs. --tools=all for debugging).

Memory Protocol Skill

The plugin includes a skill at skills/memory/SKILL.md that teaches:
  • When to save — Mandatory after bugfixes, decisions, discoveries, patterns
  • When to search — Reactive (“remember”) + proactive (overlapping work)
  • Session close — Mandatory mem_session_summary before ending
  • After compaction — 3-step recovery: persist summary → load context → continue
Claude Code loads skills automatically — no manual prompt engineering needed.

Platform-Specific Notes

Windows

The Claude Code plugin hooks use bash scripts. On Windows, Claude Code runs hooks through Git Bash (bundled with Git for Windows) or WSL.
If hooks don’t fire:
  1. Install Git for Windows (includes Git Bash)
  2. Ensure bash is in your PATH
  3. Restart Claude Code
Alternatively, use Option C (Bare MCP) which works natively on Windows without any shell dependency.

macOS / Linux

Plugin hooks work out of the box. Bash is always available.

Git Sync Auto-Import

If your project has .engram/manifest.json, the plugin automatically imports team memories on session start:
Clone a repo → run Claude Code → team’s memories are loaded. See Git Sync for details.

Compaction Recovery

When Claude Code compacts (summarizes long conversations to free context), the plugin:
  1. Auto-saves checkpoint — Calls /sessions/{id}/end with the summary
  2. Injects previous context — Fetches recent session data and adds to compaction prompt
  3. Reminds new agent — Adds instruction: “FIRST ACTION REQUIRED: Call mem_session_summary…”
Implemented via post-compaction.sh hook:

Permissions Allowlist

When using engram setup claude-code, you can add engram tools to the permissions allowlist in ~/.claude/settings.json:
This prevents Claude Code from asking “Allow tool use?” on every memory operation.

Troubleshooting

Plugin not listed

If engram is missing, reinstall:

Hooks not firing

Check that bash is available:
On Windows, install Git for Windows.

MCP tools not available

Check .claude/settings.json or ~/.claude/settings.json for the engram MCP server entry.

Server not starting

Manually start:
Then restart Claude Code.

Next Steps