We propose an adaptive Metropolis-Hastings algorithm in which sampled data are used to update the proposal distribution. We use the samples found by the algorithm at a particular step to form the information-theoretically optimal mean-field approximation to the target distribution, and update the proposal distribution to be that approximation. We employ our algorithm to sample the energy distribution for several spin-glasses and we demonstrate the superiority of our algorithm to the conventional MH algorithm in sampling and in annealing optimization.