Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions docs/usage/claude-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Claude Code Setup

Claude Code is the primary target for this plugin package. It supports the plugin manifest, MCP config, skills, slash commands, and lifecycle hooks.

## Local Review

From the plugin repo root:

```bash
claude plugin validate . --strict
claude --plugin-dir .
```

Restart Claude Code or run:

```text
/reload-plugins
```

Then verify:

```text
/plugin
/mcp
```

Expected:

- Plugin namespace: `memwal`
- MCP server: `memwal`
- Tools: `memwal_login`, `memwal_health`, `memwal_remember`, `memwal_remember_bulk`, `memwal_recall`, `memwal_analyze`, `memwal_restore`, `memwal_logout`

## Connect

```text
/memwal:setup
```

Or:

```text
Connect Walrus Memory.
```

Claude should call `memwal_health`, then `memwal_login` if credentials are missing.

## Verify Memory

```text
/memwal:health
/memwal:remember Walrus Memory Claude Code plugin setup was verified.
/memwal:recall Claude Code plugin setup verified
```

## Slash Commands

- `/memwal:setup`: connect and verify Walrus Memory.
- `/memwal:health`: check connection and credential state.
- `/memwal:remember`: save one durable fact.
- `/memwal:recall`: search memory.
- `/memwal:analyze`: extract durable facts from text and save them.
- `/memwal:restore`: rebuild a namespace search index.
- `/memwal:logout`: remove local credentials.

91 changes: 91 additions & 0 deletions docs/usage/codex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Codex Setup And Testing

Codex does not install Claude Code plugins directly, but it can run the same Walrus Memory MCP server.

Use MCP-only for the fastest test. Use optional hooks if you cloned this repo and want memory nudges on session start, prompt submit, and command errors.

## Option A: MCP-Only

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.memwal]
command = "npx"
args = ["-y", "@mysten-incubation/memwal-mcp", "--label", "Codex"]
```

Optional namespace:

```toml
[mcp_servers.memwal]
command = "npx"
args = ["-y", "@mysten-incubation/memwal-mcp", "--label", "Codex", "--namespace", "work"]
```

Restart Codex.

Inside a new Codex task, verify the MCP tools:

```text
What MCP tools do you have available?
```

Expected tools:

- `memwal_login`
- `memwal_logout`
- `memwal_health`
- `memwal_remember`
- `memwal_remember_bulk`
- `memwal_recall`
- `memwal_analyze`
- `memwal_restore`

Run login:

```text
Call memwal_login and help me connect Walrus Memory.
```

After the browser flow completes:

```text
Call memwal_health.
Remember that Codex successfully connected to Walrus Memory through the plugin repo test.
Recall Codex Walrus Memory plugin repo test.
```

## Option B: MCP + Codex Hooks

Clone the plugin repo:

```bash
git clone https://github.com/CommandOSSLabs/walrus-memory-plugin.git
cd walrus-memory-plugin
```

Install hooks and register MCP:

```bash
node scripts/install_codex_hooks.mjs
```

Enable hooks in `~/.codex/config.toml`:

```toml
[features]
codex_hooks = true
```

Restart Codex.

The installer is idempotent. Re-running it updates hook paths.

Uninstall hooks:

```bash
node scripts/install_codex_hooks.mjs --uninstall
```

Do not combine Option A with Option B unless you remove duplicate `[mcp_servers.memwal]` entries.

34 changes: 34 additions & 0 deletions docs/usage/hosted-connector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Hosted Claude Custom Connector

> **Status: experimental, not production-ready.** The remote MCP OAuth work this
> connector depends on ([MystenLabs/MemWal#584](https://github.com/MystenLabs/MemWal/pull/584))
> is still under active security review. Do not present this flow as ready to end
> users, and do not claim `tools/list` or memory-tool calls have been verified
> working end to end against the hosted endpoint. Use the local stdio + delegate-key
> setup (`docs/usage/claude-code.md`, `docs/usage/codex.md`, `docs/usage/other-clients.md`)
> instead until that PR is merged and the live smoke test is confirmed.

This repo is for the local plugin package. The hosted Claude custom connector is a separate remote MCP surface that uses OAuth.

Once the OAuth work above is accepted, the expected connector URL for Claude's native custom connector UI is:

```text
https://relayer.dev.memwal.ai/api/mcp
```

Discovery endpoints:

```text
https://relayer.dev.memwal.ai/.well-known/oauth-authorization-server
https://relayer.dev.memwal.ai/.well-known/oauth-protected-resource
```

Expected flow, once ready:

1. Add `https://relayer.dev.memwal.ai/api/mcp` in Claude's connector UI.
2. Claude discovers OAuth metadata.
3. The browser opens the Walrus Memory consent page.
4. The user connects a wallet and approves access.
5. Claude can call `tools/list` and memory tools without manual delegate keys or custom headers.

This hosted connector flow is independent of the Claude Code marketplace plugin, which uses local stdio MCP and delegate-key custom-header auth.
94 changes: 94 additions & 0 deletions docs/usage/other-clients.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Other MCP Clients

The Claude Code plugin bundle is not installed directly by OpenCode, Cursor, Claude Desktop, or most other IDEs. Those clients should use the same Walrus Memory MCP server through their MCP configuration.

## OpenCode

Add to `~/.config/opencode/opencode.json`:

```json
{
"mcp": {
"memwal": {
"type": "local",
"command": ["npx", "-y", "@mysten-incubation/memwal-mcp", "--label", "OpenCode"],
"enabled": true
}
}
}
```

Optional namespace:

```json
{
"mcp": {
"memwal": {
"type": "local",
"command": ["npx", "-y", "@mysten-incubation/memwal-mcp", "--label", "OpenCode"],
"environment": {
"MEMWAL_NAMESPACE": "work"
},
"enabled": true
}
}
}
```

Restart OpenCode, then ask the agent to call `memwal_login`.

## Cursor

Add to `~/.cursor/mcp.json`:

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

Optional namespace:

```json
{
"mcpServers": {
"memwal": {
"command": "npx",
"args": ["-y", "@mysten-incubation/memwal-mcp", "--label", "Cursor"],
"env": {
"MEMWAL_NAMESPACE": "work"
}
}
}
}
```

Restart Cursor and verify the `memwal` server is connected in Cursor's MCP settings.

## Claude Desktop

Add to Claude Desktop's config:

- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`

```json
{
"mcpServers": {
"memwal": {
"command": "npx",
"args": ["-y", "@mysten-incubation/memwal-mcp", "--label", "Claude Desktop"]
}
}
}
```

If the file already has other top-level keys, add `mcpServers` as a sibling instead of replacing the file.

Fully quit and reopen Claude Desktop, then ask the agent to call `memwal_login`.

20 changes: 16 additions & 4 deletions plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
{
"name": "memwal",
"version": "0.0.6",
"description": "Automatic Walrus Memory for Claude Code — proactive recall and durable-fact saving via the MemWal MCP + lifecycle hooks.",
"displayName": "Walrus Memory",
"version": "0.0.7",
"description": "Walrus Memory for Claude Code: MCP tools, delegate-key setup guidance, slash commands, and lifecycle hooks for durable encrypted memory.",
"author": {
"name": "Mysten Labs"
},
"homepage": "https://memory.walrus.xyz",
"repository": "https://github.com/MystenLabs/MemWal",
"repository": "https://github.com/CommandOSSLabs/walrus-memory-mcp",
"license": "Apache-2.0",
"keywords": ["memory", "mcp", "walrus", "sui", "semantic-search"]
"keywords": [
"claude-code",
"memory",
"mcp",
"walrus",
"sui",
"semantic-search"
],
"mcpServers": "./.mcp.json",
"skills": "./skills/",
"commands": "./commands/",
"hooks": "./hooks/hooks.json"
}
10 changes: 9 additions & 1 deletion plugin/.mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"mcpServers": {
"memwal": {
"command": "npx",
"args": ["-y", "@mysten-incubation/memwal-mcp"]
"args": [
"-y",
"@mysten-incubation/memwal-mcp",
"--label",
"Claude Code Plugin"
],
"env": {
"MEMWAL_CLIENT_LABEL": "Claude Code Plugin"
}
}
}
}
59 changes: 59 additions & 0 deletions plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Walrus Memory — Claude Code plugin

This directory packages the Walrus Memory MCP server (from the repo root) as a Claude Code
marketplace plugin, and also ships MCP configs for Codex, Cursor, and Antigravity.

## What is included

- Claude Code plugin manifest: `.claude-plugin/plugin.json`
- MCP server config: `.mcp.json`
- Slash commands: `commands/`
- Setup skill: `skills/setup/`
- Lifecycle hooks: `hooks/hooks.json`
- Optional Codex hook installer: `scripts/install_codex_hooks.mjs`

## Quick start (Claude Code local review)

```bash
claude plugin validate . --strict
claude --plugin-dir .
```

Inside Claude Code:

```text
/memwal:setup
/memwal:health
/memwal:remember I use Walrus Memory from Claude Code.
/memwal:recall Claude Code Walrus Memory setup
```

## Codex (MCP-only testing)

Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.memwal]
command = "npx"
args = ["-y", "@mysten-incubation/memwal-mcp", "--label", "Codex"]
```

See `docs/usage/codex.md` at the repo root for the full setup and testing guide.

## Detailed guides

- Claude Code: `../docs/usage/claude-code.md`
- Codex: `../docs/usage/codex.md`
- OpenCode, Cursor, Claude Desktop: `../docs/usage/other-clients.md`
- Hosted Claude custom connector (**experimental, not production-ready** — see the warning
in that doc): `../docs/usage/hosted-connector.md`

## Known open items (not resolved by this port)

- The published `@mysten-incubation/memwal-mcp` npm package and this repo's `plugin/`
directory still carry two slightly different hook manifests
(`plugin/hooks.json` vs `plugin/hooks/hooks.json`). Establishing one canonical
source is tracked separately — see the Notion task for
"Add Claude custom-connector compatibility to remote MCP".
- Plugin manifest attribution (`author: "Mysten Labs"` in a CommandOSSLabs-owned repo)
has not been formally confirmed with Mysten Labs branding/ownership approval.
Loading
Loading