Use OpenWebUI-compatible GitHub MCP transport

This commit is contained in:
Mikei386
2026-08-23 18:11:12 +02:00
parent 933d2a6e7d
commit 2347073f3f
5 changed files with 37 additions and 27 deletions
+14 -8
View File
@@ -1,15 +1,21 @@
FROM ghcr.io/github/github-mcp-server@sha256:1817b57d43916532dc002bdc5f344d639bd9fb54a9148d42168458f7c3280567 AS github
FROM ghcr.io/supercorp-ai/supergateway@sha256:095acf4471e142553c1a5514aa5e480abbc5885d00549d4a3481cc70eac53889
FROM python:3.13-slim@sha256:ffb752e139c0a19692a43af8d8523b274222dd68eebad5d583b45c2201c6e30a
ARG MCP_PROXY_VERSION=0.12.0
RUN pip install --no-cache-dir "mcp-proxy==${MCP_PROXY_VERSION}" "mcp==1.29.0"
# GitHub publishes a minimal image containing only the official Go binary.
# Supergateway contributes transport conversion only; GitHub API behavior and
# mcp-proxy contributes transport conversion only; GitHub API behavior and
# every exposed tool remain implemented by GitHub's official MCP server.
COPY --from=github /server/github-mcp-server /usr/local/bin/github-mcp-server
USER 65532:65532
ENTRYPOINT ["supergateway"]
# Open WebUI can retain an MCP session longer than a stateful gateway keeps it
# alive. A later call then fails although both the token and server are healthy.
# Stateless mode provides a fresh auto-initialized stdio server per request.
CMD ["--stdio", "/usr/local/bin/github-mcp-server stdio", "--outputTransport", "streamableHttp", "--protocolVersion", "2025-11-25", "--streamableHttpPath", "/mcp", "--port", "8000", "--logLevel", "info"]
RUN useradd --system --uid 10001 --create-home --home-dir /app mcp
USER 10001:10001
WORKDIR /app
EXPOSE 8000
# This is the same OpenWebUI-compatible stateless transport used by Athena's
# other Python/stdio MCP adapters. The official GitHub binary remains the only
# component implementing GitHub operations.
ENTRYPOINT ["mcp-proxy", "--host", "0.0.0.0", "--port", "8000", "--stateless", "--"]
CMD ["/usr/local/bin/github-mcp-server", "stdio", "--read-only", "--tools", "search_repositories,get_repository_tree,get_file_contents,search_code"]