Setup Guide

Add persistent
belief memory to
Cursor agents

Cursor is one of the best AI coding IDEs available. But every session starts from scratch — your architecture decisions, migration history, and project conventions vanish when you close the window.

Without MnemeBrain, Cursor forgets everything between sessions. With it, every architectural decision, migration, and preference is stored, tracked, and surfaced the moment it becomes relevant again.

March 2026 ~5 min setup Cursor + MCP + MnemeBrain
cursormcpsetup guidemnemebrain-lite
Cursor chat — 30 days of project memory
# Day 1 You: we're using PostgreSQL for this project Cursor: Stored. "project uses PostgreSQL" · confidence 0.95
# Day 30 — new session, Cursor has no context You: we migrated to MySQL last week Cursor: ⚡ Contradiction detected Existing belief: "project uses PostgreSQL" (confidence 0.95) New claim: "project uses MySQL" truth_state → BOTH · surfacing conflict for review
TL;DR
1pip install mnemebrain-lite then mnemebrain-lite serve
2Clone MCP bridge: git clone https://github.com/mnemebrain/mnemebrain-mcp then uv sync
3Add to ~/.cursor/mcp.json — point to the MCP server path
4Open Cursor → Settings → MCP → confirm mnemebrain: connected
5Chat naturally. Cursor now stores beliefs, detects contradictions, and retrieves across sessions.
Steps in this guide
Real cross-session memory — two Cursor sessions, 30 days apart
Session 1 — Day 1
You: This project runs on PostgreSQL 15. All queries go through SQLAlchemy.

↳ believe() called
claim: "project uses PostgreSQL 15"
confidence: 0.95
evidence: [chat_001]
Session 2 — Day 30 (fresh, zero context)
You: We finished the MySQL migration.

↳ contradiction detected
"PostgreSQL 15" ←→ "MySQL"
truth_state: BOTH

Cursor: ⚡ Conflict with stored belief.
PostgreSQL was recorded on Day 1.
Confirm migration before I update.

Cursor never saw Day 1's session. MnemeBrain surfaced the conflict from its persistent belief graph.

01

How it works

Architecture in 2 minutes

Cursor supports MCP — the Model Context Protocol — which lets it call external tools mid-session. MnemeBrain connects through this interface: a local backend stores your belief graph, and a lightweight MCP bridge translates Cursor's tool calls into HTTP requests.

Three parts: MnemeBrain backend (FastAPI, runs at localhost:8000, stores your belief graph in a local Kuzu database), MCP bridge (a stdio process Cursor spawns on startup), and Cursor itself, which now has 13 memory tools available in every chat session.

Everything runs locally. Your belief graph never leaves your machine. The MCP bridge talks to localhost:8000 only.
02

Install the MnemeBrain backend

One command, stays running in the background

Install the Lite version — a fully local backend with no cloud dependencies:

terminal
pip install mnemebrain-lite
mnemebrain-lite serve

You should see: Mnemebrain running at http://localhost:8000. Keep this terminal open — it needs to stay running while you use Cursor.

Tip: Add mnemebrain-lite serve & to your shell profile or a startup script so it launches automatically.
03

Clone and prepare the MCP bridge

The bridge Cursor uses to talk to MnemeBrain
terminal
git clone https://github.com/mnemebrain/mnemebrain-mcp
cd mnemebrain-mcp
uv sync
pwd   # copy this path — you'll need it in the next step
Don't have uv? Install it with: pip install uv. It's a fast Python package runner used by the MCP bridge.
04

Register with Cursor via mcp.json

Tell Cursor where the MCP bridge lives

Open or create ~/.cursor/mcp.json and add the MnemeBrain entry:

~/.cursor/mcp.json
{
  "mcpServers": {
    "mnemebrain": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mnemebrain-mcp",
        "run",
        "mnemebrain-mcp"
      ],
      "env": {
        "MNEMEBRAIN_URL": "http://localhost:8000"
      }
    }
  }
}

Replace /path/to/mnemebrain-mcp with the path you copied from the pwd command in Step 3.

Project-scoped config: For per-project memory isolation, put the same JSON in a .cursor/mcp.json file inside your project directory and commit it to git. Each project gets its own belief graph.
05

Verify the connection

Confirm MnemeBrain is live in Cursor

Restart Cursor, then open Settings → MCP. You should see mnemebrain listed with a green connected indicator and 13 tools.

You can also verify directly in chat:

Cursor chat
Check if the MnemeBrain backend is healthy.

Cursor will call the health tool and report back. If you see disconnected, confirm the backend is running (mnemebrain-lite serve) and the path in mcp.json is correct.

06

Use memory inside Cursor

Patterns for long-running coding projects

Store an architecture decision:

Cursor chat
Remember: this project uses FastAPI with async SQLAlchemy.
All database access must go through the repository pattern.
Never use raw SQL outside the db/ directory.

Cursor calls believe to store three structured beliefs with evidence back to your instruction. Available in every future session.

Retrieve what Cursor knows about your project:

Cursor chat
What do you know about our database architecture?

Contradiction detection when things change:

Cursor chat
We've switched from FastAPI to Django REST Framework.
ATTACKS edge detected — architecture revision
Session 1: "project uses FastAPI"
Session N: "switched to Django REST Framework"

// MnemeBrain detects the conflict
truth_state: BOTH ← not silently overwritten
belief_1: "FastAPI" confidence: 0.95 → 0.28
belief_2: "Django REST Framework" confidence: 0.92

Cursor: ⚡ Framework conflict detected.
FastAPI was stored in Session 1. Confirming Django migration before updating.

Most retrieval-based memory systems cannot represent contradictions explicitly — they silently overwrite the old fact. MnemeBrain creates an ATTACKS edge, flags truth_state: BOTH, and lets Cursor surface the conflict rather than guess.

What you've built

Cursor now has a persistent belief graph that survives across every session. Architecture decisions, migration history, team conventions, and code patterns are stored, tracked for contradictions, and retrieved semantically — exactly when relevant.

Typical belief lookup is <5ms on a local Kuzu store with ~100k beliefs. Everything runs on your machine.

GitHub: mnemebrain-lite →   PyPI →   BMB Leaderboard →