diff --git a/Dockerfile b/Dockerfile index 5f94d68..ff79372 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,16 @@ WORKDIR /app # Copy tsconfig for TypeScript compilation COPY tsconfig.json ./ -# Create minimal package.json and install ONLY TypeScript +# Create minimal package.json and install ONLY build dependencies RUN --mount=type=cache,target=/root/.npm \ echo '{}' > package.json && \ - npm install --no-save typescript@^5.8.3 @types/node@^22.15.30 @types/express@^5.0.3 + npm install --no-save typescript@^5.8.3 @types/node@^22.15.30 @types/express@^5.0.3 \ + @modelcontextprotocol/sdk@^1.12.1 dotenv@^16.5.0 express@^5.1.0 -# Copy source and build +# Copy source and build (excluding n8n-specific files) COPY src ./src +# Remove n8n node implementation and related utils that aren't needed for MCP server +RUN rm -rf src/n8n src/utils/bridge.ts src/utils/mcp-client.ts RUN npx tsc # Stage 2: Runtime (minimal dependencies)