I am running n8n locally in docker on ubuntu (linux).
I managed to install docker/mcp-gateway and got it working for docker duckduckgo mcp server.
I also would like to do the same thing for docker opeweather MCP server.
n8n MCP CLient is finding the weather tool
and is also calling the tool but the tool is always returning a response with 0 data.
Here the output of executing some commands using the docker mcp CLI:
jan@nuc2:~$ docker mcp server ls
Warning: error fetching secrets: Get "httpXX://localhost/secrets": dial unix /home/jan/.docker/desktop/jfs.sock: connect: no such file or directory
Warning: error fetching OAuth apps: Get "httpXX://localhost/apps": dial unix /home/jan/.docker/desktop/tools.sock: connect: no such file or directory
MCP Servers (2 enabled)
NAME OAUTH SECRETS CONFIG DESCRIPTION
----------------------------------------------------------------------------------------------------
duckduckgo - - - A Model Context Protocol (MCP) ser...
openweather - ▲ required - A simple MCP service that provides...
Tip: To use these servers, connect to a client (IE: claude/cursor) with docker mcp client connect <client-name>
jan@nuc2:~$ docker mcp tools call weather city="Paris"
Tool call took: 772.935944ms
Current weather for :
Conditions:
Now: 0 metric
High: 0 metric
Low: 0 metric
Pressure: 0
Humidity: 0
FeelsLike: 0
Wind Speed: 0
Wind Degree: 0
Sunrise: 0 Unixtime
Sunset: 0 Unixtime
Weather Forecast for :
jan@nuc2:~$
Here my docker compose configuration of the MCP gateway:
services:
n8n:
gateway:
image: docker/mcp-gateway:v2
command:
- --servers=duckduckgo
- --servers=openweather
#- --servers=curl
- --transport=sse
- --port=8811
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8811:8811"
environment:
- TZ=${TZ:-Europe/Paris} # sets the timezone (you can also use "UTC") - important for timestamps
The problem is that openweather only works with an OWM_API_KEY but I have no clue how I can configure this key for the openweather MCP server as I am not using docker desktop (I am using docker engine).
Here an extract of the MCP gateway log file
Note: dynamic-tools disabled when using --servers flag
- Reading configuration...
- Reading catalog from [https://desktop.docker.com/mcp/catalog/v3/catalog.yaml]
- Reading secrets [openweather.owm_api_key]
couldn't read secret openweather.owm_api_key: reading secrets exit status 1: Error: open /.s0: file does not exist
- Configuration read in 737.745382ms
- Using images:
- mcp/duckduckgo@sha256:68eb20db6109f5c312a695fc5ec3386ad15d93ffb765a0b4eb1baf4328dec14f
- mcp/openweather@sha256:e2f49acbb718e28b6f2f1bb00d8eebcc4dfc73e6788ed2040974496856375d5f
> Images pulled in 4.801453ms
- Those servers are enabled: duckduckgo, openweather
- Listing MCP tools...
Warning: Secret 'openweather.owm_api_key' not found for server 'openweather', setting OWM_API_KEY=<UNKNOWN>
- Running mcp/openweather with [run --rm -i --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=openweather -l docker-mcp-transport=stdio --network nuc2_default -e OWM_API_KEY]
- Running mcp/duckduckgo with [run --rm -i --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=duckduckgo -l docker-mcp-transport=stdio --network nuc2_default]
> openweather: (1 tools)
- duckduckgo: [12/08/25 09:09:25] INFO Processing request of type server.py:523
- duckduckgo: ListToolsRequest
- duckduckgo: INFO Processing request of type server.py:523
- duckduckgo: ListPromptsRequest
- duckduckgo: INFO Processing request of type server.py:523
- duckduckgo: ListResourcesRequest
- duckduckgo: INFO Processing request of type server.py:523
- duckduckgo: ListResourceTemplatesRequest
> duckduckgo: (2 tools)
> 3 tools listed in 3.91457576s
It seems to expect that the OWM_API_KEY should be configured via a secret but docker secrets are not supported by docker engine.