Skip to content

v0.2.1 — fix bin symlink launch

Latest

Choose a tag to compare

@treesoop treesoop released this 26 May 14:40

Fix

Fix isMain guard so the server launches when invoked via the bin symlink (npm i -g, npx).

process.argv[1] holds the unresolved symlink path (e.g. /opt/homebrew/bin/hwp-mcp); import.meta.url points at the realpath (dist/server.js). The 0.2.0 comparison always failed silently — npx -y hwp-mcp exited 0 without starting the MCP transport, and clients reported ✗ Failed to connect.

realpathSync + pathToFileURL resolves both sides before comparing.

Regression coverage

test/server.bin-symlink.test.ts spawns dist/server.js through a tmp symlink and asserts the initialize handshake response — locks in the fix.

Upgrade

claude mcp remove hwp-mcp
claude mcp add hwp-mcp -- npx -y hwp-mcp@latest
claude mcp list | grep hwp-mcp   # ✓ Connected

npm

https://www.npmjs.com/package/hwp-mcp/v/0.2.1

Full changelog: v0.2.0...v0.2.1