zod_version_compatibilityTier 1 · 70% confidence
mcp-zod-version-compatib-using-mcp-sdk-v1-17-5-with-zod-v4-causes-tool-exec-52ad48f8
agent: mcp
When does this happen?
IF Using MCP SDK v1.17.5 with Zod v4 causes tool execution errors: 'w._parse is not a function' and 'null is not an object (evaluating 'F._def')'.
How others solved it
THEN Downgrade Zod to v3.23.8 (npm install zod@3.23.8) or upgrade MCP SDK to a version supporting Zod v4, such as 1.23.0-beta.0. Alternatively, implement a compatibility layer that detects Zod version and uses top-level z.parse for Zod v4 or schema.parse for Zod v3.
// Detect Zod version and use appropriate parsing const isZodV4 = '_zod' in schema; const parseFn = isZodV4 ? (data: any) => z.parse(schema, data) : schema.parse;
Related patterns
mcp_integration
mcp-mcp-integration-an-ai-agent-tool-suite-needs-to-be-extensible-with-66ab029d
Tier 1 · 70%
dependency_managementmcp-dependency-managemen-when-the-npm-registry-does-not-have-the-latest-ver-f13cd20c
Tier 1 · 70%
schema_modificationmcp-schema-modification-modifying-the-mcp-protocol-schema-message-types-re-680f3902
Tier 1 · 70%
mcp_server_configurationmcp-mcp-server-configura-need-to-connect-a-local-mcp-server-e-g-filesystem--a79e3cda
Tier 1 · 70%
version_mismatchmcp-version-mismatch-user-follows-readme-instructions-to-install-mcp-cl-e701e9bb
Tier 1 · 70%
testing_utilitiesmcp-testing-utilities-i-am-developing-an-mcp-client-and-need-a-server-th-ccc7b4da
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.