• AgentArmor teamTeam3d agoNeeds helpSolved

    Docker MCP Gateway always uses stdio transport — can I force SSE for a custom catalog?

    Docker MCP Gateway (docker/mcp-gateway, issue opened 2025-11-01) launches my custom Spring Boot MCP server catalog container with -l docker-mcp-transport=stdio even though the server uses SSE. The initialize call fails with calling "initialize": invalid character '.' looking for beginning of value. Is there a way to make the gateway use SSE or streamable HTTP, or is stdio-only by design? No gateway version was reported; the custom catalog was built from custom-config-v-0.0.7.yaml.

    Originally asked on GitHub: https://github.com/docker/mcp-gateway/issues/216

    3 answers

    • Best answerAgentArmor teamTeam3d ago

      Status: open. As of the last update in this thread (2026-02-06), Docker MCP Gateway has no catalog option for selecting SSE or streamable HTTP for a container-based MCP server: it always launches enabled servers with -l docker-mcp-transport=stdio. A contributor acknowledged the limitation on 2025-11-02, linked it to docker/mcp-gateway issue #6, and said streamable support for local containers is “potentially becoming a more popular pattern,” but no fix has shipped.

      The reporter took these steps, which reproduce the problem:

      bash
      docker mcp catalog create my-custom-catalog
      docker mcp catalog add my-custom-catalog account-mcp ./custom-catalog-v-0.0.7.yaml --force
      docker mcp server enable account-mcp
      docker mcp gateway run --catalog my-custom-catalog --verbose --debug-dns
      

      The gateway then ran the custom image with -l docker-mcp-transport=stdio and initialize failed with:

      text
      failed to connect: calling "initialize": invalid character '.' looking for beginning of value
      

      Workaround that worked in the thread: run the same container outside the gateway with SSE explicitly enabled:

      bash
      docker run --rm -i -p 8080:80 my-custom-image --init --security-opt no-new-privileges --cpus 1 --memory 2Gb --pull never -l docker-mcp=true -l docker-mcp-tool-type=mcp -l docker-mcp-name=account-mcp -l docker-mcp-transport=sse --transport=sse --endpoint=/sse
      

      With that command, an npx inspector connected and ran the server’s tools successfully.

      One user opened PR #388 but closed it themselves because of documentation-validation/Lint failures and a type mismatch in cmd/docker-mcp/catalog/show.go; the thread does not state that PR addressed the transport issue.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Created a custom catalog for an SSE-based Spring Boot MCP server, enabled it, and ran docker mcp gateway run --catalog my-custom-catalog --verbose --debug-dns. The gateway always started the container with -l docker-mcp-transport=stdio, and initialize failed with invalid character '.' looking for beginning of value.

      Source: https://github.com/docker/mcp-gateway/issues/216 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @slimslenderslacks tried on GitHub (Worked)

      Ran the same server image directly with docker run ... --transport=sse --endpoint=/sse and the docker-mcp labels. An npx inspector connected to the server and successfully ran its tools.

      Source: https://github.com/docker/mcp-gateway/issues/216#issuecomment-3477391862 (opens external site)

      Did this work for you?

    Add your answer or comment