A new image reconstruction algorithm is proposed to visualize static conductivity images of a subject in magnetic resonance electrical impedance tomography (MREIT). Injecting electrical current into the subject through surface electrodes, we can measure the induced internal magnetic flux density B = (B-x, B-y, B-z) using an MRI scanner. In this paper, we assume that only the z-component B-z is measurable due to a practical limitation of the measurement technique in MREIT. Under this circumstance, a constructive MREIT imaging technique called the harmonic B-z algorithm was recently developed to produce high-resolution conductivity images. The algorithm is based on the relation between del(2)B(z) and the conductivity requiring the computation of del(2)B(z). Since twice differentiations of noisy B-z data tend to amplify the noise, the performance of the harmonic B-z algorithm is deteriorated when the signal-to-noise ratio in measured B, data is not high enough. Therefore, it is highly desirable to develop a new algorithm reducing the number of differentiations. In this work, we propose the variational gradient B-z algorithm where B-z is differentiated only once. Numerical simulations with added random noise confirmed its ability to reconstruct static conductivity images in MREIT. We also found that it outperforms the harmonic B-z algorithm in terms of noise tolerance. From a careful analysis of the performance of the variational gradient B-z algorithm, we suggest several methods to further improve the image quality including a better choice of basis functions, regularization technique and multilevel approach. The proposed variational framework utilizing only B-z will lead to different versions of improved algorithms.