- Symptom
- client.listTools() returns an error pointing at fromJsonSchema() while the server keeps runningTypecheck and startup pass, and the failure appears only on the first tools/list
- Cause
- SDK v2 supports only Zod 4, and Zod 4.2 or later converts itself to JSON Schema. A Zod 3 range that satisfied the v1 peer installs and typechecks under v2, then registration skips the schema without throwing.
- Fix
- Declare zod ^4.2.0 in package.json, reinstall, and confirm a single copy with npm ls zod.
- Apply
"dependencies": { "@modelcontextprotocol/server": "^2.3.0", "zod": "^4.2.0" } // then: npm install && npm ls zod- Affected
- @modelcontextprotocol/server 2.x; Zod 3 unsupported, Zod 4.0 to 4.1 lack self-conversion; as of 2026-10
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders