-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Describe the bug
STDIO-type extensions that use npx mcp-remote fail to initialize on macOS (Apple Silicon) due to two issues in the Hermit bootstrap and Node.js PATH resolution:
-
chown: command not found(exit 127) — The Hermit install script (install-<sha>.sh) callschownwithout a full path. On macOS,chownlives in/usr/sbin/, which is not included in the PATH inherited by GUI-launched apps (Electron). The bootstrap script at~/.config/goose/mcp-hermit/bin/hermitdoes not add/usr/sbinto PATH before invoking the install script. -
env: node: No such file or directory— Even after Hermit successfully bootstraps and installs Node.js, thenpxshim fails becausenodeis not in PATH at runtime. Root causes:- The generated
hermit.hclcontains a hardcodedenv.PATHthat overrides Hermit's automatic PATH management, preventing it from adding the Node.js binary directory. - Hermit sets
NPM_CONFIG_PREFIXto~/.config/goose/mcp-hermit/.hermit/node/, and adds.hermit/node/bin/to PATH — but this directory does not contain actualnode/npx/npmbinaries. The real binaries are in~/.config/goose/mcp-hermit/cache/pkg/node-<version>/bin/.
- The generated
Note: The node-setup-common.sh script in Goose.app/Contents/Resources/bin/ only runs hermit install node and does NOT activate the Hermit environment on macOS (activation is Linux-only per the conditional on line ~113). This means npx is invoked via the Hermit shim (bin/npx → symlink to bin/hermit), which relies on hermit exec to set up the environment — but the hardcoded PATH in hermit.hcl breaks this mechanism.
To Reproduce
- Install Goose Desktop on macOS (Apple Silicon)
- Add a new STDIO extension with command:
npx mcp-remote https://block.gitmcp.io/goose/ - Save and observe "Failed to add extension" error
- Check
/tmp/mcp.logfor detailed error output
First run shows:
Bootstrapping .../cache/pkg/hermit@stable/hermit from https://github.com/cashapp/hermit/releases/download/stable
/var/folders/.../tmp.XXXXXXXX: line 67: chown: command not found
An error occurred. Exiting with status 127.
After manually fixing the chown PATH issue, subsequent runs show:
Node setup (common) completed successfully.
Executing 'npx' command with arguments: mcp-remote https://block.gitmcp.io/goose/
env: node: No such file or directory
Failed to execute 'npx' with arguments: mcp-remote https://block.gitmcp.io/goose/
Expected behavior
The extension should initialize successfully. Hermit bootstrap should complete without chown errors, and npx should be able to find node in PATH when executing MCP extensions.
Screenshots
(Extension panel showing 6/7 loaded, "Goose Docs" failed with red indicator)
Please provide the following information
- OS & Arch: macOS 25.3.0 aarch64 (Apple Silicon)
- Interface: UI
- Version: 1.28.0
- Extensions enabled: code_execution, tom, summon, todo, Extension Manager, analyze, goose Docs
- Provider & Model: openrouter – moonshotai/kimi-k2-thinking
Additional context
Environment details
- The GUI app's PATH (via
launchctl getenv PATH) was:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin— missing/usr/sbinand/sbin - macOS system
/etc/pathscorrectly includes/usr/sbinand/sbin, but these are not inherited by Electron apps in all configurations
Workarounds applied
Three manual fixes were required to get the extension working:
Fix 1 — Added /usr/sbin and /sbin to PATH in ~/.config/goose/mcp-hermit/bin/hermit:
# After "set -eo pipefail", added:
export PATH="/usr/sbin:/sbin:${PATH}"Fix 2 — Removed hardcoded PATH override from ~/.config/goose/mcp-hermit/bin/hermit.hcl:
# Changed from:
env = {
"PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
}
# To:
env = {
}Fix 3 — Created symlinks in ~/.config/goose/mcp-hermit/.hermit/node/bin/ pointing to the actual Node.js binaries in ~/.config/goose/mcp-hermit/cache/pkg/node-<version>/bin/:
ln -sf .../cache/pkg/node-24.14.0/bin/node .../hermit/node/bin/node
ln -sf .../cache/pkg/node-24.14.0/bin/npm .../hermit/node/bin/npm
ln -sf .../cache/pkg/node-24.14.0/bin/npx .../hermit/node/bin/npx
ln -sf .../cache/pkg/node-24.14.0/bin/corepack .../hermit/node/bin/corepack