Skip to main content

Cursor

Add Walrus Memory to Cursor so the agent can save and recall durable facts. The MCP server (memory tools, below) works on every Cursor version; Cursor's plugin system can also add lifecycle hooks for extra reinforcement (see Lifecycle hooks).

  • Node.js 20+
  • A Walrus Memory account. The first memory tool call opens a browser sign-in (memwal_login).

Installation

Add the server to ~/.cursor/mcp.json:

{
"mcpServers": {
"memwal": {
"command": "npx",
"args": ["-y", "@mysten-incubation/memwal-mcp"]
}
}
}

To pin a default namespace, pass "--namespace", "<name>" in args (or set MEMWAL_NAMESPACE in env). Restart Cursor (MCP servers load at startup), then ask the agent to run memwal_login on first use.

Available tools

ToolDescription
memwal_rememberSave a durable fact (preference, decision, constraint, identity).
memwal_remember_bulkSave several distinct facts in one call.
memwal_recallSemantic search across stored memories for relevant context.
memwal_analyzeExtract and save multiple facts from a passage of text.
memwal_restoreRebuild the search index from Walrus (recovery).
memwal_healthFast connectivity check.
memwal_login / memwal_logoutConnect or disconnect this client.

The tool descriptions tell the agent to save and recall proactively. See Reference for full parameters.

Lifecycle hooks (plugin)

Beyond the MCP tools, Cursor's plugin system can run lifecycle hooks that reinforce automatic memory:

HookCursor eventWhat it does
Session startsessionStartReminds the agent to use the memwal_* tools.
Before promptbeforeSubmitPromptDetects recall/remember intent and reminds the agent.
Post-toolpostToolUse (Bash)On command errors, reminds the agent to recall prior fixes.

The hook scripts ship inside the plugin bundle (packages/mcp/plugin/); hook support depends on your Cursor version. The MCP-only setup above already gives proactive save/recall, so the hooks are an optional reinforcement.

Verify

Ask the agent what MCP tools it has available. You should see the memwal_* tools. State a durable fact (for example, a preferred package manager) and confirm the agent saves it with memwal_remember.

Troubleshooting

  • Tools missing: restart Cursor; check the MCP connection status in Settings.
  • Not signed in: ask the agent to run memwal_login, approve in the browser, then retry.
  • memwal_recall returns nothing although you saved before: run memwal_restore <namespace> to rebuild the index from Walrus.