VectleSkillsmemory MCP: Error [ERR_MODULE_NOT_FOUND] Cannot find package 'zod'

memory MCP: Error [ERR_MODULE_NOT_FOUND] Cannot find package 'zod'

Export

Fixes the memory MCP server crashing on startup with a missing zod module error. Use when @modelcontextprotocol/server-memory exits immediately with Cannot find package 'zod'. Not for knowledge-graph schema errors or for the server starting but tools misbehaving.

Fix memory MCP Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'zod'

TL;DR

The published package forgot to declare zod as a dependency. Install zod next to it (or wait for a fixed release). The server imports zod at startup, so the missing module kills it before the MCP handshake.

The exact error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'zod' imported from .../dist/index.js

Steps

1. Confirm the missing dependency

Run the server by hand:

npx -y @modelcontextprotocol/server-memory

Success check: it exits immediately with the Cannot find package 'zod' error, and nothing else. That confirms a packaging bug, not your config.

2. Install zod alongside the package

npm install -g zod @modelcontextprotocol/server-memory

or with pnpm:

pnpm add -g zod @modelcontextprotocol/server-memory

Success check: rerunning the server no longer mentions zod; it waits on stdin for the MCP handshake.

3. Restart the client

Fully restart Claude Desktop / Claude Code / Cursor so the server relaunches with zod resolvable.

Success check: the memory tools (create_entities, read_graph, search_nodes) appear and work.

When this applies

  • @modelcontextprotocol/server-memory (or server-sequential-thinking) exits instantly with the zod module-not-found error.
  • Fresh installs are affected; the published dependencies list only @modelcontextprotocol/sdk.

When it does not apply

  • The server starts but read_graph fails with Structured content does not match the tool's output schema: data/entities/0 must NOT have additional properties. That is a schema-validation issue with extra fields in memory.jsonl; strip the non-standard properties from the stored entities.
  • Tools fail with JSON parsing errors on Windows. Check the server version; that is a different bug.

Tool compatibility

  • @modelcontextprotocol/server-memory npm package (affected published versions)
  • @modelcontextprotocol/server-sequential-thinking (same bug)
  • Node.js 18+, npx / pnpm dlx launchers
  • Claude Desktop, Claude Code, Cursor, Continue

Why it happens

The package's bundled dist/index.js contains import { z } from "zod", but zod was never added to the published dependencies in package.json. npm/pnpm only install declared dependencies, so a fresh install has no zod to resolve and Node throws ERRMODULENOT_FOUND at import time, before any MCP code runs.

Edge cases

  • If you install with npx -y (ephemeral cache), the manual zod install can be wiped on cache eviction; a global install of both packages is more durable.
  • Do not confuse with the sibling startup failure from the mcp 2.0 SDK rename; that one names McpError, not zod.
  • Once a release declares zod properly, the manual install becomes unnecessary; check the changelog before scripting it permanently.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=memory+MCP%3A+Error+%5BERR_MODULE_NOT_FOUND%5D+Cannot+find+package+%27zod%27&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.