Update MCP SDK to 1.29.0 and adapt CLI for zod 4 compatibility#24
Open
Nemo64 wants to merge 4 commits into
Open
Update MCP SDK to 1.29.0 and adapt CLI for zod 4 compatibility#24Nemo64 wants to merge 4 commits into
Nemo64 wants to merge 4 commits into
Conversation
- @modelcontextprotocol/sdk 1.15.1 -> ^1.29.0 (ReDoS, cross-client leak, DNS rebinding) - @anthropic-ai/mcpb 1.1.1 -> ^2.1.2 (devDep) - undici 7.16 -> ^7.25 (devDep; staying on 7.x keeps the MockAgent API used by tests stable) - zod 3.24 -> ^4.1.8 (the new SDK's zod-compat types caused TS2589 with zod 3 due to the dual zod/v3+zod/v4/core import paths) - overrides.tmp ^0.2.5 to clear the last transitive low-sev advisory coming through mcpb's @inquirer/prompts chain npm audit is now clean; build and the 31-test suite pass.
The SDK renamed the registered-tool field from `callback` to `handler` and now passes a second `extra` argument. Zod 4 also moved schema internals from `_def.shape` to `_zod.def.shape` and `safeParse` is now exposed via `zod/v4/core`. Adds small zod3/zod4 compat helpers so the CLI works against both shapes. Verified end-to-end against live ClickUp: searchSpaces, searchTasks, getTaskById, getListInfo, getTimeEntries, readDocument.
Skips dependency versions less than a week old during `npm install` resolution. Most malicious uploads to the npm registry are detected and yanked within hours, so a short cooldown trades a small amount of freshness for a meaningful drop in zero-day exposure when bumping deps (Shai-Hulud-style attacks, the March 2026 axios compromise, etc). Requires npm CLI >= 11.10.0; silently ignored on older npm. Only affects `npm install` (resolution path); `npm ci` keeps installing exactly from package-lock.json.
The README comparison table and image MIME fix were sitting in [Unreleased] but actually shipped in v1.6.1 (2026-02-01). v1.6.2 (2026-04-17) wasn't represented at all. Recreate both sections from the GitHub releases / commit history; keep only the genuinely upcoming work (security bumps and the cli.ts update for SDK 1.29) under [Unreleased].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the MCP SDK dependency to version 1.29.0 and zod to 4.1.8, then adapts the CLI to work with the new SDK's internal changes and zod 4's schema structure.
Key Changes
@modelcontextprotocol/sdkto^1.29.0,zodto^4.1.8,@anthropic-ai/mcpbto^2.1.2, andundicito^7.25.0.npmrcwithmin-release-age=7to mitigate fast-moving supply-chain attackstmppinned to^0.2.5to clear remaining transitive advisoriesextractShape()helper to handle zod 4's new schema internals (_zod.def.shapein addition to_def.shape)safeParseSchema()helper to safely validate schemas across different zod versionshandlerproperty (replacingcallback) and pass requiredextraargument with signal, requestId, sendNotification, and sendRequest_zod.def.description)Notable Implementation Details
extractShape()function handles multiple zod schema internals to maintain compatibilitysafeParseSchema()function gracefully falls back when schema parsing isn't availableextraobject with mock implementations for CLI testing (AbortController signal, mock sendNotification/sendRequest)https://claude.ai/code/session_01GVKRpcCMzbX1zuyJsusN1p