We propose a modeling study on the formation and evolution of the Circumstellar Envelopes (CSEs) of a sample of selected radio-loud objects, based on an innovative interaction between two codes widely used by the scientific community, but in different fields. CLOUDY (Ferland et al. 1998) is a widely used code to model the spectral energy distribution (SED) of the several objects characterized by clouds of gas heated and ionized by a central object. CosmoMC (Lewis & Bridle 2002) instead is usually used for exploring cosmological parameter space. We investigate here on the exploitation of the sampling performance of the Markov-Chain Monte-Carlo (MCMC) engine of CosmoMC to search for a best fit model of the considered objects through the spectral synthesis capacity of CLOUDY.