# Persistent memory for Cursor with MCP

> Connect Cursor to a durable memory for project decisions, preferences, and handoffs that remain available outside the editor.

Verified: 2026-07-11

## Connect OceanDB to Cursor

```text
{
  "mcpServers": {
    "oceandb": {
      "url": "https://app.oceandb.ai/api/mcp"
    }
  }
}
```

1. **Open Cursor's MCP settings.** Add a new remote server in the settings interface, or place the shown definition in the MCP configuration used by your current Cursor release.
2. **Save and enable OceanDB.** Confirm that Cursor discovers the server and exposes its remember, recall, execute_sql, and onboarding_status tools.
3. **Authorize in the browser.** Complete the OceanDB sign-in and consent flow when Cursor requests access.
4. **Run a two-session test.** Save one decision in an agent chat, start a fresh chat, and ask Cursor to recall the decision before it edits code.

[Current Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol)

## Cursor context is not the same as durable memory

Cursor is effective at reading the current codebase. Its index, open files, chat history, and project rules help the agent understand what is in front of it. Durable memory answers a different question: what did the people and agents around this code learn over time?

That history includes rationale, preferences, failed approaches, external constraints, and handoffs. Some of it should not be committed to a repository. Some of it spans several repositories. OceanDB keeps that material queryable without making the editor the only place it can be used.

## Choose the right home for each kind of context

Keep stable, repository-wide instructions in Cursor's project rules or the instruction files already used by the codebase. Keep implementation truth in code and documentation.

Use OceanDB when the context is durable but experiential:

- why a migration was postponed even though the code is ready;
- a recurring review preference from the user;
- an incident finding that affects several services;
- a customer constraint that must shape future implementation;
- a handoff another agent will need after the current chat closes.

This prevents a memory server from duplicating the repository and prevents project rules from swelling into an unsearchable history log.

## Make recall part of the editing loop

Install OceanDB's [standing memory instruction](/docs/master-prompt) after connection. Before Cursor begins a task with missing business or decision context, it should call `recall`. When it discovers a durable fact or the user makes a lasting choice, it should call `remember`.

For a concrete test, tell Cursor:

```text
Remember that accessibility regressions block release even when visual QA passes.
```

Open a new chat and ask Cursor what release constraint applies before it changes the UI. The answer should come from the external store.

## Share decisions without sharing every chat

OceanDB stores selected durable entries, not a mandatory copy of every Cursor transcript. That makes the system useful for teams without turning memory into surveillance.

Personal workspaces remain private. Shared workspaces hold decisions and context intended for members. Projects and tags organize subjects within either visibility boundary. The agent routes each write deliberately, and the dashboard makes the result inspectable.

## Continue the work in another client

Once Cursor writes to OceanDB, the same fact can be recalled in [Codex](/integrations/codex), [Claude Code](/integrations/claude-code), or [ChatGPT](/integrations/chatgpt). This is especially useful when research, implementation, and explanation happen in different tools.

The MCP connection is common; the client experience is not. Each page in this integration directory keeps setup and client-specific behavior separate while pointing to one underlying memory.

## Common questions

### Does Cursor already remember the codebase?

Cursor can index and inspect code and can apply project rules. OceanDB adds durable history that may not exist in the repository and can be shared with other authorized AI clients.

### Should project rules be stored in OceanDB?

Rules that every checkout needs should remain in the repository. OceanDB is better for decisions, preferences, investigation results, team context, and other facts that should be retrieved selectively.

### Can the same memory work in different Cursor projects?

Yes. Configure OceanDB at the user scope when you want it available across projects, then use OceanDB projects and tags to keep subjects organized inside the store.

### Does Cursor need an OceanDB API key?

No long-lived key needs to be pasted into mcp.json. OceanDB uses a browser-based OAuth flow to bind the MCP client to the signed-in identity.
