diff --git a/entrypoint-user.sh b/entrypoint-user.sh index f685974..a1e168b 100644 --- a/entrypoint-user.sh +++ b/entrypoint-user.sh @@ -92,6 +92,23 @@ EOF EOF ;; esac + + # Add MemPalace MCP server if mempalace is installed + if command -v mempalace &>/dev/null && command -v python3 &>/dev/null; then + # Use python3 to merge the mcp block into the existing JSON + python3 -c " +import json, sys +with open('$CONFIG_FILE') as f: + config = json.load(f) +config.setdefault('mcp', {})['mempalace'] = { + 'type': 'local', + 'command': ['python3', '-m', 'mempalace.mcp_server'] +} +with open('$CONFIG_FILE', 'w') as f: + json.dump(config, f, indent=2) + f.write('\n') +" 2>/dev/null && echo "MemPalace MCP server added to opencode config." + fi fi # ── oh-my-opencode-slim setup (multi-agent orchestration) ────────────