forked from zereight/gitlab-mcp
-
Notifications
You must be signed in to change notification settings - Fork 1
MCPB bundle crashes on startup due to missing dependencies #201
Copy link
Copy link
Labels
Description
Problem
MCPB bundles built with scripts/build-mcpb.sh crash immediately on startup with module resolution errors.
Root Causes
-
Deleted
yaml/dist/doc/directory - The cleanup script removes alldocdirectories, butyamlpackage has actual code indist/doc/directives.js(not documentation). This causes:Error: Cannot find module '../doc/directives.js' -
Missing
zodpeer dependency - The--omit=peerflag skips installingzod, which is a required peer dependency of@modelcontextprotocol/sdk. This causes:Error: Cannot find module 'zod/v4'
Symptoms
- Server starts, receives MCP
initializerequest, then crashes - Error appears as "Server transport closed unexpectedly"
- Works fine in local development, only affects MCPB bundles
Fix
Update build-mcpb.sh:
- Exclude
yaml/dist/docfrom cleanup - Replace
--omit=peerwith--omit=devto install required peer dependencies - Manually remove optional large packages (prisma CLI, typescript) after install
Testing
- Verified fix works with Node 20 and Node 24
- MCPB bundle now starts and responds to MCP requests correctly
Reactions are currently unavailable