Summary
The Codex hook installer writes a bare npx package spec:
command = "npx"
args = ["-y", "@mysten-incubation/memwal-mcp"]
When Codex is started in a MemWal checkout, npm resolves that package name to the local packages/mcp workspace instead of the published package. The workspace does not place memwal-mcp on PATH, so the process exits with:
sh: memwal-mcp: command not found
Codex then reports that the MCP connection closed during initialize. The MCP server never starts, so authentication is never reached.
Reproduction
- Clone the repository with git clone --depth 1 git@github.com:MystenLabs/MemWal.git.
- Change into the clone.
- Run npx -y @mysten-incubation/memwal-mcp --help.
Expected: the published CLI starts.
Actual: exit 127 with sh: memwal-mcp: command not found.
Controls:
- The same command succeeds outside the clone.
- It still fails after pnpm install and pnpm --filter @mysten-incubation/memwal-mcp build.
- It reproduces with Node 22/npm 10, Node 24/npm 11, and Node 25/npm 11.
- npx -y @mysten-incubation/memwal-mcp@latest succeeds from the clone because the explicit dist-tag forces the published package.
Proposed change
Use @mysten-incubation/memwal-mcp@latest in generated plugin configs, Codex install output, CLI help, and setup documentation. This retains the existing Node/npx prerequisite while avoiding the local-workspace resolution path. Add an installer regression test.
Summary
The Codex hook installer writes a bare npx package spec:
When Codex is started in a MemWal checkout, npm resolves that package name to the local packages/mcp workspace instead of the published package. The workspace does not place memwal-mcp on PATH, so the process exits with:
Codex then reports that the MCP connection closed during initialize. The MCP server never starts, so authentication is never reached.
Reproduction
Expected: the published CLI starts.
Actual: exit 127 with sh: memwal-mcp: command not found.
Controls:
Proposed change
Use @mysten-incubation/memwal-mcp@latest in generated plugin configs, Codex install output, CLI help, and setup documentation. This retains the existing Node/npx prerequisite while avoiding the local-workspace resolution path. Add an installer regression test.