Plugin assumes python3 -m mempalace works — breaks on modern Linux (PEP 668) and with uv/pipx installs
Problem
The Claude Code plugin (.claude-plugin/) invokes mempalace via python3 -m mempalace... in three places:
| Component |
File |
Invocation |
| MCP server |
.mcp.json, plugin.json |
python3 -m mempalace.mcp_server |
| Stop hook |
hooks/mempal-stop-hook.sh |
python3 -m mempalace hook run --hook stop --harness claude-code |
| PreCompact hook |
hooks/mempal-precompact-hook.sh |
python3 -m mempalace hook run --hook precompact --harness claude-code |
This requires mempalace to be importable by the system python3, which fails when:
- Modern Linux distros with PEP 668 (Ubuntu 23.04+, Fedora 38+, Debian 12+, Arch) —
pip install mempalace into the system Python is blocked with externally-managed-environment error
uv tool install mempalace — installs the CLI on PATH in an isolated venv, but the system python3 can't import it
pipx install mempalace — same as uv: CLI on PATH, package not importable by system Python
- Virtual environments —
python3 -m mempalace only works while the venv is active
The skill documentation (SKILL.md) also hardcodes pip install mempalace as the only install method.
Suggested fix
Replace python3 -m mempalace with the mempalace CLI entry point everywhere. The mempalace binary is placed on PATH by all installation methods (pip, uv tool install, pipx), so this works universally.
Hooks — straightforward replacement:
# Before
echo "$INPUT" | python3 -m mempalace hook run --hook stop --harness claude-code
# After
echo "$INPUT" | mempalace hook run --hook stop --harness claude-code
MCP server — needs a new CLI subcommand (e.g., mempalace mcp-serve) since mcp_server.py is currently only launchable as a module:
// Before
{"command": "python3", "args": ["-m", "mempalace.mcp_server"]}
// After
{"command": "mempalace", "args": ["mcp-serve"]}
SKILL.md — offer multiple install methods:
pip install mempalace # in a venv
uv tool install mempalace # recommended on modern Linux
pipx install mempalace # alternative
Impact
Anyone installing the plugin from the marketplace on a modern Linux distro (PEP 668) will have a broken MCP server and non-functional hooks out of the box.
Environment
- mempalace 3.0.14
- Arch Linux (PEP 668 enforced)
- Installed via
uv tool install mempalace
Plugin assumes
python3 -m mempalaceworks — breaks on modern Linux (PEP 668) and with uv/pipx installsProblem
The Claude Code plugin (
.claude-plugin/) invokes mempalace viapython3 -m mempalace...in three places:.mcp.json,plugin.jsonpython3 -m mempalace.mcp_serverhooks/mempal-stop-hook.shpython3 -m mempalace hook run --hook stop --harness claude-codehooks/mempal-precompact-hook.shpython3 -m mempalace hook run --hook precompact --harness claude-codeThis requires
mempalaceto be importable by the systempython3, which fails when:pip install mempalaceinto the system Python is blocked withexternally-managed-environmenterroruv tool install mempalace— installs the CLI on PATH in an isolated venv, but the systempython3can't import itpipx install mempalace— same as uv: CLI on PATH, package not importable by system Pythonpython3 -m mempalaceonly works while the venv is activeThe skill documentation (
SKILL.md) also hardcodespip install mempalaceas the only install method.Suggested fix
Replace
python3 -m mempalacewith themempalaceCLI entry point everywhere. Themempalacebinary is placed on PATH by all installation methods (pip,uv tool install,pipx), so this works universally.Hooks — straightforward replacement:
MCP server — needs a new CLI subcommand (e.g.,
mempalace mcp-serve) sincemcp_server.pyis currently only launchable as a module:SKILL.md — offer multiple install methods:
Impact
Anyone installing the plugin from the marketplace on a modern Linux distro (PEP 668) will have a broken MCP server and non-functional hooks out of the box.
Environment
uv tool install mempalace