# Base container for npm-based MCP servers (STDIO transport).
# mcpd uses this image to run `npx -y <packageName>` when a server
# has packageName but no dockerImage.
# Using slim (Debian) instead of alpine for better npm package compatibility.
FROM node:20-slim

WORKDIR /mcp

# Pre-warm npx cache directory
RUN mkdir -p /root/.npm

# Default entrypoint — overridden by mcpd via container command
ENTRYPOINT ["npx", "-y"]
