Skip to main content

Claude Code

Add Walrus Memory to Claude Code so it recalls context and saves durable facts as you work. Install it as a plugin (recommended; adds automatic-memory hooks) or as MCP-only (just the tools).

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

Installation

Add the marketplace

        /plugin marketplace add MystenLabs/MemWal

Install the plugin

        /plugin install memwal@memwal-plugins

Restart and sign in

Restart Claude Code. On first use the agent runs memwal_login, which opens a browser to connect your wallet.

What the plugin includes

ComponentPluginMCP-only
Walrus Memory MCP (memory tools)
Lifecycle hooks (automatic recall/save)

MCP-only still saves and recalls on its own because the tools are proactive. The plugin adds hooks that reinforce the behavior and make the agent prefer Walrus Memory over Claude Code's built-in memory.

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.

See Reference for full parameters.

Lifecycle hooks (plugin only)

HookEventWhat it does
Session startSessionStartAnnounces that memory is active and reminds the agent to use the memwal_* tools (preferring them over any built-in memory).
User promptUserPromptSubmitDetects when your message references past work or states a durable fact, and reminds the agent to recall or save.
Post-toolPostToolUse (Bash)When a command's output looks like an error, reminds the agent to recall prior fixes and save the resolution.

Example workflow

Session 1

You:   I prefer pnpm and always use TypeScript strict mode.
Agent: (calls memwal_remember on its own to store both preferences)

Session 2: a brand-new chat

You:   set up a new package in this repo
Agent: (calls memwal_recall, finds your preferences)
Scaffolding with pnpm and "strict": true, matching how you like to work.

Verify

/mcp          → "memwal" should be Connected

Expand its tools and confirm the list includes memwal_remember_bulk and memwal_health. Then state a durable fact and check that the agent saves it with memwal_remember.

Troubleshooting

  • Tools missing: restart Claude Code (MCP servers load at startup).
  • Not signed in: ask the agent to run memwal_login, approve in the browser, then retry.
  • Hooks not firing: use the Plugin install, not MCP-only; the hooks ship only with the plugin.
  • memwal_recall returns nothing although you saved before: run memwal_restore <namespace> to rebuild the index from Walrus.