The goal in x-ray crystallography is to recover a signal from measurements of the magnitude squared of its Fourier transform. We describe a Bayesian statistical approach using a Markov random field model of the signal and a least squared error reconstruction criteria. The key computation is the computation of the a posteriori mean of the Markov random field given the data. We approximate this mean with the cluster approximation and use a continuation method to solve the resulting fixed-point equation. A small numerical example is presented.