Skip to content

Conversation

@dc-larsen
Copy link

Summary

Fixes the hosted MCP server at mcp.socket.dev failing on tools/list with error:

MCP error -32603: Cannot read properties of null (reading '_def')

Root cause: Zod version incompatibility. The MCP SDK 1.25.x requires zod ^3.25 which has internal _def structure changes that break schema serialization during tools/list.

Changes:

  • Pin @modelcontextprotocol/sdk to 1.22.0 (last version compatible with older Zod)
  • Pin zod to 3.24.1
  • Add npm overrides to force all transitive dependencies to use compatible versions

Test plan

  • Reproduced the issue on mcp.socket.dev (initialize works, tools/list fails)
  • Tested fix locally: both initialize and tools/list now return valid responses
  • Deploy to mcp.socket.dev and verify fix in production

The hosted MCP server at mcp.socket.dev fails on tools/list with:
"Cannot read properties of null (reading '_def')"

This is caused by Zod version incompatibility. SDK 1.25.x requires
zod ^3.25 which has internal _def structure changes that break
schema serialization.

Changes:
- Pin @modelcontextprotocol/sdk to 1.22.0 (last version using zod ^3.23.8)
- Pin zod to 3.24.1
- Add overrides to force all transitive deps to use compatible versions
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​types/​node@​24.10.1 ⏵ 24.10.9100 +110081 +196100
Updatednpm/​pino-pretty@​13.1.2 ⏵ 13.1.399 +110010087100
Updatednpm/​zod@​3.25.76 ⏵ 3.24.1100 +210010096100
Updatednpm/​pino@​10.1.0 ⏵ 10.3.099 +110010097100

View full report

@socket-security-staging
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​types/​node@​24.10.1 ⏵ 24.10.9100 +110081 +196100
Updatednpm/​pino-pretty@​13.1.2 ⏵ 13.1.399 +110010087100
Updatednpm/​pino@​10.1.0 ⏵ 10.3.094 +110010097 +2100
Updatednpm/​zod@​3.25.76 ⏵ 3.24.197 -110010096100

View full report

@socket-security-staging
Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Publisher changed: npm cors is now published by ulisesgascon

Author: ulisesgascon

From: package-lock.jsonnpm/@modelcontextprotocol/sdk@1.22.0npm/cors@2.8.6

ℹ Read more on: This package | This alert | What is unstable ownership?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Try to reduce the number of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity-Staging ignore npm/cors@2.8.6. You can also ignore all packages with @SocketSecurity-Staging ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants