From 0066e7f074c42b7a16293d1ecc1cf4c34c4a39af Mon Sep 17 00:00:00 2001 From: Aqil Aziz Date: Mon, 15 Jun 2026 05:31:44 +0700 Subject: [PATCH 1/2] fix(memory,sequentialthinking): declare zod as an explicit dependency Both server-memory and server-sequential-thinking import `zod` at runtime but never declared it in their package.json. The published npm packages therefore fail at startup with ERR_MODULE_NOT_FOUND for `zod` when zod is not otherwise hoisted into node_modules. Add `zod: ^3.25 || ^4.0` (matching @modelcontextprotocol/sdk peer range) to both packages and update package-lock.json accordingly. Fixes #4330 --- package-lock.json | 6 ++++-- src/memory/package.json | 5 +++-- src/sequentialthinking/package.json | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a5ece48b9..7ed7df3922 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4048,7 +4048,8 @@ "version": "0.6.3", "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@modelcontextprotocol/sdk": "^1.29.0" + "@modelcontextprotocol/sdk": "^1.29.0", + "zod": "^3.25 || ^4.0" }, "bin": { "mcp-server-memory": "dist/index.js" @@ -4162,7 +4163,8 @@ "dependencies": { "@modelcontextprotocol/sdk": "^1.29.0", "chalk": "^5.3.0", - "yargs": "^17.7.2" + "yargs": "^17.7.2", + "zod": "^3.25 || ^4.0" }, "bin": { "mcp-server-sequential-thinking": "dist/index.js" diff --git a/src/memory/package.json b/src/memory/package.json index e339452bcf..16efc18276 100644 --- a/src/memory/package.json +++ b/src/memory/package.json @@ -25,7 +25,8 @@ "test": "vitest run --coverage" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.29.0" + "@modelcontextprotocol/sdk": "^1.29.0", + "zod": "^3.25 || ^4.0" }, "devDependencies": { "@types/node": "^22", @@ -34,4 +35,4 @@ "typescript": "^5.6.2", "vitest": "^2.1.8" } -} \ No newline at end of file +} diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json index 1a9655134c..ababa9b8fb 100644 --- a/src/sequentialthinking/package.json +++ b/src/sequentialthinking/package.json @@ -27,7 +27,8 @@ "dependencies": { "@modelcontextprotocol/sdk": "^1.29.0", "chalk": "^5.3.0", - "yargs": "^17.7.2" + "yargs": "^17.7.2", + "zod": "^3.25 || ^4.0" }, "devDependencies": { "@types/node": "^22", @@ -37,4 +38,4 @@ "typescript": "^5.3.3", "vitest": "^2.1.8" } -} \ No newline at end of file +} From 0edc3b5a7941b540d9729cdd5428d0aa3715cfd8 Mon Sep 17 00:00:00 2001 From: Aqil Aziz Date: Mon, 15 Jun 2026 06:04:19 +0700 Subject: [PATCH 2/2] fix(filesystem): declare zod as an explicit dependency server-filesystem also imports zod at module load (index.ts) without declaring it. Under pnpm's strict non-flat node_modules a package can only import its own declared dependencies, so `pnpm dlx @modelcontextprotocol/server-filesystem` crashes with the same ERR_MODULE_NOT_FOUND for zod. Declare it with the same range as the other packages and update the lockfile. --- package-lock.json | 3 ++- src/filesystem/package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ed7df3922..4e895dc6da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3874,7 +3874,8 @@ "@modelcontextprotocol/sdk": "^1.29.0", "diff": "^8.0.3", "glob": "^10.5.0", - "minimatch": "^10.0.1" + "minimatch": "^10.0.1", + "zod": "^3.25 || ^4.0" }, "bin": { "mcp-server-filesystem": "dist/index.js" diff --git a/src/filesystem/package.json b/src/filesystem/package.json index 1ca74931b2..242dac34d3 100644 --- a/src/filesystem/package.json +++ b/src/filesystem/package.json @@ -28,7 +28,8 @@ "@modelcontextprotocol/sdk": "^1.29.0", "diff": "^8.0.3", "glob": "^10.5.0", - "minimatch": "^10.0.1" + "minimatch": "^10.0.1", + "zod": "^3.25 || ^4.0" }, "devDependencies": { "@types/diff": "^5.0.9",