perf: construct the default Ajv engine lazily on first validation (#2458)

This commit is contained in:
Felix Weinberger 2026-07-13 17:09:06 +01:00 • committed by GitHub
commit 7c49b47fb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,6 @@
---
'@modelcontextprotocol/client': patch
'@modelcontextprotocol/server': patch
---
Construct the default Ajv validation engine lazily on first validation. Creating a `Client` or `Server` no longer pays the ajv + ajv-formats instantiation cost at startup when no JSON Schema validation ever runs.