Skip to content

adk sample: Client error '401 Unauthorized' #162

Description

@craig-osterhout

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions