-
Notifications
You must be signed in to change notification settings - Fork 357
fix: improve DuckDuckGo MCP gateway reliability and clarify platform … #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,40 @@ | ||
| version: "3.8" | ||
|
|
||
| services: | ||
| adk: | ||
| platform: linux/amd64 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: why does this need to hardcode the platform? What problem is solved by adding it?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's possible its simply just my local environment that's broken. When I remove 'platform' the build hangs. docker compose up ─╯ [+] Running 2/2 |
||
| build: | ||
| context: . | ||
| ports: | ||
| # expose port for web interface | ||
| - "8080:8080" | ||
| environment: | ||
| # point adk at the MCP gateway | ||
| # point ADK at the MCP gateway | ||
| - MCPGATEWAY_ENDPOINT=http://mcp-gateway:8811/sse | ||
| depends_on: | ||
| - mcp-gateway | ||
| models: | ||
| gemma3 : | ||
| gemma3: | ||
| endpoint_var: MODEL_RUNNER_URL | ||
| model_var: MODEL_RUNNER_MODEL | ||
|
|
||
| mcp-gateway: | ||
| # mcp-gateway secures your MCP servers | ||
| image: docker/mcp-gateway:latest | ||
| platform: linux/amd64 | ||
| use_api_socket: true | ||
| volumes: | ||
| # allow gateway to spin up MCP servers via Docker | ||
| - /var/run/docker.sock:/var/run/docker.sock:ro | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: I think this can be safely removed,
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. valid point. This is a copilot hallucination
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense, that was recently added to compose :-) |
||
| # mount your custom MCP configuration | ||
| - ./mcp-config.yaml:/app/config.yaml:ro | ||
| command: | ||
| - --transport=sse | ||
| # add any MCP servers you want to use | ||
| - --servers=duckduckgo | ||
|
|
||
| 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 | ||
| # context_size: 131000 # 7.6 GB VRAM | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # mcp-config.yaml | ||
| hostname: "0.0.0.0" | ||
| port: 8811 | ||
|
|
||
| servers: | ||
| duckduckgo: | ||
| # explicitly tell the gateway how to run the MCP server | ||
| command: docker | ||
| args: | ||
| - run | ||
| - --rm | ||
| - -i | ||
| - --init | ||
| - --security-opt=no-new-privileges | ||
| - --cpus=1 | ||
| - --memory=2Gb | ||
| - -e | ||
| - DDG_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: I'm not sure if we should get into agent spoofing, but in any case could you please clarify how this environment variable gets used? I cannot find any references to it in https://github.com/nickclyde/duckduckgo-mcp-server - Thanks!
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The DDG_USER_AGENT is another hallucination. I just tested without it and it works. When I tried to run with mcp-gateway as written it wasn't working for me so this was a best effort to get it to work. :) mcp-gateway: |
||
| - mcp/duckduckgo:latest | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue:
versionis obsolete and should not be used anymoreThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valid point. This is a copilot hallucination