Use mempalace-mcp entry point directly, drop redundant wrapper
Validate / docs-check (push) Successful in 20s
Validate / validate-base (push) Successful in 11m32s
Validate / validate-omos (push) Successful in 15m18s
Publish Docker Image / build-base (push) Successful in 53m5s
Publish Docker Image / build-omos (push) Successful in 1h11m3s
Publish Docker Image / update-description (push) Successful in 15s
Validate / docs-check (push) Successful in 20s
Validate / validate-base (push) Successful in 11m32s
Validate / validate-omos (push) Successful in 15m18s
Publish Docker Image / build-base (push) Successful in 53m5s
Publish Docker Image / build-omos (push) Successful in 1h11m3s
Publish Docker Image / update-description (push) Successful in 15s
The mempalace Python package ships a 'mempalace-mcp' console entry
point; 'uv tool install' places it on PATH as a shim whose shebang
points at the isolated venv's Python. Our hand-rolled wrapper at
/usr/local/bin/mempalace-mcp-server was duplicating what uv installs
for free — one less file to maintain.
Fixes the MCP error users saw after the v1.14.28b → v1.14.29 upgrade
path: custom opencode.json files typically had the pre-v1.14.29
command ['python3', '-m', 'mempalace.mcp_server'] which worked with
the old pip install but fails silently after the uv-tool migration
because system python3 cannot import from the venv. Opencode surfaced
this as 'MCP error -32000: connection closed'.
- generate-config.py now emits ['mempalace-mcp'] and keys its detect
on shutil.which('mempalace-mcp').
- Dockerfile drops 'COPY rootfs/usr/local/bin/' and the chmod of the
wrapper. Build shrinks from 30 to 29 stages.
- rootfs/usr/local/bin/ removed entirely.
- Smoke test asserts /usr/local/bin/mempalace-mcp is executable and
prints its symlink target.
- README's MemPalace section shows ['mempalace-mcp'] and explicitly
warns against the old pattern with the observed failure mode.
- CHANGELOG adds a v1.14.29c entry.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Launcher for the MemPalace MCP server.
|
||||
#
|
||||
# MemPalace is installed via `uv tool install` into an isolated venv
|
||||
# under /opt/uv-tools/. System python3 cannot import mempalace directly,
|
||||
# so this wrapper exec's the venv's python with the mcp_server module.
|
||||
#
|
||||
# Used by opencode.json:
|
||||
# "command": ["mempalace-mcp-server"]
|
||||
exec /opt/uv-tools/mempalace/bin/python -m mempalace.mcp_server "$@"
|
||||
@@ -75,14 +75,15 @@ def register_mcp_servers(config: dict) -> list[str]:
|
||||
servers: dict[str, dict] = {}
|
||||
|
||||
# MemPalace — local-first AI memory (if installed).
|
||||
# Uses the mempalace-mcp-server wrapper rather than invoking
|
||||
# `python3 -m mempalace.mcp_server` directly, because mempalace
|
||||
# lives in an isolated uv tool venv that system python3 cannot
|
||||
# import from. The wrapper exec's the right interpreter.
|
||||
if shutil.which("mempalace") and shutil.which("mempalace-mcp-server"):
|
||||
# `mempalace-mcp` is the entry-point binary shipped by the mempalace
|
||||
# Python package. `uv tool install mempalace` places it on PATH as a
|
||||
# shim whose shebang points at the isolated venv's Python, so system
|
||||
# `python3 -m mempalace.mcp_server` (which would fail — system
|
||||
# python3 can't import from the uv venv) is unnecessary here.
|
||||
if shutil.which("mempalace-mcp"):
|
||||
servers["mempalace"] = {
|
||||
"type": "local",
|
||||
"command": ["mempalace-mcp-server"],
|
||||
"command": ["mempalace-mcp"],
|
||||
}
|
||||
|
||||
# Gitea — self-hosted Git forge API (if installed).
|
||||
|
||||
Reference in New Issue
Block a user