Skip to content

Conversation

@dannote
Copy link

  • 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).

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

Open in StackBlitz

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

commit: 222d0c8

@dannotedannote changed the title feat: Support Standart Schemafeat: Support Standard SchemaNov 22, 2025
@KKonstantinovKKonstantinov added this to the v2 milestone Nov 22, 2025
@KKonstantinov
Copy link
Contributor

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

@KKonstantinovKKonstantinov linked an issue Dec 1, 2025 that may be closed by this pull request
@fabian-hiller
Copy link

I recommend taking a look at our new Standard JSON Schema spec RFC: standard-schema/standard-schema#134

Sign up for freeto 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.

Adopting Standard Schema

3 participants

@dannote@KKonstantinov@fabian-hiller