fix(docker): ship @appstrate/mcp-transport node_modules in runtime image#627
Merged
Merged
Conversation
The `mcp` built-in module (added to default MODULES) imports @appstrate/mcp-transport, whose @modelcontextprotocol/sdk dependency is nested under packages/mcp-transport/node_modules (not hoisted to root). The runtime stage's manual node_modules allowlist never included mcp-transport, so beta.26 crash-looped at boot: Module "mcp" could not be loaded: Cannot find module '@modelcontextprotocol/sdk/client/index.js' from '/app/packages/mcp-transport/src/index.ts' runtime-pi/Dockerfile already copies this (L153); the main image did not. Add the missing COPY to the allowlist. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Production v1.0.0-beta.26 crash-loops at boot (HTTP 503):
Root cause
mcpbuilt-in module (added to defaultMODULES) imports@appstrate/mcp-transport.@modelcontextprotocol/sdkis nested underpackages/mcp-transport/node_modules/(bun did not hoist it to root).Dockerfileruntime stage copiesnode_modulesvia a manual allowlist (explicitly not graph-derived). The list omittedmcp-transport, so its nested SDK never shipped → crash-loop. The allowlist's own comment predicts exactly this failure mode.runtime-pi/Dockerfilealready copiespackages/mcp-transport/node_modules(L153) — only the main image had the gap.Fix
One line added to the runtime allowlist:
COPY --from=deps /app/packages/mcp-transport/node_modules ./packages/mcp-transport/node_modulesFollow-up (not in this PR)
runtime-pi/sidecar/Dockerfilecopies mcp-transportsrc+package.jsonbut nonode_modules— latent gap if the SDK isn't otherwise resolved there. Sidecar shipped mcp-transport since before beta.26 without issue, so likely fine; worth a separate verification.🤖 Generated with Claude Code