Cursor Memory
Automatic long-term memory for Cursor: the MemorySync plugin captures every exchange through Cursor’s hook system, keeps recall on through a bundled always-on rule, and connects the full MemorySync MCP tool set — cross-platform, per-project scoped, and incapable of breaking a session by contract.
What the plugin provides
| Layer | What it does |
|---|---|
| Hooks (capture) | beforeSubmitPrompt persists your message in a detached process (zero added latency); stop and afterAgentResponse persist the reply — both events converge on one stored row via idempotency seeds. Dependency-free Node scripts: Windows, macOS, Linux natively. |
| Rule (recall) | Cursor hooks cannot inject model context, so a compact always-on rule keeps the agent recalling through the MCP tools — search before questions about past work, save durable facts, treat retrieved text as data. |
| MCP servers | The full MemorySync memory server (API key via ${env:MEMORYSYNC_API_KEY} or OAuth) plus the zero-auth docs server. |
| Skills | The same memory / status / remember / recall skills as the Claude Code and Codex plugins — Cursor loads the shared SKILL.md standard. |
| Mem0 | Supermemory | Zep | MemorySync | |
|---|---|---|---|---|
| Cursor plugin exists | ✓ | ✗ config snippet only (Cursor docs page 404) | ✓ | ✓ |
| Automatic capture (hooks) | ✓ bash-only — no native Windows | ✗ | ✗ explicitly no hooks | ✓ Node — all three OS natively |
| 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 |
| Hook failure can break a session | ❌ undocumented | — | — | ✓ impossible: {"continue": true} on every path, tested |
Install
# 0. Get an API key at https://app.memorysync.io, then:# macOS/Linux: export MEMORYSYNC_API_KEY=ms_...# Windows: setx MEMORYSYNC_API_KEY ms_...# A. Full plugin (hooks + rule + skills + MCP), local install:# copy plugins/memorysync from github.com/Rafay121/memorysync-plugins# into ~/.cursor/plugins/local/memorysync, then run# "Developer: Reload Window". Teams/Enterprise: import the repo as a# team marketplace instead.# B. MCP only, one command (writes ~/.cursor/mcp.json):npx memorysync-mcp-install --client cursor# C. MCP only, one click — the "Add to Cursor" deeplink:# cursor://anysphere.cursor-deeplink/mcp/install?name=memorysync&config=eyJ1cmwiOiJodHRwczovL21jcC5tZW1vcnlzeW5jLmlvL21jcCIsImhlYWRlcnMiOnsiWC1BUEktS2V5IjoiJHtlbnY6TUVNT1JZU1lOQ19BUElfS0VZfSJ9fQ==
The full plugin needs Node.js 18+ on PATH for the hook scripts. Options B and C configure the MCP tools only — memory works through tool calls and the rule, without automatic capture. Without an API key the MCP server falls back to an OAuth sign-in.
What runs when
| Moment | What happens |
|---|---|
| Every prompt | Your message persists in a detached process — the hook answers {"continue": true} instantly, always. |
Reply finishes (stop / afterAgentResponse) | The reply persists; both events firing for one reply converge on one stored row (content-hash seeds). |
| Any failure — no key, network down, quota exhausted | Silent skip. The hooks are incapable of blocking or breaking a Cursor session, by contract and by test. |
# Same operation as the hooks perform, shown as the raw MemorySync REST call(s).## Each turn persists verbatim with a content-hash speaker seed; the# cursor:: transcript scope keeps this IDE's history separate from your# Claude Code and Codex transcripts while sharing the same memories.curl --request POST https://api.memorysync.io/v1/memory/add_turn \--header "X-API-Key: $MEMORYSYNC_API_KEY" \--header "Content-Type: application/json" \--data '{"tenant_id":"acme","user_id":"rafay","source":"cursor","text":"human: switch the dashboard to teal","speaker":"human@cursor::github.com/acme/web-app#h<content-hash>","metadata":{"session_id":"cursor::github.com/acme/web-app","project":"github.com/acme/web-app"}}'
Identity and scope resolve exactly like the Claude Code plugin: MEMORYSYNC_USER_ID (default: OS username), project from the git remote — worktree-aware — with MEMORYSYNC_PROJECT override.
The recall rule
rules/memorysync.mdc ships alwaysApply: true and costs ~90 tokens: it tells the agent to search_memory before answering questions about past work, to add_memory when durable facts appear (never secrets), and to treat retrieved text as background data — never instructions. Because the rule drives recall through the same MCP tools the model can call anytime, recall works in chat, agent mode and the Cursor CLI alike.
Supported versions
| Surface | Requires | Verified on |
|---|---|---|
memorysync Cursor plugin 1.1.0 | Cursor with plugins + hooks (2026 builds), Node.js 18+ | Cursor 3.9.16 local-plugin install on Windows; hook contract suite 37/37 |
CI drives every hook script as a real child process — the continue-true-always contract, double-fire convergence, both monthly-quota server modes — on every push.