Claude Code Plugin¶
Nuzo's Claude Code package is an official-path wrapper around the Nuzo MCP server.
It should make the same Nuzo memory tools available in Claude Code without adding Claude-specific memory behavior.
Claude Code is one host package, not the product boundary. Codex and future MCP-compatible agent CLIs should use the same MCP server and core behavior.
Install¶
Prerequisites: Node.js 22 or 24, npm 10 or newer, and a current Claude Code CLI.
Recommended path:
nuzo setup shows the Claude Code plugin changes and asks before changing host
configuration. This path also installs the local nuzo CLI for memory
management.
Advanced manual path:
claude plugin marketplace add fabionfsc/nuzo-memory
claude plugin install nuzo@nuzo-memory --scope user
Run claude plugin list --json and confirm that nuzo@nuzo-memory is enabled.
Inside Claude Code, inspect /mcp and /hooks, then start a new session. The
plugin obtains its pinned @nuzo/memory runtime on first use. Manual plugin
installation is useful for host-only tests, but it does not install the shell
CLI for managing memory.
Two hook trust prompts are expected. Nuzo uses SessionStart for bounded
session bootstrap recall and UserPromptSubmit for bounded prompt-context
recall. Both hooks are read-only, fail open, and never create, update, archive,
or delete memory. Capture still goes through memory.suggest_capture and a
confirmed memory.confirm_capture decision.
Verify Cross-session Memory¶
In a new Claude Code session, ask:
Inspect and confirm the proposed draft. Start another new session and ask:
The answer should use NUZO-CLAUDE-OK. If recall fails, confirm
nuzo@nuzo-memory is enabled, inspect /mcp and /hooks, run
/reload-plugins, and confirm both sessions use the same NUZO_MEMORY_STORE.
Update, Disable, Or Remove¶
For a Nuzo-managed Claude Code install, update the global package normally:
Nuzo automatically refreshes already-installed managed host plugins during the package lifecycle. If npm lifecycle scripts are disabled or the automatic refresh needs attention, run:
For a manual Claude Code plugin install, update with the native Claude Code commands:
Use /reload-plugins or start a new session after updating. Routine controls:
claude plugin disable nuzo@nuzo-memory
claude plugin enable nuzo@nuzo-memory
claude plugin uninstall nuzo@nuzo-memory --scope user
Managed updates do not repeat setup or silently install a missing plugin.
Package¶
Tracked installable source:
packages/claude-code-plugin/
├── .claude-plugin/plugin.json
├── .mcp.json
├── hooks/
│ └── hooks.json
├── skills/
│ └── nuzo-memory/
│ └── SKILL.md
└── README.md
Generated release artifact:
build/plugins/claude-code/nuzo/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ └── nuzo-memory/
│ └── SKILL.md
├── hooks/
│ └── hooks.json
├── .mcp.json
└── LICENSE
Generate and validate it with:
Current Scope¶
The package currently provides:
- Claude Code plugin metadata;
- MCP server defaults for the
nuzoMCP server; - a Claude Code skill that tells the host how to use Nuzo safely;
- read-only
SessionStartandUserPromptSubmithooks.
It does not provide:
- a separate memory engine;
- Claude-specific storage;
- an installer script;
- native Claude Code memory migration.
Official Claude Code Shape¶
Claude Code plugins are installable packages that can bundle skills, agents, hooks, MCP servers, LSP servers, background monitors, default settings, and executables.
For Nuzo, the useful parts are:
.claude-plugin/plugin.jsonfor plugin metadata;.mcp.jsonat the plugin root for MCP server configuration;skills/at the plugin root for Claude Code-specific usage guidance.
Only plugin.json belongs inside .claude-plugin/. Skills, hooks, agents, MCP config, and other components should stay at the plugin root.
Nuzo keeps the plugin identifier nuzo and the human display name Nuzo.
MCP Server¶
The tracked plugin points Claude Code at the version-matched Nuzo MCP server:
{
"mcpServers": {
"nuzo": {
"command": "npm",
"args": ["exec", "--yes", "--package=@nuzo/memory@1.2.0", "--", "nuzo-mcp-server"],
"cwd": "${CLAUDE_PLUGIN_ROOT}"
}
}
}
The generated release artifact uses the same runtime command:
{
"mcpServers": {
"nuzo": {
"command": "npm",
"args": ["exec", "--yes", "--package=@nuzo/memory@1.2.0", "--", "nuzo-mcp-server"],
"cwd": "${CLAUDE_PLUGIN_ROOT}"
}
}
}
1.2.0 matches the current release. Future packaging pins the actual plugin
version. This keeps the artifact portable across supported platforms while
allowing npm to install the correct native SQLite build.
Claude Code sets plugin-specific environment variables for plugin-provided MCP
servers. Nuzo uses ${CLAUDE_PLUGIN_ROOT} as the process working directory;
the executable itself is provided by the pinned npm runtime.
Contributor Validation¶
This flow validates the tracked marketplace-installable source package.
- Build the monorepo:
- Validate the Nuzo Claude Code plugin metadata:
- If Claude Code is installed locally, validate with the host CLI:
- For source-level local development, load the plugin directory directly:
- After changing plugin components such as
.mcp.json, run:
-
Confirm the
nuzoMCP server and thenuzo-memoryskill are visible, then inspect/hooksbefore relying on automatic recall. -
To validate the release layout, generate it and run the host validator:
The generated 1.2.0 config resolves the matching public
@nuzo/memory@1.2.0 package. The release gate validates the artifact with the
npm-distributed Claude Code CLI and validates the shared NUZO-37 SessionStart
canary without writing memory from hooks.
Runtime Configuration¶
The plugin runtime uses the same effective Nuzo resolver as the CLI and MCP server. By default it reads:
Operators can override runtime behavior without editing the package:
| Variable | Purpose |
|---|---|
NUZO_MEMORY_STORE |
Select the SQLite store path. |
NUZO_MEMORY_SCOPE |
Select the default scope; project:auto resolves from the active project path. |
NUZO_AUTHORIZED_SCOPES |
Restrict MCP/hook access to a comma-separated scope allowlist, for example project:auto,user:default. |
Use NUZO_AUTHORIZED_SCOPES for repository-controlled agents that should not
enumerate or write unrelated scopes in a shared local store. Without it, the
runtime is an unrestricted local process over the selected store.
Marketplace Install Direction¶
For normal sharing, Claude Code plugins should be distributed through a marketplace and installed with:
Scopes should be selected intentionally:
- user scope for personal installs;
- project scope for team-shared repository setup;
- local scope for machine-specific testing.
The repository publishes .claude-plugin/marketplace.json under the stable
marketplace name nuzo-memory. Its tracked plugin source and npm runtime move
together at one version.
Direct MCP Fallback¶
If marketplace installation is unavailable, configure Claude Code directly against the published runtime:
claude mcp add --transport stdio nuzo -- npm exec --yes --package=@nuzo/memory@1.2.0 -- nuzo-mcp-server
This exposes MCP tools but does not install the Nuzo skill or lifecycle hooks. Use it to isolate marketplace or plugin-loading failures.
Validation¶
Run:
The validator checks:
.claude-plugin/plugin.jsonexists;- the plugin name remains
nuzo; - the optional display name remains
Nuzo; - the license remains
Apache-2.0; .mcp.jsondefines an MCP server namednuzo;- the
nuzoMCP server usesnpm execwith an exact runtime version; - the runtime working directory resolves through
${CLAUDE_PLUGIN_ROOT}; - host-specific skill files exist when referenced.
Release validation additionally checks:
- the MCP server runs through
npm exec; @nuzo/memoryis pinned to the plugin version and runs the explicitnuzo-mcp-serverbinary;cwdresolves through${CLAUDE_PLUGIN_ROOT};- no sibling monorepo path remains.
If the claude CLI is installed, run the host validator too:
Boundary¶
Claude Code plugin files are packaging files only.
Memory lifecycle, policy checks, recall ranking, import/export, and storage belong in packages/core. Tool schemas and host-facing tool behavior belong in packages/mcp-server and docs/spec/tools.md.
Hooks¶
The plugin bundles the same read-only lifecycle used by Codex:
SessionStartinjects boundedautoloadmemory from the active project anduser:default;UserPromptSubmitrecalls relevant memory from prompt text, memory content, and topical tags;- empty results inject no context;
- errors fail open and never block the prompt;
- neither event suggests or writes memory.
Both events render one attributed JSON record per line inside the shared Nuzo trust envelope. Recalled content is untrusted stored data, not a Claude Code system, plugin, or current-user instruction. Source and confidence remain inspectable attribution and metadata; they do not elevate authority. See Memory Trust Boundary.
Run the packaged runner diagnostic with:
The report confirms content-free runtime and store readiness. Claude Code
remains the authority for whether plugin hooks are enabled; verify them through
/hooks. The hook policy is
defined in docs/operations/lifecycle-hooks.md, and capture remains governed
by docs/spec/capture-suggestions.md.
Chat Memory Lifecycle¶
The nuzo-memory skill guides Claude Code through the same user-controlled MCP
flow as Codex:
user asks to remember something
-> memory.suggest_capture validates a visible draft
-> user chooses create, update, keep separate, clarify, or reject
-> memory.confirm_capture applies only the explicit decision
user asks to update a memory
-> show the current memory, proposed replacement, ID, and revision
-> confirmed update uses target_memory_id and expected_revision
user asks to remove a memory
-> identify and show the intended memory
-> archive by default, or permanently delete only after explicit confirmation
-> memory.forget uses the displayed expected_revision
Revision conflicts require Claude Code to re-read the memory and ask again; it
must not retry silently. Multiple-memory removal starts with a bounded dry-run
memory.forget_many preview. Rejected, blocked, duplicate, unclear, and merely
inferred drafts remain write-free. The lifecycle hooks themselves stay
read-only and never perform these mutations.
Portability¶
Export/import remains a Nuzo feature:
Claude Code + Nuzo plugin
-> memory.export
-> nuzo-memory-export JSON
-> memory.import
-> Codex + Nuzo plugin
This covers memories created and managed through Nuzo. It does not promise access to Claude Code's private native memory unless Claude Code exposes an official API or export format.
Source References¶
- Claude Code docs, Create plugins: plugin structure,
--plugin-dir,/reload-plugins, and marketplace direction. - Claude Code docs, Plugins reference: manifest schema, component locations, and plugin CLI commands.
- Claude Code docs, MCP: stdio MCP setup and plugin-provided MCP variable behavior.
- Claude Code docs, Settings: plugin enablement, scopes, and marketplace configuration.
- Claude Code docs, Hooks reference: plugin hooks,
SessionStart,UserPromptSubmit, andadditionalContext.