Our understanding of magnetic fields in late-type stars is strongly driven by what we know of the solar magnetic field. For this reason, it is crucial to understand how typical the solar dynamo is. To do this we need to compare the solar magnetic field with that of other stars as similar to the Sun as possible, both in stellar parameters and age, hence activity. We present here the detection of a magnetic field in three planet-hosting solar-like stars having a mass, age, and activity level comparable to that of the Sun. We used the HARPSpol spectropolarimeter to obtain high-resolution high-quality circularly polarised spectra of HD 70642, HD 117207, and HD 154088, using the Least-Squares Deconvolution technique to detect the magnetic field. From the Stokes I spectra, we calculated the logR activity index for each star. We compared the position of the stars in the Hertzsprung-Russell diagram to evolutionary tracks, to estimate their mass and age. We used the lithium abundance, derived from the Stokes I spectra, to further constrain the ages. We obtained a definite magnetic field detection for both HD 70642 and HD 154088, while for HD 117207 we obtained a marginal detection. Due to the lower signal-to-noise ratio of the observations, we were unable to detect the magnetic field in the second set of observations available for HD 117207 and HD 154088. On the basis of effective temperature, mass, age, and activity level the three stars can be considered solar analogs. HD 70642, HD 117207, and HD 154088 are ideal targets for a comparative study between the solar magnetic field and that of solar analogs.