Skip to content

fix(cli): correct --version / MCP serverInfo and build the morphkit-mcp bin - #141

Merged
masonwyatt23 merged 2 commits into
mainfrom
fix/cli-version-and-mcp-build
Sep 29, 2026
Merged

masonwyatt23 merged 2 commits into
mainfrom
fix/cli-version-and-mcp-build

Conversation

@masonwyatt23

Copy link
Copy Markdown
Member

Found during a clean-clone run of the README quickstart.

Bugs:

  1. npx morphkit-cli --version prints 0.2.3 even though the published package is 0.2.4, and the banner shows the same wrong number. The hard-coded constant in src/index.ts was never bumped.
  2. The MCP server's serverInfo.version is 0.2.0.
  3. package.json declares a morphkit-mcp bin at dist/mcp/server.js, but build and prepublishOnly only bundle src/index.ts. So a clean bun run build followed by npm publish ships a missing bin. The npm 0.2.4 tarball does have it, so that build was evidently made by hand.

Fix:

  • Set both constants to 0.2.4.
  • Bundle src/index.ts and src/mcp/server.ts with --root src in both scripts.
  • New test/version.test.ts asserts both versions match package.json and that every bin entry is built.

Verified locally:

  • Clean build produces dist/index.js and dist/mcp/server.js, both with shebangs.
  • node dist/index.js --version prints 0.2.4.
  • A stdio initialize against dist/mcp/server.js returns {name:morphkit, version:0.2.4}.
  • npm pack --dry-run includes both bins.
  • Lint, typecheck and bun test pass: 260 pass, 7 skip, 0 fail.

CI install needs #140 (lockfile) first. I'll update this branch after it merges. Nothing is published here: 0.2.4 on npm still reports 0.2.3, so a 0.2.5 publish is Mason's call.

- `morphkit --version` and the banner printed 0.2.3 in the published 0.2.4;
  the MCP server advertised 0.2.0. Both now 0.2.4.
- package.json declares a `morphkit-mcp` bin at dist/mcp/server.js, but
  `build` and `prepublishOnly` only bundled src/index.ts, so a clean-clone
  build/publish would ship a missing bin (0.2.4 on npm has it only because
  it was built by hand). Bundle both entry points with --root src.
- test/version.test.ts guards all three so they cannot drift again.
@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
morphkit-landing Ready Ready Preview Sep 29, 2026 2:28pm UTC

Request Review

@masonwyatt23
masonwyatt23 merged commit 586b096 into main Sep 29, 2026
6 checks passed
@masonwyatt23
masonwyatt23 deleted the fix/cli-version-and-mcp-build branch September 29, 2026 14:36

This branch was successfully deployed

1 active deployment
Preview — 0d838e1b Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant