Skip to content

Fix Codex MCP bootstrap when launched from a MemWal checkout #388

Description

@alilloig

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

  1. Clone the repository with git clone --depth 1 git@github.com:MystenLabs/MemWal.git.
  2. Change into the clone.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions