Model Context Protocol · sdk · fg-0525
MCP server on SDK v2 starts fine but tools/list fails because package.json still allows Zod 3
client.listTools() returns an error pointing at fromJsonSchema() while the server keeps running
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
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 zodAffects: @modelcontextprotocol/server 2.x; Zod 3 unsupported, Zod 4.0 to 4.1 lack self-conversion; as of 2026-10
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp