Skip to content

Conversation

@fabien0102
Copy link

Motivation and Context

Zod 4 is now stable and bring a lot of performance optimization, it’s time to use it for mcp to benefit from this.

https://zod.dev/v4

How Has This Been Tested?

I only run the unit tests locally

Breaking Changes

The user zod schemas are now using zod@4 instead of zod@3 Here are the list of breaking changes -> https://zod.dev/v4/changelog?id=default-updates

You can also run npx zod-v3-to-v4 to migrate your existing projects (https://github.com/nicoespeon/zod-v3-to-v4)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Zod 4 introduces two new concepts: Registries and JSON schema. Those both features were used to provide a better implementation (I hope)

The regitry is used to provide the metadata required for completable, the types are following but so far I needed to add a ts-ignore to make typescript happy. Any help will be appreciated to fix this but I’m not sure it’s worth it.

@fabien0102 fabien0102 requested review from a team as code owners October 27, 2025 14:55
@fabien0102
Copy link
Author

Already quite of PR on the subject, let’s close this one (sorry for the noise)

@fabien0102 fabien0102 closed this Oct 27, 2025
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