Cursor Supermemory

September 12, 2026 · View on GitHub

Persistent AI memory for Cursor — powered by Supermemory.

Installation

Requires Node.js on your PATH. Hooks and the MCP proxy run the plugin's bundled dist/ with Node. Bun is only needed to build the plugin.

Open Customize in Cursor, find Supermemory, select Install, and choose a project or user scope. Restart Cursor or run Developer: Reload Window after installation.

Connect your Supermemory account:

node "$(ls -d ~/.cursor/plugins/local/cursor-supermemory ~/.cursor/plugins/cache/*/cursor-supermemory/*/ 2>/dev/null | head -1)/dist/cli.js" login

Cursor only sets CURSOR_PLUGIN_ROOT for plugin hooks, so the command above finds the install itself and works from any directory.

What it does

  • Session context — loads your persistent profile when a Cursor conversation starts
  • Automatic recall — searches on substantive prompts, deduplicates results, and injects them after the first tool result supported by Cursor
  • Incremental capture — saves each completed turn and retries unsaved transcript deltas at session end
  • MCP tools — the hosted Supermemory tools, proxied over stdio for explicit memory control
  • Context gatherer — fans out targeted searches before substantial work
  • Always-on rule — makes the agent recall relevant history proactively

MCP Tools

The plugin proxies the hosted Supermemory MCP server (https://mcp.supermemory.ai/mcp) over stdio, using the same credentials as the hooks — one login covers both. Claude Code and Codex use the same server, so all three agents see one tool set:

ToolDescription
search_memorySearch memories in one container, with that container's profile summary
add_memorySave a memory, or forget one that is outdated
listMemoriesList recent memories with their IDs
listDocuments / getDocumentBrowse and read stored documents
listSpaces / whoAmIResolve a named space, or report the active account and space
save-memory / guided-saveAlternate save flows exposed by the hosted server
upload-file / prepare-file-uploadAttach a file to a space
memory-graph / fetch-graph-dataExplore the memory graph
select-space / set-active-tagChange the account's active space

The first five rows are what the bundled rule, skills, and agent use. The rest come from the hosted server and appear in tools/list as well; the two select-space / set-active-tag tools change account-wide state, so prefer passing containerTag per call over switching the active space.

Pass containerTag on every call, using the tag from the <supermemory-context> block the session-start hook injects. Without it the hosted server writes to the account's active space, and this project's hook recall will not find the memory. The bundled rule, skills, and context-gatherer agent all carry that instruction.

Config lives in files rather than tools: see Configuration or run the /supermemory-config command.

Configuration

Environment variables

VariableDescription
SUPERMEMORY_API_KEYAPI key (overrides all other sources)
SUPERMEMORY_API_URLOverride the Supermemory API base URL
SUPERMEMORY_REPO_TAGOverride the unified repository container tag
SUPERMEMORY_USER_TAGLegacy Cursor personal container to continue reading
SUPERMEMORY_PROJECT_TAGLegacy Cursor project container to continue reading
CURSOR_USER_EMAILUsed only to find legacy Cursor personal memories

Global config — ~/.config/cursor/supermemory.json

User-wide defaults, applies to all projects.

{
  "repoContainerTag": "repo_my_project__0123456789abcdef",
  "similarityThreshold": 0.55,
  "maxMemories": 10,
  "maxProjectMemories": 5,
  "injectProfile": true,
  "signalExtraction": false,
  "signalKeywords": ["remember", "architecture", "decision", "bug", "fix"],
  "signalTurnsBefore": 3
}

Project config — .cursor/.supermemory/config.json

Per-workspace overrides. Add to .gitignore if it contains an API key. Project config wins over global config.

{
  "apiKey": "sm_...",
  "repoContainerTag": "repo_my_project__0123456789abcdef",
  "similarityThreshold": 0.55,
  "maxMemories": 10,
  "maxProjectMemories": 5,
  "injectProfile": true
}
OptionDescriptionDefault
apiKeyProject-specific API key
baseUrlOverride the Supermemory API base URLSupermemory API
repoContainerTagOverride the unified repository containerderived from normalized Git remote or project path
userContainerTagLegacy Cursor personal container to continue reading
projectContainerTagLegacy Cursor project container to continue reading
similarityThresholdMinimum similarity for prompt recall. Values below 0.55 are floored.0.55
maxMemoriesMax project memories injected at session start10
maxProjectMemoriesMax project memories injected at session start5
injectProfileWhether to inject user profile at session starttrue
signalExtractionCapture only turns containing durable-signal keywordsfalse
signalKeywordsKeywords that trigger signal-based captureremember, architecture, decision, bug, fix
signalTurnsBeforeNumber of nearby turns retained around a signal3

Create or edit the config file directly, or run the /supermemory-config command.

Container tags

Cursor, Claude Code, Codex, and OpenCode use the same repository tag:

repo_<project_name>__<project_id>

The project ID is a stable hash of the normalized Git remote. Repositories without a remote fall back to their resolved local path. This prevents two different repositories with the same directory name from colliding while letting different agents share memory for the same repository.

The plugin continues reading the former Cursor cursor_user_* and cursor_project_* tags, along with legacy tags from the other supported agents. New writes only use the unified repository tag. Set repoContainerTag only when you need an explicit shared override.

Development

bun install
bun run build   # compiles all dist/ files

Testing from this repo

  1. Run bun install && bun run build.
  2. Run bun run sync to copy this repository to ~/.cursor/plugins/local/cursor-supermemory (Cursor rejects symlinks pointing outside its plugins directory; re-run after every change).
  3. Run node dist/cli.js login.
  4. Restart Cursor after changing MCP configuration.

To test in a different project, add the supermemory entry from .cursor/mcp.json to that project's MCP config with an absolute path to this repo's dist/cli.js (keep the mcp argument — ${workspaceFolder} would point at the wrong project there).

Cloud Agents

Cursor Cloud Agents pass the plugin's mcp.json to the exec daemon without expanding ${CURSOR_PLUGIN_ROOT}, and they have no browser for the login flow.

The mcp.json entry handles the first half on its own: it launches node -e with no path of its own, then locates the install from CURSOR_PLUGIN_ROOT when that resolved, and otherwise from ~/.cursor/plugins. Nothing to run.

For the second half, set SUPERMEMORY_API_KEY in the agent environment. That is the only required Cloud Agent step.

If an environment installs the plugin somewhere else entirely — no ~/.cursor/plugins copy and no usable CURSOR_PLUGIN_ROOT — run this from the plugin directory to register an absolute entry:

node dist/cli.js mcp-install

It writes a supermemory entry with an absolute path into ~/.cursor/mcp.json, which needs no variable expansion. Hooks keep working either way.