  We study the matter power spectra in the viable $f(R)$ gravity models with
the dynamical background evolution and linear perturbation theory by using the
CosmoMC package. We show that these viable $f(R)$ models generally shorten the
age of the universe and suppress the matter density fluctuation. We examine the
allowed ranges of the model parameters and the constraints of the cosmological
variables from the current observational data, and find that the dynamical
evolution of $\rho_{DE}(z)$ plays an important role to constrain the neutrino
masses.
