Summary
Currently, setting up MemPalace with Claude Code requires three separate manual steps:
claude mcp add mempalace -- python -m mempalace.mcp_server
- Copy-paste hook JSON into
settings.local.json for the save hook
- Copy-paste more hook JSON for the precompact hook
This could be a single plugin install:
claude plugin add mempalace@mempalace --marketplace github:milla-jovovich/mempalace
What this adds
- Marketplace manifest (
.claude-plugin/marketplace.json) so the repo can be used as a Claude Code plugin marketplace
- Plugin (
plugins/mempalace/) containing:
- MCP server registration (19 tools, auto-configured)
- Stop hook (auto-save every 15 messages)
- PreCompact hook (emergency save before compaction)
- Doc updates to README, hooks/README, and examples/mcp_setup.md showing the plugin method as recommended
Additional changes
The plugin hooks are rewritten in Python (the originals are bash). This fixes the shell injection issue noted in #110 — the SESSION_ID from JSON input was used unquoted in file paths, allowing potential path traversal. The Python versions sanitize with re.sub(r"[^a-zA-Z0-9_-]", "_", session_id).
The manual MCP and hook setup instructions remain as alternatives for non-Claude Code users.
Happy to open a PR if this looks good.
Summary
Currently, setting up MemPalace with Claude Code requires three separate manual steps:
claude mcp add mempalace -- python -m mempalace.mcp_serversettings.local.jsonfor the save hookThis could be a single plugin install:
What this adds
.claude-plugin/marketplace.json) so the repo can be used as a Claude Code plugin marketplaceplugins/mempalace/) containing:Additional changes
The plugin hooks are rewritten in Python (the originals are bash). This fixes the shell injection issue noted in #110 — the
SESSION_IDfrom JSON input was used unquoted in file paths, allowing potential path traversal. The Python versions sanitize withre.sub(r"[^a-zA-Z0-9_-]", "_", session_id).The manual MCP and hook setup instructions remain as alternatives for non-Claude Code users.
Happy to open a PR if this looks good.