Skip to content

Zod version compatibility issue with MCP SDK #906

@developermau

Description

@developermau

While, I am builidng a custom MCP server about fetching data from Disney API. I have this error: keyValidator.parse is not a function.

Cursor found out a Zod version compatibility issue with MCP SDK:

There's a version conflict:

  • Your project has Zod 4.1.4 installed
  • But the MCP SDK is using Zod 3.25.76 internally
  • This version mismatch is causing the keyValidator._parse is not a function error

The solution is to downgrade your Zod version to be compatible with the MCP SDK. But the latest version of Zod is 4.1.5.

Please, if it is possible, you might give support to the latest of version of Zod. Or maybe, there is a best way to solve this kind of issues.

I would appreciate your help. Have a nice day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions