Two UX fixes for the Claude Code plugin install path, reported in #139 by @stefanfaur.
Fixed
- Claude Code plugin now auto-wires the MCP server (#139) — new
plugin/.mcp.jsondeclares the@agentmemory/mcpstdio server so/plugin install agentmemory@agentmemoryauto-starts it when the plugin is enabled. No extra config step, no separate install command. - Skills no longer fail under Claude Code's sandbox with "Contains expansion" (#139) — the
recallandsession-historyskills used pre-execution bash with$(...)/${VAR:-default}shell expansion, which Claude Code's sandbox rejects by pattern match. All four plugin skills (recall,remember,forget,session-history) are now pure prompts that tell Claude to use MCP tools directly. No bash, no sandbox issues, no shell escaping — and they run faster because they no longer fork a curl subprocess on every invocation.
Added
- Standalone MCP shim (
@agentmemory/mcp) implements the tools the rewritten skills need — previously exposed 5 tools, now exposes 7:memory_smart_search— aliasesmemory_recallwith substring fallback (BM25/vector/graph are only in the engine-backed path, not the standalone shim). Now searches title, content, files, concepts, and session IDs so the forget skill can find memories by file path or session ID as the docs promised. Rejects empty/whitespace-only queries to prevent the forget flow from accidentally matching every memory.memory_governance_delete— deletes memories bymemoryIdsarray or CSV string. Returns{deleted, requested, reason}. Silently skips unknown IDs.
- Argument normalization —
memory_savenow acceptsconcepts/filesas either an array (plugin skill format) or a comma-separated string (legacy). NewnormalizeList()helper handles both. parseLimit()helper — clampslimitargs to a sane range (1–100) acrossmemory_smart_search,memory_sessions, andmemory_audit. Rejects bogus values (negative, NaN, Infinity, booleans, objects) instead of silently passing them to.slice().- Input hardening on
memory_save—contentis now type-checked as a string before.trim(), somemory_save({content: 42})gets a clean "content is required" error instead of a runtimeTypeError. - 10 regression tests covering array + CSV
concepts/files, empty-query rejection, broadened search corpus,memory_governance_deletehappy/CSV/unknown-id paths,parseLimitclamping, non-string content rejection, and thememory_sessionslimit. Full suite: 719 passing.
Changed
- README Claude Code install snippet — now explicitly notes that
/plugin install agentmemoryregisters hooks + skills and auto-wires the MCP server via.mcp.json, with no extra step.
Upgrade
```bash
npm install @agentmemory/agentmemory@0.8.9
or standalone:
npx -y @agentmemory/mcp@0.8.9
```
If you're on Claude Code, re-run /plugin install agentmemory@agentmemory to pick up the new .mcp.json and rewritten skills, then restart Claude Code so the MCP server spawns.
Full changelog: v0.8.8...v0.8.9