[supermemory](https://supermemory.ai/) · Guides

# How do I give Cursor long-term memory?

Reviewed November 10, 2026 [Docs for this setup](https://supermemory.ai/docs/integrations/cursor) 

Cursor keeps only what you write down: project Rules under `.cursor/rules`, global User Rules and `AGENTS.md`. Its auto-generated Memories were removed in Cursor 2.1, so nothing from a chat survives on its own. To keep decisions, bugs and conventions across sessions, repositories and tools, add a memory layer. The supermemory plugin for Cursor installs with `/add-plugin cursor-supermemory`, recalls relevant memories before each prompt and saves each turn, and shares one memory per repository with Claude Code, Codex and OpenCode. supermemory's and Mem0's MCP servers give Cursor memory tools it has to call; a Markdown memory bank is the no-vendor option you maintain by hand.

## What does Cursor remember on its own?

**Rules** are instruction files: project rules under `.cursor/rules` as `.mdc` files, applied always or by file pattern; User Rules, which are global to your Cursor; and Team Rules. Cursor also reads `AGENTS.md`. They say how to work, and Cursor loads them into context every session.

**Memories**, the facts Cursor used to generate from chats per project, were removed in Cursor 2.1 in November 2025; Cursor's advice was to export them as a rule. A chat now leaves nothing behind unless you write it into a rule yourself.

Rules are the latest version only: the reasons behind a change are gone once it is edited, nothing is searched by relevance against what you are doing now, and nothing crosses to another repository or to Claude Code, Codex or any other tool.

## How do I add long-term memory to Cursor with the supermemory plugin?

1. In a Cursor chat, run `/add-plugin cursor-supermemory`, or install Supermemory from the Cursor Marketplace under Customize. Node.js has to be on your `PATH`. Restart Cursor, or run Developer: Reload Window.
2. Open a new chat and run `/supermemory-setup`. A browser window opens; sign in to supermemory. There is no API key to create. To use one anyway, set `SUPERMEMORY_API_KEY` in your shell and restart Cursor.
3. Keep working. On a session's first message the plugin loads your profile; on each substantive prompt it searches memory and injects what matches; after each completed turn it saves the exchange. Run `/supermemory-index` once to seed memory with the codebase's architecture and conventions.
4. Check the connection any time with `/supermemory-status`; disconnect with `/supermemory-logout`. Your memories stay in supermemory.

```
/add-plugin cursor-supermemory
/supermemory-setup
```

The plugin also proxies the hosted supermemory MCP server, so the agent has `search_memory`, `add_memory`, `forget_memory`, `list_memories` and the document tools when it wants to use memory on purpose, and it ships skills for saving and searching and an agent that gathers background before substantial work.

## Does the memory carry over to Claude Code, Codex and OpenCode?

Yes. A plugin keys memory to the repository: one container named `repo_<project>__<hash>`, where the hash comes from the normalised Git remote. Clones and worktrees of the same repository share it; two repositories with the same folder name do not collide. The Claude Code, Cursor, Codex and OpenCode plugins all write to the same container, so a decision saved in one tool is there when you open the next.

Set `repoContainerTag` in `~/.config/cursor/supermemory.json` (user-wide) or `.cursor/.supermemory/config.json` (per workspace) only when you need an explicit shared container.

## Which memory options work with Cursor?

| Option                     | What it is                                                              | Across repositories and tools                                       | Runs where                                                      |
| -------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------- |
| Cursor Rules and AGENTS.md | Instruction files you write; loaded every session                       | User Rules follow you; project rules and AGENTS.md stay in the repo | In the repository, or Cursor settings                           |
| Markdown memory bank       | Notes files the agent is told to read and update                        | No, per repository, and only if the agent keeps them current        | In the repository                                               |
| supermemory plugin         | Automatic recall before prompts and capture after turns, plus MCP tools | Yes, shared with Claude Code, Codex and OpenCode                    | Hosted, or supermemory local on your machine                    |
| supermemory MCP server     | Nine memory tools over MCP; the agent decides when to call them         | Yes, any MCP client, one memory                                     | Hosted                                                          |
| Mem0 MCP server            | Mem0's hosted MCP server at mcp.mem0.ai; memory tools the agent calls   | Yes, any MCP client                                                 | Hosted (Mem0's local OpenMemory server was sunset in July 2026) |

The difference that matters day to day is automatic versus on request. An MCP server only helps when the model decides to search; the plugin searches on every substantive prompt and saves without being asked.

## Can I keep the memory on my machine?

Run `npx supermemory local`, point the plugin at it with `SUPERMEMORY_API_URL="http://localhost:6767"` (or `baseUrl` in its config file) and use the API key printed on first boot. supermemory local is free for up to 10,000 stored documents and keeps everything on your machine; it is not open source, and memories do not move between it and the hosted service.

## Questions

### Does Cursor remember previous chats?

No. Cursor's per-project Memories were removed in version 2.1, and Rules only hold what you write into them. The supermemory plugin adds memory of previous chats: it recalls relevant memories on each prompt and saves each turn.

### Do I need an API key for the supermemory Cursor plugin?

No. /supermemory-setup signs you in through the browser. An API key from the console works as a fallback, set as SUPERMEMORY\_API\_KEY.

### What does it cost?

The plugin is free and MIT-licensed. It uses your supermemory account; the Free plan includes $5 of credits a month, and paid plans start at $19.

### Is the memory shared with Claude Code and Codex?

Yes. The Cursor, Claude Code, Codex and OpenCode plugins write to one container per repository, derived from the Git remote, so they read and write the same memory.

### Where does the plugin keep its settings?

User-wide defaults in \~/.config/cursor/supermemory.json, per-workspace overrides in .cursor/.supermemory/config.json, and credentials in \~/.supermemory-cursor/credentials.json.

Cursor plugin facts from the supermemory docs and github.com/supermemoryai/cursor-supermemory. Cursor Rules and MCP from cursor.com/docs; the removal of Memories from Cursor's forum (November 25, 2025). Mem0's MCP server from docs.mem0.ai. Checked November 10, 2026\. The setup steps restate the [docs page for this integration](https://supermemory.ai/docs/integrations/cursor); when the two differ, the docs are current.

[All guides](https://supermemory.ai/guides/)
