diff --git a/Containerfile b/Containerfile index 961afe2..e4626a1 100644 --- a/Containerfile +++ b/Containerfile @@ -32,7 +32,7 @@ ENV ARGOCD_URL=https://argocd-server ENV ARGOCD_TOKEN=secure-token ENV ARGOCD_MCP_SERVER_INSECURE=false ENV ARGOCD_MCP_SERVER_DEBUG=false -ENV ARGOCD_MCP_SERVER_LISTEN_HOST=0.0.0.0 +ENV ARGOCD_MCP_SERVER_LISTEN_HOST=127.0.0.1 ENV ARGOCD_MCP_SERVER_LISTEN_PORT=8080 # Run as non-root user diff --git a/cmd/start_server.go b/cmd/start_server.go index e3c9463..364fa34 100644 --- a/cmd/start_server.go +++ b/cmd/start_server.go @@ -59,7 +59,7 @@ var startServerCmd = &cobra.Command{ logger := slog.New(slog.NewTextHandler(cmd.ErrOrStderr(), &slog.HandlerOptions{ Level: lvl, })) - logger.Info("starting the Argo CD MCP server", "transport", transport, "argocd-url", argocdURL, "insecure", argocdInsecure, "debug", debug) + logger.Info("starting the Argo CD MCP server", "transport", transport, "listen", listen, "argocd-url", argocdURL, "insecure", argocdInsecure, "debug", debug) if debug { lvl.Set(slog.LevelDebug) logger.Debug("debug mode enabled") diff --git a/compose.yaml b/compose.yaml index 1eb0f17..a07bf46 100644 --- a/compose.yaml +++ b/compose.yaml @@ -26,7 +26,7 @@ services: - ARGOCD_TOKEN=secure-token - ARGOCD_MCP_SERVER_INSECURE=true - ARGOCD_MCP_SERVER_DEBUG=true - - ARGOCD_MCP_SERVER_LISTEN_HOST=0.0.0.0 + - ARGOCD_MCP_SERVER_LISTEN_HOST=0.0.0.0 # here we need to bind to 0.0.0.0 to be able to connect to the server from the host machine - ARGOCD_MCP_SERVER_LISTEN_PORT=8080 argocd-mcp-server-unreachable: # instance of the Argo CD MCP server with an invalid URL for the Argo CD server @@ -38,5 +38,5 @@ services: - ARGOCD_TOKEN=secure-token - ARGOCD_MCP_SERVER_INSECURE=true - ARGOCD_MCP_SERVER_DEBUG=true - - ARGOCD_MCP_SERVER_LISTEN_HOST=0.0.0.0 + - ARGOCD_MCP_SERVER_LISTEN_HOST=0.0.0.0 # here we need to bind to 0.0.0.0 to be able to connect to the server from the host machine - ARGOCD_MCP_SERVER_LISTEN_PORT=8080