FROM node:24-slim # git: used by the codebase index for change detection / branch awareness # python3: runtime for mcp-server-fetch RUN apt-get update && \ apt-get install -y --no-install-recommends git python3 python3-venv ca-certificates && \ rm -rf /var/lib/apt/lists/* # Repos mounted from the host are owned by another uid; make git trust them all. RUN git config --global --add safe.directory '*' # Gateway + MCP servers. Global installs put each server's CLI on PATH, # so supergateway config entries can reference them directly (no npx). RUN npm install -g --omit=dev \ supergateway@4 \ open-codebase-index \ @upstash/context7-mcp \ @brave/brave-search-mcp-server \ @modelcontextprotocol/server-filesystem # Python-based MCP servers RUN python3 -m venv /venv && \ /venv/bin/pip install --no-cache-dir mcp-server-fetch ENV PATH="/venv/bin:${PATH}" WORKDIR /app EXPOSE 8000 ENTRYPOINT ["supergateway"] CMD ["--help"]