Skip to content

Conversation

@dannote
Copy link

@dannote dannote commented Nov 22, 2025

  • Ported schema handling to Standard Schema with parsing support and async JSON Schema conversion.
  • Removed Zod as a required peer dependency so users can bring their own Standard Schema library.
  • Added a Valibot compatibility test to verify parsing and JSON Schema conversion.
  • Updated dependencies to include the Standard Schema converter and Valibot tooling.

Motivation and Context

  • Makes the SDK vendor-agnostic by relying on the Standard Schema interface instead of requiring Zod.
  • Confirms interoperability with another Standard Schema provider (Valibot) while maintaining JSON Schema export support.

How Has This Been Tested?

  • Full npm test suite
  • npm test -- src/server/valibot-compat.test.ts

Breaking Changes

Zod is no longer a required peer dependency; users need to install their preferred Standard Schema library (e.g., Zod, Valibot).

Types of Changes

  • Bug fix
  • New feature
  • Breaking 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

  • Standard Schema JSON conversion now routes non-Zod vendors through @standard-community/standard-json (async).

@dannote dannote requested a review from a team as a code owner November 22, 2025 11:50
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 22, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1155

commit: 222d0c8

@dannote dannote changed the title feat: Support Standart Schema feat: Support Standard Schema Nov 22, 2025
@KKonstantinov KKonstantinov added this to the v2 milestone Nov 22, 2025
@KKonstantinov
Copy link
Contributor

Thanks for your work! Will review and maintainers will discuss.

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.

2 participants