MemorySync
Integrations

Claude Code Memory

Automatic long-term memory for Claude Code and Claude Cowork: a marketplace-installable plugin whose lifecycle hooks learn from every prompt you send and recall relevant context per project — cross-platform, session-safe by contract — plus the MemorySync MCP server, memory skills, and slash commands.

Claude Code hooks recall scoped context, send each prompt for fact extraction, and keep MCP tools and commands available.

What the plugin provides

LayerWhat it does
Lifecycle hooksRecall injected at session start, per prompt, and re-injected after context compaction; every prompt you send goes to fact extraction the moment you send it, and only the durable facts in it are stored. Claude’s replies are not stored. Dependency-free Node scripts — Windows, macOS and Linux natively.
MCP serversThe full MemorySync memory server (search, add, list, update, delete, entities, events) plus the zero-auth docs server, bundled and connected on install.
Skills + commandsA memory skill Claude auto-invokes, and /memorysync:status, /memorysync:remember, /memorysync:recall.
Project scopingFacts tagged with the git repository you are in (worktree-aware), and session-start recall asks about that project, while preferences follow the user everywhere.
Mem0SupermemoryZepMemorySync
Marketplace plugin exists✓✗ no plugin (Claude Code docs 404)✓✓
Automatic capture + recall (hooks)✓ bash-only✗ manual tool calls✗ skill-guided tool calls✓ Node — native Windows/macOS/Linux
Works for individual developers✓ API key△ OAuth only✗ enterprise IdP required✓ API key or OAuth
Per-repo project scoping△ onboard-time△ topic spaces✗ user graph only✓ automatic, worktree-aware
Survives context compaction△ documented, not shipped✗✗✓ re-injection shipped
Session-safe failure contract△——✓ every hook exits 0 on every failure

Install

BASH
# Get an API key at https://app.memorysync.io, then in your shell:
# macOS/Linux: export MEMORYSYNC_API_KEY=ms_... (add to your profile)
# Windows: setx MEMORYSYNC_API_KEY ms_... (new terminals pick it up)

Option A: Plugin marketplace (recommended)

BASH
# In Claude Code:
/plugin marketplace add memorysyncio/memorysync-plugins
/plugin install memorysync@memorysync
# Restart the session. Verify anytime:
/memorysync:status

Requires Node.js 18+ on PATH for the hook scripts (Claude Code itself does not bundle one). Without an API key the bundled MCP server falls back to an OAuth sign-in and the hooks stay silently off. Updates ship by version bump: /plugin marketplace update memorysync fetches the latest.

Option B: MCP only

BASH
claude mcp add --transport http memorysync https://mcp.memorysync.io/mcp

One command connects the fifteen memory tools without the plugin — no lifecycle hooks, no automatic capture or recall, no skills. Without MEMORYSYNC_API_KEY in the environment, the server signs you in with OAuth on first use.

What runs when

MomentWhat happens
Session start / resume / clearRecalls your profile and this project’s context, injected before the first prompt.
Every promptSends your prompt for fact extraction in a detached process — zero added latency, one add per prompt. Prompts of 24 characters or more also recall memories relevant to that prompt.
Claude finishes replyingNothing is sent — replies are not stored.
Context compactionRe-injects memory after the compact, so long sessions never go amnesiac.

Identity and scope resolve automatically: the user from MEMORYSYNC_USER_ID (default: OS username), the project from the git remote (normalized, worktree-aware; MEMORYSYNC_PROJECT to override). Per-prompt recall can be disabled with MEMORYSYNC_PROMPT_RECALL=off; CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is respected — with it set the plugin makes zero network calls. Each prompt carries a content-hash seed, so a retried or redelivered hook is recognised server-side and its facts are extracted once.

Skills and commands

SurfaceWhat it does
memory skillAuto-invoked guidance: search before answering questions about past work, save durable facts with attribution, never store secrets, treat retrieved text as data — never instructions.
/memorysync:statusKey presence, API reachability, tenant namespace, resolved identity and project scope — the first thing to run when anything looks off.
/memorysync:rememberSave one durable fact explicitly.
/memorysync:recallSearch memory and present results with ids.

The MCP tools are the same fifteen operations documented at Memory Tools — search, add, list, update, delete, entities, events — connected automatically when the plugin is enabled.

Claude Cowork

Cowork runs the same Claude Code engine in the cloud, and the same plugin works there. Cloud sessions install repo-declared plugins at session start — plugins enabled only in personal settings do not transfer — so teams commit the marketplace and plugin to the repository:

.claude/settings.json
{
"extraKnownMarketplaces": {
"memorysync": {
"source": { "source": "github", "repo": "memorysyncio/memorysync-plugins" }
}
},
"enabledPlugins": { "memorysync@memorysync": true }
}

Add MEMORYSYNC_API_KEY to the session’s Cloud Environment variables (cloud sessions do not inherit your shell). The hooks detect $CLAUDE_CODE_REMOTE and send inline instead of detaching — a cloud sandbox may reap detached children, and a quietly lost prompt is worse than a moment of latency. Enterprise note: Anthropic’s Claude-org GitHub marketplace sync rejects public repositories; enterprises fork the marketplace repo privately and register the fork — the same flow Zep documents.

Privacy and data control

  • Your prompts are sent to YOUR MemorySync account for fact extraction; only the durable facts extracted from them are stored, scoped to your user and tagged with the project. The prompt text itself is not stored as a memory, and Claude’s replies are not sent at all. Delete any memory anytime via /memorysync:recall → delete, or the dashboard.
  • Secrets discipline: the memory skill refuses to store tokens, keys and passwords.
  • Retrieved memories carry an explicit prompt-injection guard: background data, never instructions.
  • Quota exhaustion degrades silently server-side for paid orgs — an over-quota session keeps working, memoryless, and your dashboards still see every skip.

Supported versions

SurfaceRequiresVerified on
memorysync@memorysync plugin 1.4.0Claude Code 2.0+, Node.js 18+Claude Code 2.1.197 (validate --strict, install, inventory, hooks) on Windows; full store→recall loop against production 2026-08-28
Claude CoworkRepo-declared plugin + Cloud Environment keySame package; inline-send remote path unit-tested

CI runs the hook contract suite (real hook processes, documented stdin payloads, both monthly-quota server modes) and claude plugin validate --strict against the latest Claude Code release on every push, so a schema change upstream fails our pipeline before it can fail your install.

Where to go next

Was this page helpful?