Raised in docker/docs#25620. I was able to duplicate the issue and proposed fix.
The following error occurs when trying to run the adk sample.
Client error '401 Unauthorized' for url 'http://mcp-gateway:8811/sse'
Adding the following to the compose file resolves the error.
- --allow-unauthenticated
services:
adk:
build:
context: .
ports:
# expose port for web interface
- 8080:8080
environment:
# point adk at the MCP gateway
- MCPGATEWAY_ENDPOINT=http://mcp-gateway:8811/sse
depends_on:
- mcp-gateway
models:
gemma3:
endpoint_var: MODEL_RUNNER_URL
model_var: MODEL_RUNNER_MODEL
mcp-gateway:
# mcp-gateway secures your MCP servers
image: docker/mcp-gateway:latest
use_api_socket: true
command:
- --transport=sse
# add any MCP servers you want to use
- --servers=duckduckgo
- --allow-unauthenticated
models:
gemma3:
# pre-pull the model when starting Docker Model Runner
model: ai/gemma3:4B-Q4_0
context_size: 10000 # 3.5 GB VRAM
# increase context size to handle search results
# context_size: 131000 # 7.6 GB VRAM
Raised in docker/docs#25620. I was able to duplicate the issue and proposed fix.
The following error occurs when trying to run the
adksample.Client error '401 Unauthorized' for url 'http://mcp-gateway:8811/sse'Adding the following to the compose file resolves the error.
- --allow-unauthenticated