The problem: Cursor forgets everything

You open Cursor, explain your project architecture, your coding conventions, your deployment setup. Cursor does great work. Then you close the tab.

Next session — Cursor has no idea who you are. You explain everything again. And again. And again.

This is the fundamental limitation of all AI coding assistants: the context window resets between sessions. Cursor's context window is large, but it's temporary storage — not memory.

The fix: persistent memory via MCP

Cursor supports MCP (Model Context Protocol) — a standard for connecting external tools to AI assistants. By connecting a memory MCP server, Cursor can:

Everything persists across sessions, across devices, forever.

Setup: 3 minutes

Step 1: Get an API key

Sign up at mengram.io (free tier: 50 adds, 300 searches/month). Copy your API key from the dashboard.

Step 2: Install the MCP server

pip install mengram-ai

Or if you prefer npm:

npx mengram-mcp

Step 3: Configure Cursor

Open Cursor Settings → MCP Servers → Add new server.

For the pip install method, add this configuration:

{
  "mcpServers": {
    "mengram": {
      "command": "mengram",
      "args": ["server", "--cloud"],
      "env": {
        "MENGRAM_API_KEY": "your-api-key-here"
      }
    }
  }
}

For the npx method:

{
  "mcpServers": {
    "mengram": {
      "command": "npx",
      "args": ["-y", "mengram-mcp"],
      "env": {
        "MENGRAM_API_KEY": "your-api-key-here"
      }
    }
  }
}

Restart Cursor. You should see "mengram" in the MCP tools list.

Step 4: Start using it

That's it. Cursor now has 12 memory tools available:

What Cursor remembers

Once connected, Mengram automatically extracts and organizes three types of memory from your conversations:

Semantic memory (facts)

Facts about you, your projects, and your preferences:

Episodic memory (events)

What happened in past sessions:

Procedural memory (workflows)

Learned step-by-step processes:

Procedural memory evolves automatically — when a procedure fails, Mengram updates it with what actually worked. Learn more about the three memory types.

Real example: before and after

Without memory (every session)

You: "Add a new API endpoint for user preferences"
Cursor: "What framework are you using? What's your project structure?
         Where do you put your routes? Do you use TypeScript?"

With memory (after first session)

You: "Add a new API endpoint for user preferences"
Cursor: [recalls: Next.js App Router, TypeScript, Supabase, existing route patterns]
        "I'll create app/api/preferences/route.ts following your existing
         pattern with Supabase client and Zod validation..."

No re-explaining. Cursor already knows your stack, your patterns, your preferences.

Tips for best results

1. Tell Cursor to save important context

After explaining something important, say: "Remember this for future sessions." Cursor will use memory_add to store it permanently.

2. Ask Cursor to recall before starting work

At the start of a session, say: "Search your memory for what you know about this project." Cursor will use memory_search to load relevant context.

3. Use Cognitive Profile for instant context

Say: "Load my cognitive profile." This generates a complete system prompt from all your stored memories — architecture, preferences, past decisions — in one call.

4. Let memory build naturally

You don't need to manually save everything. Over time, the memory builds automatically from your conversations. The more you use Cursor, the smarter it gets.

Cursor vs Claude Code memory

Both Cursor and Claude Code support MCP, so the setup is similar. The key difference:

Both work with the same Mengram backend, so your memories sync across tools.

Pricing

The free tier includes 50 memory adds and 300 searches per month — enough for personal use. For heavier usage:

See full pricing or get started free.

Get started

pip install mengram-ai

Get your free API key at mengram.io, add the MCP config to Cursor, and your AI assistant starts building permanent memory from the first conversation.

Questions? Open an issue or reply at the.baizhanov@gmail.com.