Cursor and Codex forget everything when a session ends. The correction you gave your agent last Tuesday — “always use pnpm in this repo, never npm” — is gone by Wednesday. The architectural decision you explained across six sessions exists nowhere the agent can access. For Cursor, the fix is a single JSON entry that installs PLUR as an MCP server; within one session, your agent is learning and recalling. For Codex CLI, the integration path depends on your version and setup.
Cursor and Codex both maintain context within a session — recently viewed files, your current conversation, the code you’re editing. That context clears when the session ends or the window fills. A memory layer is something different: it extracts the facts that matter (corrections, preferences, conventions, decisions), stores them durably, and retrieves them at the start of the next session with relevance ranking. You do not re-explain; the agent already knows.
Cursor supports the Model Context Protocol for extending its AI assistant with custom tools and context. PLUR ships an MCP server that runs as a local process, so your memory store stays on disk with no cloud account and no API cost for retrieval.
Open or create .cursor/mcp.json in your home directory (or the project root for project-scoped memory):
{
"mcpServers": {
"plur": { "command": "npx", "args": ["-y", "@plur-ai/mcp"] }
}
}
Restart Cursor. The PLUR MCP server is now active.
For automatic injection at session start and automatic capture after each tool call, install PLUR’s Cursor hook integration:
npx @plur-ai/cli init --cursor
This writes to .cursor/hooks.json — the same hooks mechanism Cursor uses for other session lifecycle events. With hooks installed, you do not need to call plur_session_start manually; memory is injected before your agent says a word.
Open a new Cursor session and ask your agent: “What do you remember about this project?” It will call plur_recall_hybrid and return any relevant memories. On a fresh install that list is empty — it populates as you work.
Once set up, three things happen without any action from you:
Session start — Relevant memories are injected into context before the first response. If you previously told your agent “always write async/await, never callbacks in this codebase,” that preference is present immediately.
During the session — Corrections you give the agent (“actually, use X not Y”) are captured automatically as engrams. High-confidence learnings are stored without you saying “remember this.”
Between sessions — Memories decay if they stop being useful (the agent stops retrieving them) and strengthen when they keep proving accurate. The memory list self-organizes toward what actually matters for your work.
Cursor has its own context mechanisms — conversation history within a session, indexed codebase context, recently viewed files. These are not memory in the durable sense: they do not survive session resets, and they do not travel to other tools. PLUR adds the layer above that: knowledge that survives resets, transfers to other MCP-compatible agents (Claude Code, Windsurf, Hermes), and is portable to a new machine via git sync.
OpenAI’s Codex CLI is a terminal-based coding agent that natively supports MCP servers via stdio and Streamable HTTP transports. To add PLUR, run:
codex mcp add plur -- npx -y @plur-ai/mcp
Verify with codex mcp list. Codex will negotiate tools with the PLUR server on each invocation and gain the full tool set (plur_session_start, plur_learn, plur_recall_hybrid, etc.).
If you prefer a Python-native path (e.g. wrapping Codex CLI via the OpenAI Agents SDK), PLUR also ships a Python SDK:
pip install plur-ai
For most Codex CLI users, the codex mcp add path is the lowest-friction option. The Python SDK is for embedding PLUR into custom agent loops, not for the Codex CLI directly.
One benefit of a memory layer that sits outside any single tool: the engrams Cursor captures are available in Claude Code, Windsurf, Hermes, and any other MCP client that points at the same store. The architectural decisions you teach Cursor carry to the terminal agent you run at night. This is the practical difference between in-tool memory (session-scoped, tool-scoped) and an open-format engram layer (portable, durable, multi-agent).
PLUR’s engram format is an open specification — the data is plain YAML at ~/.plur/, not locked to any service. You can inspect, edit, and export every stored memory.
If you work across machines or share memory with a team:
plur_sync({ remote: "git@github.com:you/plur-memory.git" })
Memory syncs via git. On another machine, point Cursor at the same store, run plur_sync(), and you pull all memories from the remote. No cloud service required.
Does this slow down Cursor? No. The PLUR MCP server is a lightweight local process (Node.js). Retrieval is BM25 + local embeddings — no API calls, no network latency. Injection happens once at session start, before your agent responds, and typically takes under a second.
Where is my memory stored?
~/.plur/ — plain YAML files on your disk. You own the data.
Does PLUR replace Cursor’s built-in AI memory? No. Cursor’s context mechanisms (conversation history, codebase indexing) continue to work as before. PLUR adds the durable layer above them: facts that survive the session boundary, cross-tool portability, and a feedback loop that trains which memories surface most reliably.
What if I correct the agent and it captures the wrong thing?
Call plur_forget with the engram ID, or open ~/.plur/ and delete the YAML entry. The history is preserved but the engram is retired and no longer injected.
Is Windsurf supported?
Yes — same pattern as Cursor. Add npx -y @plur-ai/mcp to Windsurf’s MCP config.