fix: upgrade to Zod v4, drop SSE server and @hono/zod-openapi#5
Merged
Conversation
- Upgrade @hono/zod-openapi ^0.19.2 → removed entirely (plain hono) - Upgrade zod ^3.x → ^4.0.0 - Upgrade @modelcontextprotocol/sdk ^1.8.0 → ^1.29.0 (Zod v4 compat) - Remove @mcpc/core and @mcpc/utils dependencies (no longer needed) - Remove SSE HTTP server, controllers, and ./server export - Switch server.tool() → server.registerTool() for SDK 1.29.0 API - src/app.ts simplified to just export the MCP server instance Fixes TypeError crash caused by zod-to-openapi@7.x monkey-patching Zod v4 lazy prototype methods incorrectly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
zod-to-openapi@7.x(bundled with@hono/zod-openapi@^0.19.x) monkey-patches Zod v4 lazy prototype methods incorrectly, causingTypeError: Cannot read properties of undefined (reading 'def')on startup — upgradedzodto^4.0.0and dropped@hono/zod-openapientirelysrc/server.ts,src/controllers/,hono,@mcpc/utils— the package only needs stdio transport; the SSE layer was unused overhead^1.8.0→^1.29.0which supportszod: ^3.25 || ^4.0natively; switched from deprecatedserver.tool()toserver.registerTool()@mcpc/core: No longer imported anywhere after SSE removalTest plan
deno check mod.ts— zero type errorsdeno run --allow-all tests/run-tests.ts— 76 passed, 0 failed🤖 Generated with Claude Code