Give Cursor AI Persistent Memory with MCP

June 2026 · 6 min read · For Cursor users and developers

Cursor is excellent at understanding your codebase in the moment. What it can't do is remember things across sessions: why you made an architecture decision six weeks ago, which third-party quirks burnt you in production, or what the team's conventions are on error handling.

You end up re-explaining the same context every time, or pasting a giant block of notes at the top of each session, or just working without it and getting AI suggestions that miss the project's nuances.

Cursor supports MCP. Stash is an MCP server. The two together give Cursor a persistent, searchable memory layer for your project.

What Cursor + Stash looks like in practice

# Once wired, you can do this in any Cursor session:

You: "Before we start: check context() for this project."

Cursor (calls context() via Stash MCP):
← "Project: PaymentService v2
   Stack: FastAPI + a database + Stripe
   Key decisions: Using idempotency keys on all Stripe calls (burnt in 2025 prod incident)
   Current focus: refactoring webhook handler to be event-sourced
   Watch out: Stripe test mode doesn't simulate webhook retries correctly"

You: "Add retry logic for failed webhook events."

Cursor: [has the full project context — doesn't suggest patterns that conflict with decisions
         already made, doesn't miss the idempotency requirement]

Instead of starting cold, Cursor starts with your project's institutional memory. The context call costs ~200 tokens. Loading that same context from a file or pasting it manually costs the same — except with Stash it's searchable, structured, and updated whenever you choose.

How to set it up in Cursor

Cursor supports MCP via Settings → MCP. The exact UI may differ by version, but the pattern is:

  1. Sign up at stashlite.com → you'll get a connector URL like https://app.stashlite.com/mcp?token=...
  2. Open Cursor settings → search "MCP" → add your connector URL as a remote MCP server
  3. Restart Cursor — the Stash tools will appear in Cursor's available tools list
  4. Start building your context store: ask Cursor to call context() to see what's there, then use stash_add to start storing project knowledge
Cursor MCP settings location (as of mid-2026): File → Preferences → Cursor Settings → Features → MCP. Or search "MCP" in the command palette. The interface varies by Cursor version — check Cursor's docs if you can't find it.

What to store

There's no right answer — store whatever you keep re-explaining. A few common patterns:

Collection nameWhat to put in it
architectureSystem design decisions + why you made them
incidentsProduction issues, root causes, fixes
conventionsTeam coding conventions, naming patterns
third-partyAPI quirks, undocumented behaviour, rate limits
onboardingWhat a new dev needs to know day 1
contextThe standing context Cursor loads on every session

The context collection is special in Stash — it's what context() returns, and it's what you'd seed with your project brief, stack, current sprint, and team conventions. Think of it as the prompt you'd write at the top of every session, except you only write it once and it stays current.

Searching project memory

Beyond the standing context, you can search specific knowledge on demand:

You: "Search Stash for anything about the payment webhook handler."

Cursor (calls stash_search("payment webhook")):
← "Found 3 records:
   [1] 2025-11-12 — Incident: webhook handler processed events twice during failover.
       Root cause: missing idempotency check on Stripe event_id. Fix: added webhook_log
       table, check before processing.
   [2] 2026-03-01 — Decision: switched to event-sourced webhook handler. Architecture
       note: never mutate state directly from webhook — emit event, process in worker.
   [3] 2026-05-20 — Stripe quirk: test mode webhooks don't retry on 5xx. In test mode,
       always return 200 and log failures separately."

Cursor now has the relevant history for the task at hand — not a full dump of all project knowledge, just the three records that are relevant.

Comparing this to other approaches

ApproachProCon
Cursor .cursorrules / CURSOR.mdBuilt-in, no setupAlways in context (token cost), file-based, not searchable
Paste notes manually each sessionZero setupTedious, inconsistent, error-prone
Custom MCP serverFull controlYou build it, you maintain it
Stash via MCPHosted, searchable, pull-on-demandExternal service, £8/mo Pro for full usage

Cursor's built-in context files (.cursorrules, CURSOR.md) are always loaded into every call — you pay the tokens every time, even for rules you don't need right now. Stash is pull-on-demand: you only load what's relevant, when it's relevant.

Free vs. paid tier for this use case

Stash's free tier (2,500 records / 50 queries/month) is enough to get started and useful for a single project. If you're using it across multiple projects or a team, the Pro tier (£8/mo, 100K records / 1K queries) is more appropriate. Pricing may change as we're still a new service.

Add persistent memory to Cursor in 2 minutes

Free tier. Connector URL on signup. No credit card required.

Get your connector URL →