claude-memory
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
claude-memory-bridge
Share the exact same live Claude Code memory files (~/.claude/projects/<slug>/memory/) with Antigravity CLI (agy) and Factory Droid (droid) — plus local nightly Auto-Dream consolidation.
No database, no embeddings, no copying, no sync drift. Claude Code stays untouched.
~/.claude/projects/<slug>/memory/
├── MEMORY.md # Live index shared across harnesses (200 lines / 25 KB cap)
└── *.md # Native Claude Code YAML frontmatter (user / feedback / project / reference)
▲
├── Claude Code (native Auto Memory)
├── claude-memory-mcp (stdio MCP server: 6 tools, atomic writes + file lock)
├── claude-memory-hook (SessionStart index + proactive memory discipline)
└── claude-memory dream (local Auto-Dream via `agy -p`, backups & restore)What You Get
100% live Claude Code format: identical slug encoding, git repo & linked worktree resolution (
--git-common-dir),metadata.typefrontmatter preservation (includingoriginSessionId), and surgicalMEMORY.mdupdates that keep your custom sections intact.6 dedicated MCP tools:
memory_list,memory_read,memory_write,memory_search,memory_delete, and read-onlymemory_list_projects— with cross-process locking, atomic writes, secret redaction, and[[wikilink]]resolution.Opt-in cross-project search: stays strictly inside the current project by default (
scope: "current"). Only searches sibling/parent projects (scope: "nearby") or all projects (scope: "all") when asked, while skipping/tmp, scratch workspaces, and excluded paths.Local Auto-Dream consolidation: brings Claude Code's 4-phase background memory cleanup to any setup (including third-party gateways without Anthropic OAuth) using headless
agy -p, deterministic pre-scan, automatic pre-run backups, one-command restore, and strict single-project + read-only-repo isolation.
Related MCP server: memory-mcp
Install
Requires Node.js >= 20.
git clone https://github.com/alesha-pro/claude-memory-bridge.git
cd claude-memory-bridge
npm install
npm run build
npm testOptional global CLI link (claude-memory, claude-memory-mcp, claude-memory-hook):
npm linkConnect Your Harnesses
Replace /ABS/PATH/TO/claude-memory-bridge with your clone path.
Antigravity CLI (agy)
MCP server —
~/.gemini/config/mcp_config.json:{ "mcpServers": { "claude-memory": { "command": "node", "args": ["/ABS/PATH/TO/claude-memory-bridge/dist/mcp.js"] } } }SessionStart hook —
~/.gemini/config/hooks.json(merge with any existing hook entries):{ "claude-memory": { "SessionStart": [ { "type": "command", "command": "node /ABS/PATH/TO/claude-memory-bridge/dist/hook.js --harness antigravity", "timeout": 10 } ] } }Auto-allow memory tools —
~/.gemini/antigravity-cli/settings.json:{ "permissions": { "allow": ["mcp(claude-memory/*)"] } }Verify:
agy mcp listshould showclaude-memoryenabled.
Factory Droid (droid)
MCP server —
~/.factory/mcp.json:{ "mcpServers": { "claude-memory": { "command": "node", "args": ["/ABS/PATH/TO/claude-memory-bridge/dist/mcp.js"] } } }SessionStart hook —
~/.factory/settings.json(add inside"hooks"."SessionStart"):{ "hooks": [ { "type": "command", "command": "node /ABS/PATH/TO/claude-memory-bridge/dist/hook.js --harness droid", "timeout": 10 } ] }Verify:
droid mcp listshould showclaude-memoryconnected with 6 tools.
MCP Tools
Tool | Scope | Purpose |
| Current (or | List project memories and |
| Current (or | Read full markdown body, metadata, and resolved |
| Current project only | Create/update |
| Current project only | Delete |
|
| Local Unicode-aware (EN/RU) ranked search with snippets |
| Read-only | List projects with non-empty memory (filters temp/excluded) |
Auto-Dream (Nightly Consolidation)
Over dozens of sessions, MEMORY.md accumulates duplicates, expired notes, short dates (07.11), and broken [[wikilinks]]. claude-memory dream runs a conservative 4-phase consolidation cycle via headless agy -p (default model: gemini-4-hydrogen-high).
# Preview only (default — strictly read-only, zero file edits)
node dist/cli.js dream /path/to/project --dry-run --with-sessions
# Apply changes (creates an automatic backup first)
node dist/cli.js dream /path/to/project --apply --with-sessions
# Check or roll back backups at any time
node dist/cli.js backups /path/to/project
node dist/cli.js restore latest /path/to/projectHow It Stays Safe
Pre-run backup: snapshots all
.mdfiles to~/.local/state/claude-memory-bridge/backups/<slug>/<timestamp>/before every--apply(keeps last 10 per project;restorealso takes apre-restoresnapshot).Read-only codebase: passes per-session
--settingstoagydenyingwrite_file(*)andcommand(*). In--dry-run,memory_writeandmemory_deleteare also denied.Hard single-project lock: sets
CLAUDE_MEMORY_LOCK_PROJECT_SLUGso the MCP server physically blocks cross-project reads/writes during a dream cycle.Fast on 100+ file banks: runs a ~10 ms deterministic pre-scan (broken
[[wikilinks]], unindexed/dangling entries, overlap clusters, short/relative dates) before invoking the model.Smart scheduling gates (for
--all):--min-hours 24— skips projects dreamed within the last 24h;--min-sessions 3— requires≥ 3new.jsonlsessions or at least 1 modified.mdmemory file since the last dream;--active-within-days 14— ignores dormant/archived projects;--max-projects 3— caps runs per night (most recently active first);--with-sessions— optionally extracts a compact (≤16 KB) digest of recent user messages from.jsonllogs to catch missed corrections/decisions.
Schedule Nightly Runs
macOS (launchd) — copy and edit examples/launchd-nightly-dream.plist:
mkdir -p ~/.local/state/claude-memory-bridge
cp examples/launchd-nightly-dream.plist ~/Library/LaunchAgents/com.local.claude-memory-dream.plist
# Edit YOUR_USER and /ABSOLUTE/PATH/TO/claude-memory-bridge, then load:
plutil -lint ~/Library/LaunchAgents/com.local.claude-memory-dream.plist
launchctl bootstrap "gui/$(id -u)" ~/Library/LaunchAgents/com.local.claude-memory-dream.plistLogs live in ~/.local/state/claude-memory-bridge/ (dream.log, dream-state.json, launchd.out.log, launchd.err.log).
Linux (cron) — daily at 04:00:
0 4 * * * /usr/bin/node /ABS/PATH/TO/claude-memory-bridge/dist/cli.js dream --all --apply --with-sessions --min-hours 24 --min-sessions 3 --active-within-days 14 --max-projects 3 --model gemini-4-hydrogen-high >> ~/.local/state/claude-memory-bridge/cron.log 2>&1Optional /memory-dream Skill
Copy examples/memory-dream/SKILL.md to trigger consolidation on demand from Claude Code, Factory Droid, or Antigravity CLI:
mkdir -p ~/.agents/skills/memory-dream
cp examples/memory-dream/SKILL.md ~/.agents/skills/memory-dream/SKILL.md
# For Antigravity CLI global skills:
mkdir -p ~/.gemini/config/skills
ln -sfn ~/.agents/skills/memory-dream ~/.gemini/config/skills/memory-dreamOptional Config & CLI Reference
Create ~/.config/claude-memory-bridge/config.json to isolate benchmark/private directories or link related projects for scope: "nearby":
{
"exclude": ["models-benchmarks"],
"groups": [
["~/dev/backend", "~/dev/frontend"]
]
}exclude: projects matching these patterns are hidden frommemory_list_projects, skipped by Auto-Dream, and isolated from cross-project search when running inside them.groups: paths or slugs treated asnearbysiblings across directory trees.
CLI commands:
node dist/cli.js status [path]
node dist/cli.js projects [--filter <text>] [--include-temp]
node dist/cli.js list [path] [--project-slug <slug>]
node dist/cli.js search "<query>" [path] [--scope current|nearby|all] [--project-slug <slug>]
node dist/cli.js dream [path] [--dry-run|--apply] [--with-sessions] [--model <id>] [--force] [--all]
node dist/cli.js backups [path]
node dist/cli.js restore <backup-id|latest> [path]
node dist/cli.js test-hook --harness <antigravity|droid> [path]Environment variables: CLAUDE_PROJECTS_DIR, CLAUDE_MEMORY_DEFAULT_CWD, CLAUDE_MEMORY_CONFIG, CLAUDE_MEMORY_STATE_DIR, CLAUDE_MEMORY_EXCLUDE, CLAUDE_MEMORY_LOCK_PROJECT_SLUG.
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that reads all your Claude Code project memory files and exposes them as tools. Lets any Claude instance — in any project, or via Claude.ai — query your full project history and preferences.550 npm1MIT
- AlicenseNot gradedqualityFmaintenanceA local stdio MCP server that exposes a shared brain (read/search/write) over ~/.claude/memory, allowing memories written in any agent to be readable and searchable across all three (Claude Code, Cursor, Codex). It provides tools like memory_search, memory_read, memory_write, etc., with no external services.14 npmMIT
- AlicenseAqualityCmaintenanceA local shared-memory MCP server for Claude, Codex, Hermes, and other MCP-aware agents, providing a durable memory layer with Markdown files and SQLite fact store.6MIT

@agentage/mcp-memoryofficial
AlicenseAqualityBmaintenanceExposes local memory vaults as 6 MCP tools over stdio, enabling clients like Windsurf, Zed, and Claude Desktop to read and write memory.6376 npm2MIT