Stu Mason
Stu Mason

Activity

Pull Request Opened

PR #111 opened: fix: require MCP SDK >=1.23.0 for Zod v4 compatibility

Summary

All MCP tools with parameters crash with keyValidator._parse is not a function when npm resolves @modelcontextprotocol/sdk to a version below 1.23.0.

Root cause: Our package.json declared @modelcontextprotocol/sdk: ^1.6.1 alongside zod: ^4.3.5. SDK versions below 1.23.0 depend on zod: ^3.23.8 and call ._parse() on schema objects internally — a method that doesn't exist in Zod v4. When npm deduplicates (e.g. another MCP server already installed SDK 1.20.x), it hands our Zod v4 schemas to the old SDK's v3-only code path, which crashes.

Fix: Bump SDK floor from ^1.6.1 to ^1.23.0. SDK 1.23.0 is the first version with zod: "^3.25 || ^4.0" — it handles both Zod v3 and v4 schemas correctly.

Also bumps version to 2.6.2.

Verified

  • Confirmed Zod v4 schemas lack ._parse() (returns undefined)
  • Confirmed SDK 1.22 + Zod v4 reproduces the crash
  • Confirmed SDK 1.23+ works with Zod v4
  • Fresh npm install @masonator/coolify-mcp resolves SDK 1.25.3 + Zod 4.3.6
  • 230 tests pass, build clean

Test plan

  • npm test — 230 tests pass
  • npm run build — compiles cleanly
  • VERSION reports 2.6.2

Thanks to @sobrienti for the detailed report and investigation.

Fixes #109

+39
additions
-5
deletions
3
files changed