Expose native MCP endpoint alongside mcpo
Build and push image / build (push) Successful in 3m59s

Run supergateway on port 8080 (streamable HTTP at /mcp) next to mcpo on
8000, each spawning its own webfetch-mcp child. Supervise both under tini.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit was merged in pull request #2.
This commit is contained in:
2026-10-06 17:27:28 +01:00
co-authored by Claude Sonnet 5.5
parent 5e8abfd6ef
commit 291703ecc3
3 changed files with 119 additions and 25 deletions
+15 -2
View File
@@ -18,6 +18,12 @@ ARG MCPO_VERSION=0.0.20
# release's uv.lock for its actual tested "mcp" version and update this too.
ARG MCP_SDK_VERSION=1.17.0
# Pinned supergateway release (npm). It serves a stdio MCP server as a native
# streamable-HTTP endpoint. Bump by checking the new version's CLI flags still
# match what entrypoint.sh assumes (--stdio/--outputTransport/--port/
# --healthEndpoint).
ARG SUPERGATEWAY_VERSION=4.1.0
FROM python:3.12-slim-bookworm AS vendor
ARG WEBFETCH_MCP_COMMIT
RUN apt-get update && apt-get install -y --no-install-recommends git \
@@ -31,19 +37,26 @@ RUN mkdir /vendored \
FROM python:3.12-slim-bookworm
ARG MCPO_VERSION
ARG MCP_SDK_VERSION
ARG SUPERGATEWAY_VERSION
# tini is PID 1: entrypoint.sh supervises two long-running processes, so
# something needs to reap zombies and deliver signals properly.
# Node.js 22, matching the version mcpo's own official image is built and
# tested against (webfetch-mcp only requires >=18).
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
gnupg \
tini \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir "mcpo==${MCPO_VERSION}" "mcp==${MCP_SDK_VERSION}"
RUN npm install -g --omit=dev "supergateway@${SUPERGATEWAY_VERSION}" \
&& npm cache clean --force
COPY --from=vendor /vendored /app/webfetch-mcp
WORKDIR /app/webfetch-mcp
RUN npm ci --omit=dev
@@ -51,5 +64,5 @@ RUN npm ci --omit=dev
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8000
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8000 8080
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]