Missing zod dependency in generated MCP server template
Issue Description
The generated MCP server template is missing the zod
dependency, even though it's required for the schema validation patterns used in the project.
Current State
The generated package.json
includes:
{
"dependencies": {
"@modelcontextprotocol/sdk": "1.0.1",
"dotenv": "^17.2.1",
"zod-to-json-schema": "^3.23.5"
}
}
Problem
The template includes zod-to-json-schema
but not zod
itself, which is required because:
- The generated code uses Zod schemas for validation (e.g., in
src/schemas.ts
) -
zod-to-json-schema
depends onzod
but it's a peer dependency - This causes runtime errors when trying to use Zod validation
Expected State
The package.json
should include:
{
"dependencies": {
"@modelcontextprotocol/sdk": "1.0.1",
"dotenv": "^17.2.1",
"zod": "^3.23.8",
"zod-to-json-schema": "^3.23.5"
}
}
Impact
- Generated projects fail to build/run without manual dependency addition
- New developers encounter immediate setup issues
- Template doesn't work out of the box as intended
Reproduction Steps
- Use the create-mcp-server template to generate a new project
- Try to build or run the project
- Observe Zod-related import/runtime errors
Suggested Fix
Add "zod": "^3.23.8"
to the dependencies in the template's package.json.
Environment
- Template repository: https://git.haley.io/john/create-mcp-server/
- Discovered while working on: mcp-servers-graphile-migrate#5 (closed)